From ca622094795d47cfa173bca1a54eb7076e532d10 Mon Sep 17 00:00:00 2001 From: Ivo Steinbrecher Date: Wed, 30 Apr 2025 15:37:56 +0200 Subject: [PATCH 1/6] Working with pip -m build --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..2f86934b --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include src/meshpy/geometric_search/cython_lib.pyx From d74e07c4e0a5cb0fe013b739c17734df7f2cbe5e Mon Sep 17 00:00:00 2001 From: Ivo Steinbrecher Date: Mon, 5 May 2025 08:35:01 +0200 Subject: [PATCH 2/6] Add build wheel action --- .github/actions/build_wheel/action.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/actions/build_wheel/action.yml diff --git a/.github/actions/build_wheel/action.yml b/.github/actions/build_wheel/action.yml new file mode 100644 index 00000000..277b0a6a --- /dev/null +++ b/.github/actions/build_wheel/action.yml @@ -0,0 +1,23 @@ +name: build_wheel +description: Build the MeshPy wheel +inputs: + source-command: + description: Command to source the virtual environment + required: false + default: "" +runs: + using: composite + steps: + - name: Build MeshPy wheel + shell: bash + run: | + cd ${GITHUB_WORKSPACE} + ${{ inputs.source-command }} + pip -m build + # Check if we got exactly one wheel file + shopt -s nullglob + files=(dist/*.whl) + if [ ${#files[@]} -ne 1 ]; then + echo "Expected exactly one .whl file in dist/, found ${#files[@]}" + exit 1 + fi From c7ca02b39c57734be0d8528995a50065ce39bcad Mon Sep 17 00:00:00 2001 From: Ivo Steinbrecher Date: Mon, 5 May 2025 08:40:15 +0200 Subject: [PATCH 3/6] Install meshpy from wheel in testing --- .github/actions/build_wheel/action.yml | 3 ++- .github/workflows/testing.yml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/build_wheel/action.yml b/.github/actions/build_wheel/action.yml index 277b0a6a..67dafdff 100644 --- a/.github/actions/build_wheel/action.yml +++ b/.github/actions/build_wheel/action.yml @@ -13,7 +13,8 @@ runs: run: | cd ${GITHUB_WORKSPACE} ${{ inputs.source-command }} - pip -m build + pip install build + python -m build # Check if we got exactly one wheel file shopt -s nullglob files=(dist/*.whl) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d7fcd5d9..fb7731db 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -30,6 +30,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Build wheel + uses: ./.github/actions/build_wheel + if: matrix.python-version == '3.12' - name: Run the test suite uses: ./.github/actions/run_tests with: @@ -37,7 +40,7 @@ jobs: # non-editable installation and turn of coverage, because the coverage # only works in editable mode. install-command: >- - ${{ matrix.python-version == '3.10' && '-e .[dev]' || '.[dev]'}} + ${{ matrix.python-version == '3.10' && '-e .[dev]' || '"$(ls dist/*.whl | head -n 1)[dev]"'}} # The single space in the empty string is required, otherwise GitHub # evaluates the if clause wrong. additional-pytest-flags: >- From 9d312ed31ac6f35691ee5fa0687990240301b174 Mon Sep 17 00:00:00 2001 From: Ivo Steinbrecher Date: Fri, 16 May 2025 10:41:16 +0200 Subject: [PATCH 4/6] Change name and add version --- pyproject.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 53c3db05..d626330e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,8 @@ requires = ["setuptools", "wheel", "cython", "numpy"] build-backend = "setuptools.build_meta" [project] -name = "MeshPy" -description = "MeshPy: A general purpose 3D beam finite element input generator" +name = "BeamMe" +description = "BeamMe: A general purpose 3D beam finite element input generator" authors = [{name = "MeshPy Authors"}] maintainers = [ {name = "Ivo Steinbrecher", email = "ivo.steinbrecher@unibw.de"}, @@ -25,8 +25,7 @@ dependencies = [ "vedo==2024.5.2", # Needed as a fix for the splinepy visualization tool gustaf "vtk" ] - -dynamic = ["version"] +version = "0.0.0" [project.optional-dependencies] cubitpy = ["cubitpy@git+https://github.com/imcs-compsim/cubitpy.git@main"] From 9313a30abd906fbbe98d033bf24e33b269470fad Mon Sep 17 00:00:00 2001 From: Ivo Steinbrecher Date: Fri, 16 May 2025 13:06:20 +0200 Subject: [PATCH 5/6] Remove packages not on pypi --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d626330e..319db9a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,8 +28,6 @@ dependencies = [ version = "0.0.0" [project.optional-dependencies] -cubitpy = ["cubitpy@git+https://github.com/imcs-compsim/cubitpy.git@main"] -fourc = ["fourcipp@git+https://github.com/4c-multiphysics/fourcipp.git@main"] dev = [ "coverage-badge", "coverage", @@ -37,7 +35,6 @@ dev = [ "pre-commit", "pytest", "pytest-cov", - "pyvista_utils@git+https://github.com/isteinbrecher/pyvista_utils.git@main", "testbook" ] From 5eba30b1267204f80b10f6031e647364721cd2c0 Mon Sep 17 00:00:00 2001 From: Ivo Steinbrecher Date: Fri, 16 May 2025 13:11:17 +0200 Subject: [PATCH 6/6] Use lowercase name to improve the typesetting in pypiy --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 319db9a6..072c4e94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel", "cython", "numpy"] build-backend = "setuptools.build_meta" [project] -name = "BeamMe" +name = "beamme" description = "BeamMe: A general purpose 3D beam finite element input generator" authors = [{name = "MeshPy Authors"}] maintainers = [ @@ -25,7 +25,7 @@ dependencies = [ "vedo==2024.5.2", # Needed as a fix for the splinepy visualization tool gustaf "vtk" ] -version = "0.0.0" +version = "0.0.1" [project.optional-dependencies] dev = [