Skip to content

Commit 7aef0b5

Browse files
committed
MNT: move static project metadata to \pyproject.toml\
1 parent 2fe7bf8 commit 7aef0b5

File tree

3 files changed

+58
-58
lines changed

3 files changed

+58
-58
lines changed

MANIFEST.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
include README.rst RELEASE.rst
2-
include LICENSE
1+
include RELEASE.rst
32
include Makefile
43
include pyproject.toml
54

6-
graft LICENSES
7-
85
recursive-include bottleneck/src *.c *.h
6+
include bottleneck/tests/data/template_test *.c
97
exclude bottleneck/src/reduce.c
108
exclude bottleneck/src/move.c
119
exclude bottleneck/src/nonreduce.c

pyproject.toml

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
requires = [
3-
"setuptools",
3+
"setuptools>=77.0.1",
44
"versioneer",
55
# Comments on numpy build requirement range:
66
#
@@ -16,6 +16,58 @@ requires = [
1616
]
1717
build-backend = "setuptools.build_meta"
1818

19+
[project]
20+
name = "Bottleneck"
21+
description = "Fast NumPy array functions written in C"
22+
maintainers = [
23+
{ name = "Christopher Whelan" , email = "bottle-neck@googlegroups.com" },
24+
]
25+
readme = { file = "README.rst" , content-type = "text/x-rst" }
26+
license = "BSD-2-Clause"
27+
license-files = [
28+
"LICENSE",
29+
"LICENSES/NUMPY_LICENSE",
30+
"LICENSES/PANDAS_LICENSE",
31+
"LICENSES/SCIPY_LICENSE",
32+
"LICENSES/SETUPTOOLS_LICENSE",
33+
]
34+
classifiers = [
35+
"Development Status :: 5 - Production/Stable",
36+
"Environment :: Console",
37+
"Intended Audience :: Science/Research",
38+
"Intended Audience :: Financial and Insurance Industry",
39+
"Operating System :: OS Independent",
40+
"Programming Language :: C",
41+
"Programming Language :: Python",
42+
"Programming Language :: Python :: 3",
43+
"Programming Language :: Python :: 3.10",
44+
"Programming Language :: Python :: 3.11",
45+
"Programming Language :: Python :: 3.12",
46+
"Programming Language :: Python :: 3.13",
47+
"Programming Language :: Python :: 3.14",
48+
"Programming Language :: Python :: Free Threading :: 2 - Beta",
49+
"Topic :: Scientific/Engineering",
50+
]
51+
requires-python = ">=3.10"
52+
dependencies = ["numpy>=1.21.3"]
53+
dynamic = ["version"]
54+
55+
[project.urls]
56+
Repository = "https://github.com/pydata/bottleneck"
57+
Changelog = "..."
58+
59+
[dependency-groups]
60+
doc = [
61+
"numpydoc",
62+
"sphinx",
63+
"gitpython",
64+
]
65+
66+
[tool.setuptools]
67+
zip-safe = false
68+
69+
[tool.setuptools.packages.find]
70+
namespaces = false
1971

2072
[tool.pytest.ini_options]
2173
addopts = "-l"

setup.py

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sys
66
from distutils.command.config import config as _config
77

8-
from setuptools import Command, find_packages, setup
8+
from setuptools import Command, setup
99
from setuptools.command.build_ext import build_ext as _build_ext
1010
from setuptools.extension import Extension
1111

@@ -144,58 +144,8 @@ def prepare_modules():
144144
return ext
145145

146146

147-
def get_long_description():
148-
with open("README.rst", "r") as fid:
149-
long_description = fid.read()
150-
idx = max(0, long_description.find("Bottleneck is a collection"))
151-
long_description = long_description[idx:]
152-
return long_description
153-
154-
155-
CLASSIFIERS = [
156-
"Development Status :: 5 - Production/Stable",
157-
"Environment :: Console",
158-
"Intended Audience :: Science/Research",
159-
"Intended Audience :: Financial and Insurance Industry",
160-
"Operating System :: OS Independent",
161-
"Programming Language :: C",
162-
"Programming Language :: Python",
163-
"Programming Language :: Python :: 3",
164-
"Programming Language :: Python :: 3.10",
165-
"Programming Language :: Python :: 3.11",
166-
"Programming Language :: Python :: 3.12",
167-
"Programming Language :: Python :: 3.13",
168-
"Programming Language :: Python :: 3.14",
169-
"Programming Language :: Python :: Free Threading :: 2 - Beta",
170-
"Topic :: Scientific/Engineering",
171-
]
172-
173-
174-
metadata = dict(
175-
name="Bottleneck",
176-
maintainer="Christopher Whelan",
177-
maintainer_email="bottle-neck@googlegroups.com",
178-
description="Fast NumPy array functions written in C",
179-
long_description=get_long_description(),
180-
long_description_content_type="text/x-rst",
181-
url="https://github.com/pydata/bottleneck",
182-
download_url="http://pypi.python.org/pypi/Bottleneck",
183-
license="Simplified BSD",
184-
classifiers=CLASSIFIERS,
185-
platforms="OS Independent",
147+
setup(
186148
version=versioneer.get_version(),
187-
packages=find_packages(),
188-
package_data={
189-
"bottleneck": ["LICENSE"],
190-
"bottleneck.tests": ["data/*/*"],
191-
},
192-
python_requires=">=3.10",
193-
install_requires=["numpy"],
194-
extras_require={"doc": ["numpydoc", "sphinx", "gitpython"]},
195149
cmdclass=cmdclass,
196-
ext_modules=prepare_modules(),
197-
zip_safe=False,
150+
ext_modules=prepare_modules()
198151
)
199-
200-
201-
setup(**metadata)

0 commit comments

Comments
 (0)