Skip to content

Commit 772f79b

Browse files
authored
Merge pull request #5784 from hugovk/setup-py-to-cfg
Use declarative package configuration
2 parents 704336f + a44e8e6 commit 772f79b

File tree

2 files changed

+38
-43
lines changed

2 files changed

+38
-43
lines changed

setup.cfg

+38
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
[metadata]
2+
name = Pillow
3+
description = Python Imaging Library (Fork)
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
6+
url = https://python-pillow.org
7+
author = Alex Clark (PIL Fork Author)
8+
author_email = [email protected]
9+
license = HPND
10+
classifiers =
11+
Development Status :: 6 - Mature
12+
License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)
13+
Programming Language :: Python :: 3
14+
Programming Language :: Python :: 3 :: Only
15+
Programming Language :: Python :: 3.6
16+
Programming Language :: Python :: 3.7
17+
Programming Language :: Python :: 3.8
18+
Programming Language :: Python :: 3.9
19+
Programming Language :: Python :: 3.10
20+
Programming Language :: Python :: Implementation :: CPython
21+
Programming Language :: Python :: Implementation :: PyPy
22+
Topic :: Multimedia :: Graphics
23+
Topic :: Multimedia :: Graphics :: Capture :: Digital Camera
24+
Topic :: Multimedia :: Graphics :: Capture :: Screen Capture
25+
Topic :: Multimedia :: Graphics :: Graphics Conversion
26+
Topic :: Multimedia :: Graphics :: Viewers
27+
keywords = Imaging
28+
project_urls =
29+
Documentation=https://pillow.readthedocs.io
30+
Source=https://github.com/python-pillow/Pillow
31+
Funding=https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi
32+
Release notes=https://pillow.readthedocs.io/en/stable/releasenotes/index.html
33+
Changelog=https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst
34+
Twitter=https://twitter.com/PythonPillow
35+
36+
[options]
37+
python_requires = >=3.6
38+
139
[flake8]
240
extend-ignore = E203
341
max-line-length = 88

setup.py

-43
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def get_version():
2626
return locals()["__version__"]
2727

2828

29-
NAME = "Pillow"
3029
PILLOW_VERSION = get_version()
3130
FREETYPE_ROOT = None
3231
HARFBUZZ_ROOT = None
@@ -971,56 +970,14 @@ def debug_build():
971970
Extension("PIL._imagingmorph", ["src/_imagingmorph.c"]),
972971
]
973972

974-
with open("README.md") as f:
975-
long_description = f.read()
976-
977973
try:
978974
setup(
979-
name=NAME,
980975
version=PILLOW_VERSION,
981-
description="Python Imaging Library (Fork)",
982-
long_description=long_description,
983-
long_description_content_type="text/markdown",
984-
license="HPND",
985-
author="Alex Clark (PIL Fork Author)",
986-
author_email="[email protected]",
987-
url="https://python-pillow.org",
988-
project_urls={
989-
"Documentation": "https://pillow.readthedocs.io",
990-
"Source": "https://github.com/python-pillow/Pillow",
991-
"Funding": "https://tidelift.com/subscription/pkg/pypi-pillow?"
992-
"utm_source=pypi-pillow&utm_medium=pypi",
993-
"Release notes": "https://pillow.readthedocs.io/en/stable/releasenotes/"
994-
"index.html",
995-
"Changelog": "https://github.com/python-pillow/Pillow/blob/main/"
996-
"CHANGES.rst",
997-
"Twitter": "https://twitter.com/PythonPillow",
998-
},
999-
classifiers=[
1000-
"Development Status :: 6 - Mature",
1001-
"License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)", # noqa: E501
1002-
"Programming Language :: Python :: 3",
1003-
"Programming Language :: Python :: 3.6",
1004-
"Programming Language :: Python :: 3.7",
1005-
"Programming Language :: Python :: 3.8",
1006-
"Programming Language :: Python :: 3.9",
1007-
"Programming Language :: Python :: 3.10",
1008-
"Programming Language :: Python :: 3 :: Only",
1009-
"Programming Language :: Python :: Implementation :: CPython",
1010-
"Programming Language :: Python :: Implementation :: PyPy",
1011-
"Topic :: Multimedia :: Graphics",
1012-
"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera",
1013-
"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture",
1014-
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
1015-
"Topic :: Multimedia :: Graphics :: Viewers",
1016-
],
1017-
python_requires=">=3.6",
1018976
cmdclass={"build_ext": pil_build_ext},
1019977
ext_modules=ext_modules,
1020978
include_package_data=True,
1021979
packages=["PIL"],
1022980
package_dir={"": "src"},
1023-
keywords=["Imaging"],
1024981
zip_safe=not (debug_build() or PLATFORM_MINGW),
1025982
)
1026983
except RequiredDependencyException as err:

0 commit comments

Comments
 (0)