1010# noinspection PyUnresolvedReferences
1111class 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 ):
0 commit comments