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

Skip to content

Commit e921399

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

File tree

2 files changed

+59
-61
lines changed

2 files changed

+59
-61
lines changed

pyproject.toml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,65 @@
1+
[project]
2+
name = "matplotlib"
3+
authors = [
4+
{email = "[email protected]"},
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"]
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.8',
20+
'Programming Language :: Python :: 3.9',
21+
'Programming Language :: Python :: 3.10',
22+
'Programming Language :: Python :: 3.11',
23+
'Topic :: Scientific/Engineering :: Visualization',
24+
]
25+
dependencies = [
26+
"contourpy>=1.0.1",
27+
"cycler>=0.10",
28+
"fonttools>=4.22.0",
29+
"kiwisolver>=1.0.1",
30+
"numpy>=1.19",
31+
"packaging>=20.0",
32+
"pillow>=6.2.0",
33+
"pyparsing>=2.2.1",
34+
"python-dateutil>=2.7",
35+
"setuptools_scm>=7.0"
36+
]
37+
requires-python = ">=3.8"
38+
139
[build-system]
240
build-backend = "setuptools.build_meta"
341
requires = [
442
"certifi>=2020.06.20",
543
"numpy>=1.19",
644
"setuptools_scm>=7",
745
]
46+
47+
[tool.setuptools.packages.find]
48+
where = ["lib"]
49+
exclude = ["matplotlib.tests"]
50+
51+
[tool.setuptools_scm]
52+
version_scheme = "release-branch-semver"
53+
local_scheme = "node-and-date"
54+
write_to = "lib/matplotlib/_version.py"
55+
parentdir_prefix_version = "matplotlib-"
56+
fallback_version = "0.0+UNKNOWN"
57+
58+
[project.urls]
59+
'Homepage' = 'https://matplotlib.org'
60+
'Download' = 'https://matplotlib.org/stable/users/installing/index.html'
61+
'Documentation' = 'https://matplotlib.org'
62+
'Source Code' = 'https://github.com/matplotlib/matplotlib'
63+
'Bug Tracker' = 'https://github.com/matplotlib/matplotlib/issues'
64+
'Forum' = 'https://discourse.matplotlib.org/'
65+
'Donate' = 'https://numfocus.org/donate-to-matplotlib'

setup.py

Lines changed: 1 addition & 61 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,12 @@ 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="[email protected]",
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.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"],
306272
py_modules=["pylab"],
307273
# Dummy extension to trigger build_ext, which will swap it out with
308274
# real extensions that can depend on numpy for the build.
309275
ext_modules=[Extension("", [])],
310276
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-
},
337277
cmdclass={
338278
"build_ext": BuildExtraLibraries,
339279
"build_py": BuildPy,

0 commit comments

Comments
 (0)