|
15 | 15 | #
|
16 | 16 | if os.getenv('PYTHON_FLINT_MINGW64'):
|
17 | 17 | libraries = ["arb", "flint", "mpfr", "gmp"]
|
18 |
| - # |
19 |
| - # Add the libpythonXXX.a file to Python installation |
20 |
| - # |
21 |
| - |
22 |
| - # e.g. finding the shared libs (dll/so) our python process loaded so far ... |
23 |
| - #import psutil, os |
24 |
| - #p = psutil.Process( os.getpid() ) |
25 |
| - #for dll in p.memory_maps(): |
26 |
| - # print(dll.path) |
27 |
| - |
28 |
| - #PYTHONDIR = os.path.dirname(sys.executable) |
29 |
| - #PYTHONDIR = r'C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\python.3.9.13\tools' |
30 |
| - #VER = '%s%s' % sys.version_info[:2] |
31 |
| - #commands = f""" |
32 |
| - #msys2 -c ls |
33 |
| - #msys2 -c gendef python{VER}.dll |
34 |
| - #msys2 -c ls |
35 |
| - #msys2 -c dlltool --dllname python{VER}.dll --def python{VER}.def --output-lib libpython{VER}.a |
36 |
| - #msys2 -c mv libpython{VER}.a libs |
37 |
| - #msys2 -c echo "$C_INCLUDE_DIR" |
38 |
| - #""" |
39 |
| - #for cmd in commands.strip().splitlines(): |
40 |
| - #print(cmd.split()) |
41 |
| - #check_call(cmd.split(), cwd=PYTHONDIR) |
42 |
| - #print(__file__) |
43 | 18 | includedir = os.path.join(os.path.dirname(__file__), '.local', 'include')
|
44 | 19 | librarydir1 = os.path.join(os.path.dirname(__file__), '.local', 'bin')
|
45 | 20 | librarydir2 = os.path.join(os.path.dirname(__file__), '.local', 'lib')
|
46 | 21 | librarydirs = [librarydir1, librarydir2]
|
47 |
| - #print(includedir) |
48 | 22 | default_include_dirs += [includedir]
|
49 |
| - #print(os.listdir(includedir)) |
50 |
| - #print(os.listdir(librarydir1)) |
51 |
| - #print(os.listdir(librarydir2)) |
52 | 23 | default_lib_dirs += librarydirs
|
| 24 | + # Add gcc to the PATH in GitHub Actions when this setup.py is called by |
| 25 | + # cibuildwheel. |
53 | 26 | os.environ['PATH'] += r';C:\msys64\mingw64\bin'
|
54 |
| - #print(default_lib_dirs) |
55 | 27 | elif os.getenv('PYTHON_FLINT_MINGW64_TMP'):
|
| 28 | + # This would be used to build under Windows against these libraries if |
| 29 | + # they have been installed somewhere other than .local |
56 | 30 | libraries = ["arb", "flint", "mpfr", "gmp"]
|
57 | 31 | else:
|
58 |
| - # For the MSVC toolchain with mpir instead of gmp |
| 32 | + # For the MSVC toolchain link with mpir instead of gmp |
59 | 33 | libraries = ["arb", "flint", "mpir", "mpfr", "pthreads"]
|
60 | 34 | else:
|
61 | 35 | libraries = ["arb", "flint"]
|
|
0 commit comments