Skip to content
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
15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools>=61",
"pybind11>=2.10.0",
]
build-backend = "setuptools.build_meta"

[project]
name = "python_example"
version = "0.0.1"
description = "A test project using pybind11"
authors = [{ name = "Sylvain Corlay", email = "sylvain.corlay@gmail.com" }]
requires-python = ">=3.11"

[project.urls]
Homepage = "https://github.com/pybind/python_example"

[project.optional-dependencies]
test = ["pytest"]


[tool.cibuildwheel]
test-command = "python {project}/tests/test.py"
Expand Down
16 changes: 5 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Available at setup time due to pyproject.toml
import tomllib
from pathlib import Path

from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import setup

__version__ = "0.0.1"
with Path(__file__).with_name("pyproject.toml").open("rb") as f:
__version__ = tomllib.load(f)["project"]["version"]

# The main interface is through Pybind11Extension.
# * You can add cxx_std=11/14/17, and then build_ext can be removed.
Expand All @@ -23,18 +27,8 @@
]

setup(
name="python_example",
version=__version__,
author="Sylvain Corlay",
author_email="sylvain.corlay@gmail.com",
url="https://github.com/pybind/python_example",
description="A test project using pybind11",
long_description="",
ext_modules=ext_modules,
extras_require={"test": "pytest"},
# Currently, build_ext only provides an optional "highest supported C++
# level" feature, but in the future it may provide more features.
cmdclass={"build_ext": build_ext},
zip_safe=False,
python_requires=">=3.11",
)
Loading