|
1 | 1 | #!/usr/bin/env python |
2 | 2 |
|
3 | | -# version: 0.2.5 |
| 3 | +# version: 0.2.6 |
4 | 4 | # Many thanks to simplejson for the idea on how to install c++-extention module optionally! |
5 | 5 | # https://pypi.python.org/pypi/simplejson/ |
6 | 6 |
|
7 | 7 | import os |
8 | 8 | import sys |
| 9 | +from ctypes.util import find_library |
9 | 10 | from distutils.command.build_ext import build_ext |
10 | 11 | from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError |
11 | 12 |
|
@@ -45,6 +46,9 @@ def read(fname): |
45 | 46 | boost_python_library = 'boost_python' |
46 | 47 | else: |
47 | 48 | boost_python_library = 'boost_python-py' + str(sys.version_info.major) + str(sys.version_info.minor) |
| 49 | + if not find_library(boost_python_library): |
| 50 | + # exact version not find, trying with major fit only as fallback |
| 51 | + boost_python_library = 'boost_python-py' + str(sys.version_info.major) |
48 | 52 |
|
49 | 53 | maxflow = Extension('medpy.graphcut.maxflow', |
50 | 54 | define_macros = [('MAJOR_VERSION', '0'), |
@@ -126,9 +130,8 @@ def run_setup(with_compilation): |
126 | 130 | #'Operating System :: Microsoft :: Windows', |
127 | 131 | 'Operating System :: POSIX', |
128 | 132 | 'Operating System :: Unix', |
129 | | - 'Programming Language :: Python :: 2', |
130 | | - 'Programming Language :: Python :: 2.6', |
131 | | - 'Programming Language :: Python :: 2.7', |
| 133 | + 'Programming Language :: Python :: 3.5', |
| 134 | + 'Programming Language :: Python :: 3.6', |
132 | 135 | 'Programming Language :: C++', |
133 | 136 | 'Topic :: Scientific/Engineering :: Medical Science Apps.', |
134 | 137 | 'Topic :: Scientific/Engineering :: Image Recognition' |
|
0 commit comments