Index: wflow-py/setup.py =================================================================== diff -u -r5a61603915d87c16ec04d083c314805c86318984 -ra8d604bbbafdb423ab3e8a21ed4db37e4d8ab032 --- wflow-py/setup.py (.../setup.py) (revision 5a61603915d87c16ec04d083c314805c86318984) +++ wflow-py/setup.py (.../setup.py) (revision a8d604bbbafdb423ab3e8a21ed4db37e4d8ab032) @@ -1,66 +1,47 @@ import os +from setuptools import setup +import versioneer +# since pcraster cannot be installed with pip, we check it like this try: - from setuptools import setup -except ImportError: - from distutils.core import setup -from setuptools import find_packages -here = os.path.abspath(os.path.dirname(__file__)) - -README = open(os.path.join(here, '../README.rst')).read() -TODO = open(os.path.join(here, 'TODO.txt')).read() - - - -try: - import osgeo -except: - print("Could not import osgeo (gdal), make sure it is installed") - -try: - import netCDF4 -except: - print("Could not import netCDF4, make sure it is installed") - -try: import pcraster except: - print("Could not import pcraster, make sure it is installed including the python extensions") + print( + "Could not import pcraster, make sure it is installed including the python extensions" + ) print("see www.pcraster.eu") -try: - import pyproj -except: - print("Could not import pyproj, make sure it is installed") +here = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(here, "../README.rst")) as f: + README = f.read() -try: - import matplotlib -except: - print("Could not import matplotlib, make sure it is installed") - -try: - import versioneer -except: - print("Could not import versioneer, make sure it is installed") - -# Source dist -setup(name='wflow',version=versioneer.get_version().split('+')[0], - cmdclass=versioneer.get_cmdclass(), - #version= MVERSION, - packages=['wflow','wflow.pcrglobwb','wflow.sphy','wflow.wrappers.rtc'], - package_dir={'wflow': 'wflow'}, - author='J. Schellekens', - author_email='jaap.schellekens@deltares.nl', - url='http://www.openstreams.nl', - license = "GPL", - zip_safe = False, - scripts=['Scripts/pcr2netcdf.py','Scripts/tss2xml.py','Scripts/wflow_subcatch.py', - 'wflow/wflow_extract.py','wflow/wflow_sceleton.py', - 'wflow/wflow_gr4.py','wflow/plottss.py','wflow/wflow_wave.py', 'wflow/wflow_topoflex.py', - 'wflow/wflow_cqf.py','wflow/wflow_floodmap.py','wflow/wflow_upscale.py', - 'wflow/wflow_fit.py','wflow/wflow_adapt.py','wflow/wflow_delwaq.py', - 'Scripts/wflow_prepare_step1.py','Scripts/wflow_prepare_step2.py', - 'wflow/wflow_sbm.py','wflow/wflow_hbv.py','wflow/wflow_w3ra.py', - 'wflow/wflow_upscale.py','wflow/wflow_routing.py','Scripts/bmi2runner.py'], - description='the wflow hydrological models (part of OpenStreams)', - ) \ No newline at end of file +setup( + name='wflow', + description='the wflow hydrological models (part of OpenStreams)', + long_description=README, + author='J. Schellekens', + author_email='jaap.schellekens@deltares.nl', + url='http://wflow.readthedocs.io/en/latest/', + license="GPL", + python_requires=">=3.6", + install_requires=[ + 'numpy', + 'osgeo', + 'netCDF4', + 'pyproj', + ], + version=versioneer.get_version().split('+')[0], + cmdclass=versioneer.get_cmdclass(), + packages=['wflow', 'wflow.pcrglobwb', + 'wflow.sphy', 'wflow.wrappers.rtc'], + package_dir={'wflow': 'wflow'}, + zip_safe=False, + scripts=['Scripts/pcr2netcdf.py', 'Scripts/tss2xml.py', 'Scripts/wflow_subcatch.py', + 'wflow/wflow_extract.py', 'wflow/wflow_sceleton.py', + 'wflow/wflow_gr4.py', 'wflow/plottss.py', 'wflow/wflow_wave.py', 'wflow/wflow_topoflex.py', + 'wflow/wflow_cqf.py', 'wflow/wflow_floodmap.py', 'wflow/wflow_upscale.py', + 'wflow/wflow_fit.py', 'wflow/wflow_adapt.py', 'wflow/wflow_delwaq.py', + 'Scripts/wflow_prepare_step1.py', 'Scripts/wflow_prepare_step2.py', + 'wflow/wflow_sbm.py', 'wflow/wflow_hbv.py', 'wflow/wflow_w3ra.py', + 'wflow/wflow_upscale.py', 'wflow/wflow_routing.py', 'Scripts/bmi2runner.py'], +)