Skip to content

Commit 728bf22

Browse files
committed
Remove duplicate version option
v1.6.0 introduced `embedded_python-core` and left the `version` option in the non-core package for backward compatibility. At this point, it's too confusing to have both, so let's drop it.
1 parent e7b769a commit 728bf22

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

.github/workflows/test_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
os: [windows-latest, ubuntu-latest, macos-latest]
1010
embedded-py: [3.9.8, 3.11.5]
1111
env:
12-
create_pck: conan create . lumicks/testing -o embedded_python:version=${{ matrix.embedded-py }} --build=missing
12+
create_pck: conan create . lumicks/testing -o embedded_python-core:version=${{ matrix.embedded-py }} --build=missing
1313
steps:
1414
- if: runner.os == 'Windows' # `pylake` git clone goes over the limit
1515
run: git config --system core.longpaths true

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## v1.9.0 | In development
44

55
- Removed the obsolete `openssl_variant` option.
6+
- Removed redundant `embedded_python:version` option. Use `embedded_python-core:version`.
67

78
## v1.8.2 | 2023-11-17
89

conanfile.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010
# noinspection PyUnresolvedReferences
1111
class EmbeddedPython(ConanFile):
1212
name = "embedded_python"
13-
version = "1.9.0" # of the Conan package, `options.version` is the Python version
13+
version = "1.9.0" # of the Conan package, `embedded_python-core:version` is the Python version
1414
license = "PSFL"
1515
description = "Embedded distribution of Python"
1616
topics = "embedded", "python"
1717
homepage = "https://www.python.org/"
1818
url = "https://github.com/lumicks/embedded_python"
1919
settings = "os", "arch"
2020
options = {
21-
"version": ["ANY"],
2221
"packages": [None, "ANY"],
2322
"pip_version": ["ANY"],
2423
"pip_licenses_version": ["ANY"],
@@ -38,23 +37,20 @@ class EmbeddedPython(ConanFile):
3837
def requirements(self):
3938
self.requires(f"embedded_python-core/1.2.2@{self.user}/{self.channel}")
4039

41-
def configure(self):
42-
self.options["embedded_python-core"].version = self.options.version
43-
4440
@property
4541
def pyversion(self):
4642
"""Full Python version that we want to package, e.g. 3.11.3"""
47-
return scm.Version(self.options.version)
43+
return scm.Version(self.dependencies["embedded_python-core"].options.version)
4844

4945
@property
5046
def short_pyversion(self):
5147
"""The first two components of the version number, e.g. 3.11"""
52-
return scm.Version(".".join(str(self.options.version).split(".")[:2]))
48+
return scm.Version(".".join(str(self.pyversion).split(".")[:2]))
5349

5450
@property
5551
def int_pyversion(self):
5652
"""The first two components of the version number in integer form, e.g. 311"""
57-
return scm.Version("".join(str(self.options.version).split(".")[:2]))
53+
return scm.Version("".join(str(self.pyversion).split(".")[:2]))
5854

5955
@property
6056
def core_pkg(self):

test_package/conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TestEmbeddedPython(ConanFile):
2020
options = {"env": [None, "ANY"]}
2121
default_options = {
2222
"env": None,
23-
"embedded_python:version": "3.11.5",
23+
"embedded_python-core:version": "3.11.5",
2424
}
2525

2626
def configure(self):

0 commit comments

Comments
 (0)