|
1 | 1 | #!/usr/bin/env python3 |
2 | 2 |
|
3 | | -import sys |
4 | 3 | from skbuild import setup |
5 | 4 |
|
6 | 5 |
|
7 | | -def compile_cxx_flags(): |
8 | | - cxx_flags = [] |
9 | | - |
10 | | - if sys.platform == 'win32': |
11 | | - # Old versions of CPython have a bug where "hypot" is defined as |
12 | | - # "_hypot". This definition conflicts with the one from math.h and as a |
13 | | - # result causes the following compile error in cmath using MinGW: |
14 | | - # cmath:1121:11: error: '::hypot' has not been declared |
15 | | - # using ::hypot; |
16 | | - # Issue and backport reference: https://github.com/python/cpython/pull/11283 |
17 | | - # Issue solved: https://github.com/python/cpython/blob/v3.7.3/PC/pyconfig.h |
18 | | - python_version = sys.version_info[:3] |
19 | | - if python_version < (3, 7, 3): |
20 | | - cxx_flags.append('-D_hypot=hypot') |
21 | | - |
22 | | - return cxx_flags |
23 | | - |
24 | | - |
25 | | -def compile_cmake_args(): |
26 | | - cmake_args = [] |
27 | | - |
28 | | - cxx_flags = compile_cxx_flags() |
29 | | - if cxx_flags: |
30 | | - cmake_args.append('-DCMAKE_CXX_FLAGS="' + ' '.join(cxx_flags) + '"') |
31 | | - |
32 | | - return cmake_args |
33 | | - |
34 | | - |
35 | 6 | setup(name='pico_tree', |
36 | 7 | # The same as the CMake project version. |
37 | | - version='0.7.4', |
| 8 | + version='0.7.5', |
38 | 9 | description='PicoTree Python Bindings', |
39 | 10 | author='Jonathan Broere', |
40 | 11 | url='https://github.com/Jaybro/pico_tree', |
41 | 12 | license='MIT', |
42 | 13 | packages=['pico_tree'], |
43 | 14 | package_dir={'': 'src/pyco_tree'}, |
44 | 15 | cmake_install_dir='src/pyco_tree/pico_tree', |
45 | | - cmake_args=compile_cmake_args(), |
46 | | - python_requires='>=3.7', |
| 16 | + python_requires='>=3.7.3', |
47 | 17 | install_requires=['numpy'], |
48 | 18 | ) |
0 commit comments