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

Move project metadata from setup.py to pyproject.toml #2175

Merged
merged 2 commits into from
Aug 6, 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
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ build-backend = "setuptools.build_meta"

[project]
name = "maturin"
description = "Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages"
authors = [{ name = "konstin", email = "[email protected]" }]
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.7"
license = {text = "MIT OR Apache-2.0"}
classifiers = [
"Topic :: Software Development :: Build Tools",
"Programming Language :: Rust",
Expand All @@ -14,10 +18,6 @@ classifiers = [
]
dependencies = ["tomli>=1.1.0 ; python_version<'3.11'"]
dynamic = [
"authors",
"description",
"license",
"readme",
"version"
]

Expand All @@ -35,6 +35,9 @@ Issues = "https://github.com/PyO3/maturin/issues"
Documentation = "https://maturin.rs"
Changelog = "https://maturin.rs/changelog.html"

[tool.setuptools]
packages = ["maturin"]

[tool.maturin]
bindings = "bin"

Expand Down
20 changes: 0 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ def finalize_options(self):
except ImportError:
bdist_wheel = None

with open("README.md", encoding="utf-8", errors="ignore") as fp:
long_description = fp.read()

with open("Cargo.toml", "rb") as fp:
version = tomllib.load(fp)["package"]["version"]

Expand All @@ -51,25 +48,8 @@ def finalize_options(self):
cargo_args = shlex.split(os.getenv("MATURIN_SETUP_ARGS", ""))

setup(
name="maturin",
author="konstin",
author_email="[email protected]",
url="https://github.com/pyo3/maturin",
description="Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as "
"python packages",
long_description=long_description,
long_description_content_type="text/markdown",
version=version,
license="MIT OR Apache-2.0",
python_requires=">=3.7",
cmdclass={"bdist_wheel": bdist_wheel},
packages=["maturin"],
rust_extensions=[RustBin("maturin", args=cargo_args, cargo_manifest_args=["--locked"])],
classifiers=[
"Topic :: Software Development :: Build Tools",
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
zip_safe=False,
)
Loading