From a7baa039fc7fd056efbd60d50b1790add8f082eb Mon Sep 17 00:00:00 2001 From: Kuntal Majumder Date: Tue, 2 May 2023 13:27:02 +0200 Subject: [PATCH] tools: Use current filepath instead of using deprecated attribute --- changelog.md | 4 ++++ conanfile.py | 2 +- embedded_python_tools.py | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 74cfdb4..2f1a6fa 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Changelog +## v1.5.4 | 2023-05-02 + +- Removed the only usage of deprecated attribute `deps_cpp_info` of `Conanfile` from `embedded_python_tools.py`. + ## v1.5.3 | 2023-04-25 - Fixed a bug where the python version would be incorrectly cached between builds as the conan `source` method is only called once. diff --git a/conanfile.py b/conanfile.py index 99dc949..19fd759 100644 --- a/conanfile.py +++ b/conanfile.py @@ -12,7 +12,7 @@ # noinspection PyUnresolvedReferences class EmbeddedPython(ConanFile): name = "embedded_python" - version = "1.5.3" # of the Conan package, `options.version` is the Python version + version = "1.5.4" # of the Conan package, `options.version` is the Python version license = "PSFL" description = "Embedded distribution of Python" topics = "embedded", "python" diff --git a/embedded_python_tools.py b/embedded_python_tools.py index af5a9b1..d5ec564 100644 --- a/embedded_python_tools.py +++ b/embedded_python_tools.py @@ -48,8 +48,8 @@ def imports(self): os.remove(dst) except: # this seems to be the only way to find out this is not a junction shutil.rmtree(dst) - - src = pathlib.Path(conanfile.deps_cpp_info["embedded_python"].rootpath) / "embedded_python" + root_folder = pathlib.Path(__file__).resolve().parent + src = root_folder / "embedded_python" _symlink_compat(conanfile, src, dst) bin = pathlib.Path(bin).absolute()