Skip to content

Commit

Permalink
Merge pull request #44 from ocefpaf/fix_package
Browse files Browse the repository at this point in the history
Fix package metadata
  • Loading branch information
ocefpaf authored May 30, 2024
2 parents 5d407fa + 2830bc5 commit d9fefa1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = [
"setuptools>=41.2",
"setuptools-scm",
"cython",
"cython>=3",
"oldest-supported-numpy ; python_version < '3.9'",
"numpy>=2.0.0rc1 ; python_version >= '3.9'",
"wheel",
Expand All @@ -11,16 +11,16 @@ build-backend = "setuptools.build_meta"

[project]
name = "ciso"
dynamic = ["version", "readme"]
dynamic = ["version"]
description = "Create isosurfaces from 2D or 3D arrays"
readme = "README.md"
authors = [
{email = "[email protected]"},
{name = "Robert Hetland"}
]
requires-python = ">=3.9"
license = {text = "BSD-2-Clause"}
dependencies = [
"cython>=3",
"oldest-supported-numpy ; python_version < '3.9'",
"numpy>=2.0.0rc1 ; python_version >= '3.9'",
]
Expand All @@ -43,8 +43,10 @@ zip-safe = true
platforms = ["any"]
packages = ["ciso"]

[tool.setuptools.dynamic.readme]
file = ["README.md"]
[tool.setuptools_scm]
write_to = "ciso/_version.py"
write_to_template = "__version__ = '{version}'"
tag_regex = "^(?P<prefix>v)?(?P<version>[^\\+]+)(?P<suffix>.*)?$"

[tool.pytest.ini_options]
filterwarnings = [
Expand Down
12 changes: 1 addition & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,4 @@
Extension("ciso._ciso", ["ciso/_ciso.pyx"], include_dirs=[numpy.get_include()]),
]

setup(
# The package metadata is specified in the pyproject.toml but GitHub's downstream dependency graph
# does not work unless we put the name this here too.
name="ciso",
ext_modules=cythonize(extensions),
use_scm_version={
"write_to": "ciso/_version.py",
"write_to_template": '__version__ = "{version}"',
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
},
)
setup(ext_modules=cythonize(extensions))

0 comments on commit d9fefa1

Please sign in to comment.