replaced setup.py with setup.cfg file

modified .gitlab-ci.yml file to strip away "v" from git describe 
<commit> result
This commit is contained in:
Daniel Otto de Mentock 2022-04-25 12:00:54 +02:00
parent 553e16ffa3
commit b4c6ca64fc
3 changed files with 33 additions and 37 deletions

View File

@ -233,7 +233,8 @@ update_revision:
- cd $(mktemp -d)
- git clone -q git@git.damask.mpie.de:damask/DAMASK.git .
- git pull
- export VERSION=$(git describe ${CI_COMMIT_SHA})
- VERSION=$(git describe ${CI_COMMIT_SHA})
- export VERSION="${VERSION:1:-1}"
- echo ${VERSION} > python/damask/VERSION
- >
git diff-index --quiet HEAD ||

31
python/setup.cfg Normal file
View File

@ -0,0 +1,31 @@
[metadata]
name = damask
version = file: damask/VERSION
author = The DAMASK team
author_email = damask@mpie.de
url = https://damask.mpie.de
description = DAMASK processing tools
long_description = Pre- and post-processing tools for DAMASK
license: AGPL3
classifiers =
Intended Audience :: Science/Research
Topic :: Scientific/Engineering
Programming Language :: Python :: 3
License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Operating System :: OS Independent
[options]
packages = damask
zip_safe = false
include_package_data = true
python_requires = >= 3.8
install_requires =
importlib-metadata; python_version<"3.8"
pandas; python_version<="0.24" # requires numpy
numpy; python_version<="1.17" # needed for default_rng
scipy; python_version<="1.2"
h5py; python_version<="2.9" # requires numpy
vtk; python_version<="8.1"
matplotlib; python_version<="3.0" # requires numpy, pillow
pyyaml; python_version<="3.12"
setup_requires = setuptools

View File

@ -1,36 +0,0 @@
import setuptools
from pathlib import Path
import re
# https://www.python.org/dev/peps/pep-0440
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',
version=version,
author='The DAMASK team',
author_email='damask@mpie.de',
description='DAMASK processing tools',
long_description='Pre- and post-processing tools for DAMASK',
url='https://damask.mpie.de',
packages=setuptools.find_packages(),
include_package_data=True,
python_requires = '>=3.8',
install_requires = [
'pandas>=0.24', # requires numpy
'numpy>=1.17', # needed for default_rng
'scipy>=1.2',
'h5py>=2.9', # requires numpy
'vtk>=8.1',
'matplotlib>=3.0', # requires numpy, pillow
'pyyaml>=3.12'
],
classifiers = [
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Operating System :: OS Independent',
],
)