mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 20:06:43 +08:00
5ef665a0b4
* tag 'v0.9.3': (164 commits) Set version to 0.9.3 Merge pull request #796 from ahojnnes/warp-fix Set version to 0.9.2 for second try at PyPi upload. Set version to 0.9.1. Add missing files to MANIFEST for sdist upload. Update manifest not to include gh-pages in docs. Get rid of that inherited 's' once and for all. Update docversions correctly for 0.9.x. Mark BRIEF and Censure as experimental in release notes. Update gh-pages instructions in RELEASE.txt. Fix markup error in marching cubes docs. Correctly determine version number from module. Update version in docs. Update versions for 0.9.0 release. Update 0.9 release notes with new features. Contrib script now shows PRs and merges. Update contributors script to count by date. Speed up memory views in watershed function Speed up memory views in skeletonize function Speed up memory views in line drawing function ...
148 lines
4.2 KiB
Python
Executable File
148 lines
4.2 KiB
Python
Executable File
#! /usr/bin/env python
|
|
|
|
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://scikit-image.org/
|
|
"""
|
|
|
|
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://scikit-image.org'
|
|
LICENSE = 'Modified BSD'
|
|
DOWNLOAD_URL = 'http://github.com/scikit-image/scikit-image'
|
|
VERSION = '0.9.3'
|
|
PYTHON_VERSION = (2, 5)
|
|
DEPENDENCIES = {
|
|
'numpy': (1, 6),
|
|
'Cython': (0, 17),
|
|
}
|
|
|
|
|
|
import os
|
|
import sys
|
|
import re
|
|
import setuptools
|
|
from numpy.distutils.core import setup
|
|
from distutils.command.build_py import build_py
|
|
|
|
|
|
def configuration(parent_package='', top_path=None):
|
|
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
|
|
|
|
from numpy.distutils.misc_util import Configuration
|
|
config = Configuration(None, parent_package, top_path)
|
|
|
|
config.set_options(
|
|
ignore_setup_xxx_py=True,
|
|
assume_default_configuration=True,
|
|
delegate_options_to_subpackages=True,
|
|
quiet=True)
|
|
|
|
config.add_subpackage('skimage')
|
|
config.add_data_dir('skimage/data')
|
|
|
|
return config
|
|
|
|
|
|
def write_version_py(filename='skimage/version.py'):
|
|
template = """# THIS FILE IS GENERATED FROM THE SKIMAGE SETUP.PY
|
|
version='%s'
|
|
"""
|
|
|
|
vfile = open(os.path.join(os.path.dirname(__file__),
|
|
filename), 'w')
|
|
|
|
try:
|
|
vfile.write(template % VERSION)
|
|
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(
|
|
name=DISTNAME,
|
|
description=DESCRIPTION,
|
|
long_description=LONG_DESCRIPTION,
|
|
maintainer=MAINTAINER,
|
|
maintainer_email=MAINTAINER_EMAIL,
|
|
url=URL,
|
|
license=LICENSE,
|
|
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',
|
|
],
|
|
|
|
configuration=configuration,
|
|
|
|
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'],
|
|
},
|
|
|
|
cmdclass={'build_py': build_py},
|
|
)
|