@@ -88,10 +88,9 @@ def pyver(self):
88
88
"""Two-digit integer version, e.g. 3.7.3 -> 37"""
89
89
return "" .join (self .pyversion .split ("." )[:2 ])
90
90
91
-
92
91
def make_package_list (self ):
93
92
"""Create a list of package names based on `self.options.packages`
94
-
93
+
95
94
For details of the `self.options.packages` format see `make_requirements_file`
96
95
"""
97
96
@@ -107,8 +106,7 @@ def split_lines(string):
107
106
return string .split (" " )
108
107
109
108
packages_str = str (self .options .packages ).strip ()
110
- return split_lines (packages_str )
111
-
109
+ return split_lines (packages_str )
112
110
113
111
def make_requirements_file (self , extra_packages = None ):
114
112
"""Create a `requirements.txt` based on `self.options.packages` and return its path
@@ -155,7 +153,6 @@ def _gather_packages(self):
155
153
with open ("packages.txt" , "w" ) as output :
156
154
output .write ("\n " .join (package_names ))
157
155
158
-
159
156
def source (self ):
160
157
replace_in_file (self , "embedded_python.cmake" , "${self.pyversion}" , str (self .pyversion ))
161
158
@@ -303,6 +300,7 @@ def _openssl_path(self):
303
300
304
301
def generate (self ):
305
302
from conan .tools .gnu import AutotoolsToolchain , AutotoolsDeps
303
+
306
304
tc = AutotoolsToolchain (self .conanfile , prefix = self .prefix )
307
305
tc .configure_args .extend (["--enable-shared" , f"--with-openssl={ self ._openssl_path } " ])
308
306
tc .generate ()
@@ -320,21 +318,24 @@ def generate(self):
320
318
# the LD_LIBRARY_PATH env variable which is not at all what we want for this self-contained
321
319
# package. Unlike RUNPATH, RPATH takes precedence over LD_LIBRARY_PATH.
322
320
if self .conanfile .settings .os == "Linux" :
323
- deps .environment .append ("LDFLAGS" , ["-Wl,-rpath='\$\$ORIGIN/../lib'" , "-Wl,--disable-new-dtags" ])
321
+ deps .environment .append (
322
+ "LDFLAGS" , ["-Wl,-rpath='\$\$ORIGIN/../lib'" , "-Wl,--disable-new-dtags" ]
323
+ )
324
324
325
325
deps .generate ()
326
326
327
327
def build (self ):
328
328
from conan .tools .gnu import Autotools
329
+
329
330
autotools = Autotools (self .conanfile )
330
331
autotools .configure ()
331
332
autotools .make ()
332
333
333
334
def install (self ):
334
335
from conan .tools .gnu import Autotools
336
+
335
337
autotools = Autotools (self .conanfile )
336
- autotools .install (
337
- args = ["DESTDIR=''" ]) # already handled by `prefix=dest_dir`
338
+ autotools .install (args = ["DESTDIR=''" ]) # already handled by `prefix=dest_dir`
338
339
339
340
ver = "." .join (self .conanfile .pyversion .split ("." )[:2 ])
340
341
exe = str (self .prefix / f"bin/python{ ver } " )
@@ -372,7 +373,7 @@ def _patch_libpython_path(self, exe):
372
373
373
374
buffer = StringIO ()
374
375
self .conanfile .run (f"otool -L { exe } " , output = buffer )
375
- lines = buffer .getvalue ().strip ().split (' \n ' )[1 :]
376
+ lines = buffer .getvalue ().strip ().split (" \n " )[1 :]
376
377
libraries = [line .split ()[0 ] for line in lines ]
377
378
378
379
prefix = str (self .prefix )
0 commit comments