Commit 7224428a authored by payno's avatar payno

[setup] remove numpy dependancy and clean up the setup.py file

parent 4220c94c
......@@ -42,10 +42,8 @@ try:
logger.info("Use setuptools")
except ImportError:
try:
from numpy.distutils.core import Command
except ImportError:
from distutils.core import Command
from distutils.core import Command
cmdclass = {'build_sphinx': BuildDoc}
......@@ -121,63 +119,6 @@ else:
PACKAGES = find_packages()
def configuration(parent_package='', top_path=None):
"""Recursive construction of package info to be used in setup().
See http://docs.scipy.org/doc/numpy/reference/distutils.html#numpy.distutils.misc_util.Configuration
"""
try:
from numpy.distutils.misc_util import Configuration
except ImportError:
raise ImportError(
"To install this package, you must install numpy first\n"
"(See https://pypi.python.org/pypi/numpy)")
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(PROJECT)
return config
def get_project_configuration(dry_run):
"""Returns project arguments for setup"""
install_requires = ["python-dateutil"]
setup_requires = ["setuptools", "numpy"]
package_data = {
}
entry_points = {
}
cmdclass = dict(
build_doc=BuildDocCommand)
config = configuration()
setup_kwargs = config.todict()
setup_kwargs.update(name=PROJECT,
version=VERSION,
url="https://gitlab.esrf.fr/denolf/oarpy",
author="Wout De Nolf",
author_email="wout.de_nolf@esrf.fr",
classifiers=classifiers,
description="Python binding for OAR",
long_description=get_readme(),
packages=PACKAGES,
install_requires=install_requires,
setup_requires=setup_requires,
cmdclass=cmdclass,
package_data=package_data,
zip_safe=False,
entry_points=entry_points,
)
return setup_kwargs
def setup_package():
"""Run setup(**kwargs)
......@@ -206,13 +147,21 @@ def setup_package():
from numpy.distutils.core import setup
logger.info("Use numpydistutils.setup")
setup_kwargs = get_project_configuration(dry_run)
setup(**setup_kwargs)
setup(name=PROJECT,
version=VERSION,
url="https://gitlab.esrf.fr/denolf/oarpy",
author="Wout De Nolf",
author_email="wout.de_nolf@esrf.fr",
classifiers=classifiers,
description="Python binding for OAR",
long_description=get_readme(),
packages=PACKAGES,
install_requires=["python-dateutil", ],
setup_requires=["setuptools",],
cmdclass=cmdclass,
zip_safe=False,
)
DATA_FILES = [
# Data files that will be installed outside site-packages folder
]
if __name__ == "__main__":
setup_package()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment