From 7c6ce525a3bf020bb0956ab2f09f4c2480809230 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 19 Feb 2021 06:51:32 +0100 Subject: [PATCH] ask for minimum version --- DAMASK_prerequisites.sh | 6 +----- python/setup.py | 35 ++++++++++++++++++----------------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/DAMASK_prerequisites.sh b/DAMASK_prerequisites.sh index 25a2e46e0..181fd46b5 100755 --- a/DAMASK_prerequisites.sh +++ b/DAMASK_prerequisites.sh @@ -84,7 +84,7 @@ for executable in python python3; do done secondLevel "Details on $DEFAULT_PYTHON:" echo $(ls -la $(which $DEFAULT_PYTHON)) -for module in numpy scipy pandas;do +for module in numpy scipy pandas matplotlib yaml h5py;do thirdLevel $module $DEFAULT_PYTHON -c "import $module; \ print('Version: {}'.format($module.__version__)); \ @@ -94,10 +94,6 @@ thirdLevel vtk $DEFAULT_PYTHON -c "import vtk; \ print('Version: {}'.format(vtk.vtkVersion.GetVTKVersion())); \ print('Location: {}'.format(vtk.__file__))" -thirdLevel h5py -$DEFAULT_PYTHON -c "import h5py; \ - print('Version: {}'.format(h5py.version.version)); \ - print('Location: {}'.format(h5py.__file__))" firstLevel "GNU Compiler Collection" for executable in gcc g++ gfortran ;do diff --git a/python/setup.py b/python/setup.py index 19fbdcd13..3df226141 100644 --- a/python/setup.py +++ b/python/setup.py @@ -6,28 +6,29 @@ with open(Path(__file__).parent/'damask/VERSION') as f: version = re.sub(r'(-([^-]*)).*$',r'.\2',re.sub(r'^v(\d+\.\d+(\.\d+)?)',r'\1',f.readline().strip())) setuptools.setup( - name="damask", + name='damask', version=version, - author="The DAMASK team", - author_email="damask@mpie.de", - description="DAMASK library", - long_description="Python library for pre and post processing of DAMASK simulations", - url="https://damask.mpie.de", + author='The DAMASK team', + author_email='damask@mpie.de', + description='DAMASK library', + long_description='Python library for pre and post processing of DAMASK simulations', + url='https://damask.mpie.de', packages=setuptools.find_packages(), include_package_data=True, + python_requires = '>=3.6' install_requires = [ - "pandas", # requires numpy - "scipy", - "h5py", # requires numpy - "vtk", - "matplotlib", # requires numpy, pillow - "pyaml" + 'pandas>=0.24', # requires numpy + 'scipy>=1.2', + 'h5py>=2.9', # requires numpy + 'vtk>=8.1', + 'matplotlib>=3.0', # requires numpy, pillow + 'pyaml>=3.12' ], classifiers = [ - "Intended Audience :: Science/Research", - "Topic :: Scientific/Engineering", - "Programming Language :: Python :: 3", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Operating System :: OS Independent", + 'Intended Audience :: Science/Research', + 'Topic :: Scientific/Engineering', + 'Programming Language :: Python :: 3', + 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', + 'Operating System :: OS Independent', ], )