Skip to content

Commit 11afab9

Browse files
committed
Fix packaging error if bin directory doesn't exist
1 parent 250377b commit 11afab9

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

Diff for: changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v1.8.2 | In development
4+
5+
- Fixed a packaging error on Linux in case the `bin` directory was not created during build.
6+
37
## v1.8.1 | 2023-10-02
48

59
- Fixed packaging and runtime errors caused by conflicts with an incompatible system Python installation or `pip` packages installed in the user's home directory. The embedded Python now always run in isolated mode regardless of command line flags.

Diff for: conanfile.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# noinspection PyUnresolvedReferences
1111
class EmbeddedPython(ConanFile):
1212
name = "embedded_python"
13-
version = "1.8.1" # of the Conan package, `options.version` is the Python version
13+
version = "1.8.2" # of the Conan package, `options.version` is the Python version
1414
license = "PSFL"
1515
description = "Embedded distribution of Python"
1616
topics = "embedded", "python"
@@ -38,7 +38,7 @@ class EmbeddedPython(ConanFile):
3838
exports_sources = "embedded_python.cmake"
3939

4040
def requirements(self):
41-
self.requires(f"embedded_python-core/1.2.1@{self.user}/{self.channel}")
41+
self.requires(f"embedded_python-core/1.2.2@{self.user}/{self.channel}")
4242

4343
def configure(self):
4444
self.options["embedded_python-core"].version = self.options.version

Diff for: core/conanfile.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# noinspection PyUnresolvedReferences
1313
class EmbeddedPythonCore(ConanFile):
1414
name = "embedded_python-core"
15-
version = "1.2.1" # of the Conan package, `options.version` is the Python version
15+
version = "1.2.2" # of the Conan package, `options.version` is the Python version
1616
license = "PSFL"
1717
description = "The core embedded Python (no extra pip packages)"
1818
topics = "embedded", "python"
@@ -279,9 +279,11 @@ def _isolate(self, prefix):
279279
with open(prefix / f"python{self.short_pyversion}._pth", "w") as f:
280280
f.write("\n".join(paths))
281281

282+
bin_dir = prefix / "bin"
283+
bin_dir.mkdir(parents=True, exist_ok=True)
282284
py_exe = f"python{self.short_pyversion}"
283-
os.symlink(f"../{py_exe}", prefix / f"bin/{py_exe}")
284-
os.symlink(f"../{py_exe}", prefix / f"bin/python3")
285+
os.symlink(f"../{py_exe}", bin_dir / py_exe)
286+
os.symlink(f"../{py_exe}", bin_dir / "python3")
285287

286288
def package(self):
287289
src = self.build_folder

0 commit comments

Comments
 (0)