File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[build-system ]
22requires = [
3- " setuptools>=42 " ,
3+ " setuptools>=61 " ,
44 " pybind11>=2.10.0" ,
55]
66build-backend = " setuptools.build_meta"
77
8+ [project ]
9+ name = " python_example"
10+ version = " 0.0.1"
11+ description = " A test project using pybind11"
12+ authors = [{ name = " Sylvain Corlay" , email = " sylvain.corlay@gmail.com" }]
13+ requires-python = " >=3.11"
14+
15+ [project .urls ]
16+ Homepage = " https://github.com/pybind/python_example"
17+
18+ [project .optional-dependencies ]
19+ test = [" pytest" ]
20+
821
922[tool .cibuildwheel ]
1023test-command = " python {project}/tests/test.py"
Original file line number Diff line number Diff line change 11# Available at setup time due to pyproject.toml
2+ import tomllib
3+ from pathlib import Path
4+
25from pybind11 .setup_helpers import Pybind11Extension , build_ext
36from setuptools import setup
47
5- __version__ = "0.0.1"
8+ with Path (__file__ ).with_name ("pyproject.toml" ).open ("rb" ) as f :
9+ __version__ = tomllib .load (f )["project" ]["version" ]
610
711# The main interface is through Pybind11Extension.
812# * You can add cxx_std=11/14/17, and then build_ext can be removed.
2327]
2428
2529setup (
26- name = "python_example" ,
27- version = __version__ ,
28- author = "Sylvain Corlay" ,
29- author_email = "sylvain.corlay@gmail.com" ,
30- url = "https://github.com/pybind/python_example" ,
31- description = "A test project using pybind11" ,
32- long_description = "" ,
3330 ext_modules = ext_modules ,
34- extras_require = {"test" : "pytest" },
3531 # Currently, build_ext only provides an optional "highest supported C++
3632 # level" feature, but in the future it may provide more features.
3733 cmdclass = {"build_ext" : build_ext },
38- zip_safe = False ,
39- python_requires = ">=3.11" ,
4034)
You can’t perform that action at this time.
0 commit comments