diff --git a/.github/actions/build_wheel/action.yml b/.github/actions/build_wheel/action.yml new file mode 100644 index 00000000..67dafdff --- /dev/null +++ b/.github/actions/build_wheel/action.yml @@ -0,0 +1,24 @@ +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 install build + python -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 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: >- 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 diff --git a/pyproject.toml b/pyproject.toml index 53c3db05..072c4e94 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,12 +25,9 @@ dependencies = [ "vedo==2024.5.2", # Needed as a fix for the splinepy visualization tool gustaf "vtk" ] - -dynamic = ["version"] +version = "0.0.1" [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", @@ -38,7 +35,6 @@ dev = [ "pre-commit", "pytest", "pytest-cov", - "pyvista_utils@git+https://github.com/isteinbrecher/pyvista_utils.git@main", "testbook" ]