Skip to content

Commit f36c822

Browse files
committed
Start transitioning to pyproject.toml
1 parent 22d036e commit f36c822

File tree

2 files changed

+62
-59
lines changed

2 files changed

+62
-59
lines changed

pyproject.toml

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
[project]
2+
name = "matplotlib"
3+
authors = [
4+
{email = "matplotlib-users@python.org"},
5+
{name = "John D. Hunter, Michael Droettboom"}
6+
]
7+
description = "Python plotting package"
8+
readme = "README.md"
9+
license = { file = "LICENSE/LICENSE" }
10+
dynamic = ["version", "optional-dependencies"]
11+
classifiers=[
12+
'Development Status :: 5 - Production/Stable',
13+
'Framework :: Matplotlib',
14+
'Intended Audience :: Science/Research',
15+
'Intended Audience :: Education',
16+
'License :: OSI Approved :: Python Software Foundation License',
17+
'Programming Language :: Python',
18+
'Programming Language :: Python :: 3',
19+
'Programming Language :: Python :: 3.9',
20+
'Programming Language :: Python :: 3.10',
21+
'Programming Language :: Python :: 3.11',
22+
'Topic :: Scientific/Engineering :: Visualization',
23+
]
24+
dependencies = [
25+
"contourpy>=1.0.1",
26+
"cycler>=0.10",
27+
"fonttools>=4.22.0",
28+
"kiwisolver>=1.0.1",
29+
"numpy>=1.21",
30+
"packaging>=20.0",
31+
"pillow>=6.2.0",
32+
"pyparsing>=2.3.1",
33+
"python-dateutil>=2.7",
34+
"setuptools_scm>=7.0"
35+
]
36+
requires-python = ">=3.9"
37+
138
[build-system]
239
build-backend = "setuptools.build_meta"
340
requires = [
@@ -7,11 +44,34 @@ requires = [
744
"setuptools_scm>=7",
845
]
946

10-
1147
[tool.isort]
1248
known_mpltoolkits = "mpl_toolkits"
1349
known_pydata = "numpy, matplotlib.pyplot"
1450
known_firstparty = "matplotlib"
1551
sections = "FUTURE,STDLIB,THIRDPARTY,PYDATA,FIRSTPARTY,MPLTOOLKITS,LOCALFOLDER"
1652
no_lines_before = "MPLTOOLKITS"
1753
force_sort_within_sections = true
54+
55+
[tool.setuptools.packages.find]
56+
where = ["lib"]
57+
include = ["matplotlib", "mpl_toolkits"]
58+
namespaces = false
59+
60+
[tool.setuptools.exclude-package-data]
61+
"*" = ["*.png", "*.svg"]
62+
63+
[tool.setuptools_scm]
64+
version_scheme = "release-branch-semver"
65+
local_scheme = "node-and-date"
66+
write_to = "lib/matplotlib/_version.py"
67+
parentdir_prefix_version = "matplotlib-"
68+
fallback_version = "0.0+UNKNOWN"
69+
70+
[project.urls]
71+
'Homepage' = 'https://matplotlib.org'
72+
'Download' = 'https://matplotlib.org/stable/users/installing/index.html'
73+
'Documentation' = 'https://matplotlib.org'
74+
'Source Code' = 'https://github.com/matplotlib/matplotlib'
75+
'Bug Tracker' = 'https://github.com/matplotlib/matplotlib/issues'
76+
'Forum' = 'https://discourse.matplotlib.org/'
77+
'Donate' = 'https://numfocus.org/donate-to-matplotlib'

setup.py

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import shutil
3030
import subprocess
3131

32-
from setuptools import setup, find_packages, Distribution, Extension
32+
from setuptools import setup, Distribution, Extension
3333
import setuptools.command.build_ext
3434
import setuptools.command.build_py
3535
import setuptools.command.sdist
@@ -268,40 +268,7 @@ def make_release_tree(self, base_dir, files):
268268
package_data[key] = list(set(val + package_data[key]))
269269

270270
setup( # Finally, pass this all along to setuptools to do the heavy lifting.
271-
name="matplotlib",
272-
description="Python plotting package",
273-
author="John D. Hunter, Michael Droettboom",
274-
author_email="matplotlib-users@python.org",
275-
url="https://matplotlib.org",
276-
download_url="https://matplotlib.org/stable/users/installing/index.html",
277-
project_urls={
278-
'Documentation': 'https://matplotlib.org',
279-
'Source Code': 'https://github.com/matplotlib/matplotlib',
280-
'Bug Tracker': 'https://github.com/matplotlib/matplotlib/issues',
281-
'Forum': 'https://discourse.matplotlib.org/',
282-
'Donate': 'https://numfocus.org/donate-to-matplotlib'
283-
},
284-
long_description=Path("README.md").read_text(encoding="utf-8"),
285-
long_description_content_type="text/markdown",
286-
license="PSF",
287271
platforms="any",
288-
classifiers=[
289-
'Development Status :: 5 - Production/Stable',
290-
'Framework :: Matplotlib',
291-
'Intended Audience :: Science/Research',
292-
'Intended Audience :: Education',
293-
'License :: OSI Approved :: Python Software Foundation License',
294-
'Programming Language :: Python',
295-
'Programming Language :: Python :: 3',
296-
'Programming Language :: Python :: 3.9',
297-
'Programming Language :: Python :: 3.10',
298-
'Programming Language :: Python :: 3.11',
299-
'Topic :: Scientific/Engineering :: Visualization',
300-
],
301-
302-
package_dir={"": "lib"},
303-
packages=find_packages("lib"),
304-
namespace_packages=["mpl_toolkits"],
305272
py_modules=["pylab"],
306273
# Dummy extension to trigger build_ext, which will swap it out with
307274
# real extensions that can depend on numpy for the build.
@@ -316,35 +283,11 @@ def make_release_tree(self, base_dir, files):
316283
# - doc/devel/dependencies.rst
317284
# - .github/workflows/tests.yml
318285
# - environment.yml
319-
install_requires=[
320-
"contourpy>=1.0.1",
321-
"cycler>=0.10",
322-
"fonttools>=4.22.0",
323-
"kiwisolver>=1.0.1",
324-
"numpy>=1.21",
325-
"packaging>=20.0",
326-
"pillow>=6.2.0",
327-
"pyparsing>=2.3.1",
328-
"python-dateutil>=2.7",
329-
] + (
330-
# Installing from a git checkout that is not producing a wheel.
331-
["setuptools_scm>=7"] if (
332-
Path(__file__).with_name(".git").exists() and
333-
os.environ.get("CIBUILDWHEEL", "0") != "1"
334-
) else []
335-
),
336286
extras_require={
337287
':python_version<"3.10"': [
338288
"importlib-resources>=3.2.0",
339289
],
340290
},
341-
use_scm_version={
342-
"version_scheme": "release-branch-semver",
343-
"local_scheme": "node-and-date",
344-
"write_to": "lib/matplotlib/_version.py",
345-
"parentdir_prefix_version": "matplotlib-",
346-
"fallback_version": "0.0+UNKNOWN",
347-
},
348291
cmdclass={
349292
"build_ext": BuildExtraLibraries,
350293
"build_py": BuildPy,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy