Files
scikit-image/setup.py
T
Steven Silvester adac822ee9 Fix setup to allow installing from PyPI
≈
Fix setup to allow installing from PyPi
Another attempt at fixing the setuptools problem

Fix pip incantation

Fix typo

Try updating setuptools too

Try upgrading pip and setuptools after venv install

Rule out install_requires as the source of the problem

Try just requiring the ones that can be built from source

Use explicit install_requires and move version checks to after setup runs

Clean up installation for PyPI compatiblity

Dead end commit

Fix travis to match new installation procedure

Put build_versions check after install

Fix travis syntax

Switch to lower-case cython in version check

Another attempt

Another fix

Fix syntax error

Make header executable

Build inplace on py27

Fix finding of source code version in sphinx

Fix travis syntax

Import setuptools after install

Fix the version check in sphinx

Work around setuptools bug in 2.7

Fix handling of Cython requirement and update release notes

Switch to one Appveyor build and update build method

Add cython back to install_requires

Remove debug lines

Another try for appveyor install

Another attempt at setuptools and Appveyor

Do not let intermittent apt-get failures crash the build

Fix typo

Another appveyor attempt

More fixes for setuptools and Appveyor

Yet another setuptools/appveyor attempt

Put requirements.txt back in order

Fix typo

Fix readlines function call

Try not using a venv for python 2.7

Fix syntax

Try the provided venv for py27

Remove --user

Remove debug info

Another try for python27 fix

Try again

Do not use install_requires with numpy/scipy

Try just avoiding scipy

Try removing scipy (numpy was before)

Avoid both scipy and numpy

Fix qt install on 27

Fix qt install on 27 agin

Revert the scripts to their previous condition

Revert file permission changes

Undo changes to requirements.txt
2015-03-29 15:36:11 -05:00

121 lines
3.7 KiB
Python

#! /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'
import os
import sys
import setuptools
from distutils.command.build_py import build_py
with open('skimage/__init__.py') as fid:
for line in fid:
if line.startswith('__version__'):
VERSION = line.strip().split()[-1][1:-1]
break
with open('requirements.txt') as fid:
INSTALL_REQUIRES = [l.strip() for l in fid.readlines() if l]
# development versions do not have the cythonized files
if VERSION.endswith('dev'):
SETUP_REQUIRES = [r for r in INSTALL_REQUIRES if r.startswith('cython')]
else:
INSTALL_REQUIRES = [r for r in INSTALL_REQUIRES
if not r.startswith('cython')]
SETUP_REQUIRES = []
# list requirements for PyPI
REQUIRES = [r.replace('>=', ' (>= ') + ')'
for r in INSTALL_REQUIRES + SETUP_REQUIRES]
REQUIRES = [r.replace('==', ' (== ') for r in REQUIRES]
# do not attempt to install numpy and scipy until they have eggs available
INSTALL_REQUIRES = [r for r in INSTALL_REQUIRES
if not r.startswith(('scipy', 'numpy'))]
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
if __name__ == "__main__":
# purposely fail loudly if numpy or scipy are not available
from numpy.distutils.core import setup
import scipy
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,
setup_requires=SETUP_REQUIRES,
install_requires=INSTALL_REQUIRES,
requires=REQUIRES,
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},
)