Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f650809

Browse files
committed
Start transitioning to pyproject.toml
1 parent 2b446af commit f650809

File tree

2 files changed

+52
-57
lines changed

2 files changed

+52
-57
lines changed

pyproject.toml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,58 @@
1+
[project]
2+
name = "matplotlib"
3+
description = "Python plotting package"
4+
readme = "README.md"
5+
license = { file = "LICENSE/LICENSE" }
6+
dynamic = ["authors", "version"]
7+
classifiers=[
8+
'Development Status :: 5 - Production/Stable',
9+
'Framework :: Matplotlib',
10+
'Intended Audience :: Science/Research',
11+
'Intended Audience :: Education',
12+
'License :: OSI Approved :: Python Software Foundation License',
13+
'Programming Language :: Python',
14+
'Programming Language :: Python :: 3',
15+
'Programming Language :: Python :: 3.8',
16+
'Programming Language :: Python :: 3.9',
17+
'Programming Language :: Python :: 3.10',
18+
'Programming Language :: Python :: 3.11',
19+
'Topic :: Scientific/Engineering :: Visualization',
20+
]
21+
dependencies = [
22+
"contourpy>=1.0.1",
23+
"cycler>=0.10",
24+
"fonttools>=4.22.0",
25+
"kiwisolver>=1.0.1",
26+
"numpy>=1.19",
27+
"packaging>=20.0",
28+
"pillow>=6.2.0",
29+
"pyparsing>=2.2.1",
30+
"python-dateutil>=2.7",
31+
"setuptools_scm>=7.0"
32+
]
33+
requires-python = ">=3.8"
34+
135
[build-system]
236
build-backend = "setuptools.build_meta"
337
requires = [
438
"certifi>=2020.06.20",
539
"numpy>=1.19",
640
"setuptools_scm>=7",
741
]
42+
43+
[tool.setuptools.packages.find]
44+
where = ["lib"]
45+
46+
[tool.setuptools_scm]
47+
version_scheme = "release-branch-semver"
48+
local_scheme = "node-and-date"
49+
write_to = "lib/matplotlib/_version.py"
50+
parentdir_prefix_version = "matplotlib-"
51+
fallback_version = "0.0+UNKNOWN"
52+
53+
[project.urls]
54+
'Documentation' = 'https://matplotlib.org'
55+
'Source Code' = 'https://github.com/matplotlib/matplotlib'
56+
'Bug Tracker' = 'https://github.com/matplotlib/matplotlib/issues'
57+
'Forum' = 'https://discourse.matplotlib.org/'
58+
'Donate' = 'https://numfocus.org/donate-to-matplotlib'

setup.py

Lines changed: 1 addition & 57 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,72 +268,16 @@ 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",
273271
author="John D. Hunter, Michael Droettboom",
274272
author_email="[email protected]",
275273
url="https://matplotlib.org",
276274
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",
287275
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.8',
297-
'Programming Language :: Python :: 3.9',
298-
'Programming Language :: Python :: 3.10',
299-
'Programming Language :: Python :: 3.11',
300-
'Topic :: Scientific/Engineering :: Visualization',
301-
],
302-
303-
package_dir={"": "lib"},
304-
packages=find_packages("lib"),
305-
namespace_packages=["mpl_toolkits"],
306276
py_modules=["pylab"],
307277
# Dummy extension to trigger build_ext, which will swap it out with
308278
# real extensions that can depend on numpy for the build.
309279
ext_modules=[Extension("", [])],
310280
package_data=package_data,
311-
312-
python_requires='>={}'.format('.'.join(str(n) for n in py_min_version)),
313-
install_requires=[
314-
"contourpy>=1.0.1",
315-
"cycler>=0.10",
316-
"fonttools>=4.22.0",
317-
"kiwisolver>=1.0.1",
318-
"numpy>=1.19",
319-
"packaging>=20.0",
320-
"pillow>=6.2.0",
321-
"pyparsing>=2.2.1",
322-
"python-dateutil>=2.7",
323-
] + (
324-
# Installing from a git checkout that is not producing a wheel.
325-
["setuptools_scm>=7"] if (
326-
Path(__file__).with_name(".git").exists() and
327-
os.environ.get("CIBUILDWHEEL", "0") != "1"
328-
) else []
329-
),
330-
use_scm_version={
331-
"version_scheme": "release-branch-semver",
332-
"local_scheme": "node-and-date",
333-
"write_to": "lib/matplotlib/_version.py",
334-
"parentdir_prefix_version": "matplotlib-",
335-
"fallback_version": "0.0+UNKNOWN",
336-
},
337281
cmdclass={
338282
"build_ext": BuildExtraLibraries,
339283
"build_py": BuildPy,

0 commit comments

Comments
 (0)