From 8caf09aff7c593ff84906e214d787633eaea33de Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 12 Oct 2022 08:01:33 +0200 Subject: [PATCH 1/5] correct inclusion of dependencies --- python/setup.cfg | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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 From 3650553fdf1ffdbcaf371b9b5c2bdac298d81874 Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Thu, 13 Oct 2022 12:55:40 +0200 Subject: [PATCH 2/5] venv not required for build --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index faaf66564..b9b3c7d97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,12 @@ create_testroot: ################################################################################################### +setuptools: + stage: python + script: + - cd python + - python3 -m build --wheel --no-isolation + pytest: stage: python script: From a0cb7dced4d2b094ff2b4ba0593782d7063e8cd3 Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Thu, 13 Oct 2022 13:00:05 +0200 Subject: [PATCH 3/5] damask version needs to comply to PEP440 standards --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9b3c7d97..735335391 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,6 +66,7 @@ create_testroot: setuptools: stage: python script: + - sed -i 's/-[[:digit:]]*-.*//' VERSION - cd python - python3 -m build --wheel --no-isolation From 351d81cfe541137ec37c4dc293cffb68da2b49fe Mon Sep 17 00:00:00 2001 From: Daniel Otto de Mentock Date: Thu, 13 Oct 2022 13:01:42 +0200 Subject: [PATCH 4/5] python package needs to be built after every push to development/master --- .github/workflows/Python.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Python.yml b/.github/workflows/Python.yml index 2f2a5d111..eeb97682a 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,14 @@ jobs: $VERSION,$_ = $VERSION -Split '-g',2,"simplematch" $VERSION | Out-File VERSION + - name: Build and Install + if: runner.os != 'Windows' + 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: | From 21230613c00e793b1d7885d0b3432ffd5ec8d77b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 19 Oct 2022 20:12:13 +0200 Subject: [PATCH 5/5] should work on Windows --- .github/workflows/Python.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/Python.yml b/.github/workflows/Python.yml index eeb97682a..1e0fa4a76 100644 --- a/.github/workflows/Python.yml +++ b/.github/workflows/Python.yml @@ -40,7 +40,6 @@ jobs: $VERSION | Out-File VERSION - name: Build and Install - if: runner.os != 'Windows' run: | cd python python -m build