diff --git a/.github/workflows/Python.yml b/.github/workflows/Python.yml index 2f2a5d111..1e0fa4a76 100644 --- a/.github/workflows/Python.yml +++ b/.github/workflows/Python.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest pandas scipy h5py vtk matplotlib pyyaml + pip install pytest pandas scipy h5py vtk matplotlib pyyaml build - name: Strip git hash (Unix) if: runner.os != 'Windows' @@ -39,6 +39,13 @@ jobs: $VERSION,$_ = $VERSION -Split '-g',2,"simplematch" $VERSION | Out-File VERSION + - name: Build and Install + run: | + cd python + python -m build + python -m pip install dist/*.whl + python -c 'import damask;print(damask.__version__)' + - name: Install and run unit tests (Unix) if: runner.os != 'Windows' run: | diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index faaf66564..735335391 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,13 @@ create_testroot: ################################################################################################### +setuptools: + stage: python + script: + - sed -i 's/-[[:digit:]]*-.*//' VERSION + - cd python + - python3 -m build --wheel --no-isolation + pytest: stage: python script: diff --git a/python/setup.cfg b/python/setup.cfg index dd16cbf28..e183e6b3f 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -19,12 +19,11 @@ packages = find: 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" + 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 setup_requires = setuptools