Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for numpy 2.0 #69

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-14, macos-13]

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.20.0

- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
Expand Down
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ demonstrate how to accomplish this with TetGen and PyVista:
for i in range(background_mesh.n_points):
mtr_content.append(f"{target_size[i]:.8f}")

pv.save_meshio(f"{out_stem}.node", background_mesh)
mtr_file = f"{out_stem}.mtr"

with open(mtr_file, "w") as f:
f.write("\n".join(mtr_content))

write_background_mesh(bg_mesh, 'bgmesh.b')

3. **Use TetGen with the Background Mesh**:
Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [
"setuptools>=42",
"wheel>=0.33.0",
"cython>=3.0.0",
"oldest-supported-numpy"
"numpy>=2,<3",
]

build-backend = "setuptools.build_meta"
Expand All @@ -18,14 +18,12 @@ filterwarnings = [

[tool.cibuildwheel]
archs = ["auto64"] # 64-bit only
skip = "pp* *musllinux* cp37-*" # disable PyPy, musl-based wheels, and Python < 3.8
skip = "pp* *musllinux* cp37-* cp38-* cp313-*" # Build CPython 3.9 - 3.12
before-test = "pip install -r requirements_test.txt"
test-command = "pytest {project}/tests"

[tool.cibuildwheel.macos]
# https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon
archs = ["universal2"]
test-skip = ["*_arm64", "*_universal2:arm64"]
archs = ["native"]

[tool.codespell]
skip = '*.cxx,*.h,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./doc/build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/source/examples/*,*cover,*.dat,*.mac,build,./docker/mapdl/v*,./factory/*,PKG-INFO,*.mypy_cache/*'
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup for tetgen."""

from io import open as io_open
import os

Expand Down Expand Up @@ -36,11 +37,10 @@
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
# Build cython modules
ext_modules=cythonize(
Expand All @@ -60,7 +60,7 @@
),
],
),
python_requires=">=3.7",
python_requires=">=3.9",
keywords="TetGen",
install_requires=["numpy>1.16.0", "pyvista>=0.31.0"],
install_requires=["numpy>=2,<3", "pyvista>=0.31.0"],
)
Loading