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

moving part of metadata from setup.py to pyproject.toml #280

Closed
wants to merge 9 commits into from
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/tests+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
with:
submodules: recursive
fetch-depth: 0 # https://github.com/pypa/setuptools_scm/issues/480
- run: pip install "setuptools>=68.2.2"
- run: DEBUG=1 VERBOSE=1 pip install --verbose -e .[tests]
- run: pytest -v -s -We -p no:unraisableexception tests

Expand Down
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[tool.setuptools]
py-modules = []

[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "PyPartMC"
description = "Python interface to PartMC"
dynamic = ["version", "readme", "urls"]
dependencies = ["numpy"]
license = {text = "GPL-3.0"}
requires-python = ">=3.7"

[project.optional-dependencies]
tests = [
"pytest",
"pytest-order",
]

[tool.setuptools_scm]
20 changes: 2 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,39 +120,23 @@ def build_extension(self, ext): # pylint: disable=too-many-branches
subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=build_temp)


# The information here can also be placed in setup.cfg - better separation of
# logic and declaration, and simpler if you include description/version in a file.
setup(
name="PyPartMC",
use_scm_version={
"local_scheme": lambda _: "",
"version_scheme": "post-release",
# "fallback_version": "0.0.0"
},
author="Sylwester Arabas",
author_email="[email protected]",
description="Python interface to PartMC",
setup_requires=["setuptools_scm"],
python_requires=">=3.7",
long_description=(Path(__file__).parent / "README.md").read_text(),
long_description_content_type="text/markdown",
packages=find_packages(include=["PyPartMC", "PyPartMC.*"]),
ext_modules=[CMakeExtension("_PyPartMC")],
cmdclass={"build_ext": CMakeBuild},
zip_safe=False,
python_requires=">=3.7",
setup_requires=["setuptools_scm"],
install_requires=["numpy"],
license="GPL-3.0",
project_urls={
"Tracker": "https://github.com/open-atmos/PyPartMC/issues",
"Documentation": "https://open-atmos.github.io/PyPartMC",
"Source": "https://github.com/open-atmos/PyPartMC/",
},
extras_require={
"tests": [
"pytest",
"pytest-order",
"fastcore!=1.5.8", # https://github.com/fastai/fastcore/issues/439
"ghapi",
]
},
)
Loading