mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-10 04:02:43 +08:00
Fix setup merge conflict
This commit is contained in:
@@ -1,25 +1,32 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
descr = """Image Processing SciKit
|
||||
descr = """Image Processing SciKit
|
||||
|
||||
Image processing algorithms for SciPy, including IO, morphology, filtering,
|
||||
warping, color manipulation, object detection, etc.
|
||||
|
||||
Please refer to the online documentation at
|
||||
http://scikits-image.org/
|
||||
http://scikit-image.org/
|
||||
"""
|
||||
|
||||
DISTNAME = 'scikits-image'
|
||||
DISTNAME = 'scikit-image'
|
||||
DESCRIPTION = 'Image processing routines for SciPy'
|
||||
LONG_DESCRIPTION = descr
|
||||
MAINTAINER = 'Stefan van der Walt'
|
||||
MAINTAINER_EMAIL = 'stefan@sun.ac.za'
|
||||
URL = 'http://scikits-image.org'
|
||||
URL = 'http://scikit-image.org'
|
||||
LICENSE = 'Modified BSD'
|
||||
DOWNLOAD_URL = 'http://github.com/scikits-image/scikits-image'
|
||||
VERSION = '0.6.1'
|
||||
DOWNLOAD_URL = 'http://github.com/scikit-image/scikit-image'
|
||||
VERSION = '0.8.0'
|
||||
PYTHON_VERSION = (2, 5)
|
||||
DEPENDENCIES = {
|
||||
'numpy': (1, 6),
|
||||
'Cython': (0, 15),
|
||||
}
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import setuptools
|
||||
from numpy.distutils.core import setup
|
||||
try:
|
||||
@@ -27,6 +34,7 @@ try:
|
||||
except ImportError:
|
||||
from distutils.command.build_py import build_py
|
||||
|
||||
|
||||
def configuration(parent_package='', top_path=None):
|
||||
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
|
||||
|
||||
@@ -44,6 +52,7 @@ def configuration(parent_package='', top_path=None):
|
||||
|
||||
return config
|
||||
|
||||
|
||||
def write_version_py(filename='skimage/version.py'):
|
||||
template = """# THIS FILE IS GENERATED FROM THE SKIMAGE SETUP.PY
|
||||
version='%s'
|
||||
@@ -57,7 +66,46 @@ version='%s'
|
||||
finally:
|
||||
vfile.close()
|
||||
|
||||
|
||||
def get_package_version(package):
|
||||
version = []
|
||||
for version_attr in ('version', 'VERSION', '__version__'):
|
||||
if hasattr(package, version_attr) \
|
||||
and isinstance(getattr(package, version_attr), str):
|
||||
version_info = getattr(package, version_attr, '')
|
||||
for part in re.split('\D+', version_info):
|
||||
try:
|
||||
version.append(int(part))
|
||||
except ValueError:
|
||||
pass
|
||||
return tuple(version)
|
||||
|
||||
|
||||
def check_requirements():
|
||||
if sys.version_info < PYTHON_VERSION:
|
||||
raise SystemExit('You need Python version %d.%d or later.' \
|
||||
% PYTHON_VERSION)
|
||||
|
||||
for package_name, min_version in DEPENDENCIES.items():
|
||||
dep_error = False
|
||||
try:
|
||||
package = __import__(package_name)
|
||||
except ImportError:
|
||||
dep_error = True
|
||||
else:
|
||||
package_version = get_package_version(package)
|
||||
if min_version > package_version:
|
||||
dep_error = True
|
||||
|
||||
if dep_error:
|
||||
raise ImportError('You need `%s` version %d.%d or later.' \
|
||||
% ((package_name, ) + min_version))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
check_requirements()
|
||||
|
||||
write_version_py()
|
||||
|
||||
setup(
|
||||
@@ -71,32 +119,31 @@ if __name__ == "__main__":
|
||||
download_url=DOWNLOAD_URL,
|
||||
version=VERSION,
|
||||
|
||||
classifiers =
|
||||
[ 'Development Status :: 4 - Beta',
|
||||
'Environment :: Console',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: Science/Research',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: C',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Topic :: Scientific/Engineering',
|
||||
'Operating System :: Microsoft :: Windows',
|
||||
'Operating System :: POSIX',
|
||||
'Operating System :: Unix',
|
||||
'Operating System :: MacOS',
|
||||
],
|
||||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'Environment :: Console',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: Science/Research',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: C',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Topic :: Scientific/Engineering',
|
||||
'Operating System :: Microsoft :: Windows',
|
||||
'Operating System :: POSIX',
|
||||
'Operating System :: Unix',
|
||||
'Operating System :: MacOS',
|
||||
],
|
||||
|
||||
configuration=configuration,
|
||||
install_requires=[],
|
||||
packages=setuptools.find_packages(),
|
||||
|
||||
packages=setuptools.find_packages(exclude=['doc']),
|
||||
include_package_data=True,
|
||||
zip_safe=False, # the package can run out of an .egg file
|
||||
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'skivi = skimage.scripts.skivi:main']
|
||||
},
|
||||
'console_scripts': ['skivi = skimage.scripts.skivi:main'],
|
||||
},
|
||||
|
||||
cmdclass={'build_py': build_py},
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user