diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000000..e19c0a58536 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +extend-ignore = E203 +max-line-length = 88 diff --git a/MANIFEST.in b/MANIFEST.in index 2bbddefa3ca..9401ebbbf37 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,6 +7,7 @@ include *.rst include *.sh include *.txt include *.yaml +include .flake8 include LICENSE include Makefile include tox.ini diff --git a/docs/installation.rst b/docs/installation.rst index 1628801825a..9f38a622cca 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -356,7 +356,7 @@ for your machine (e.g. :file:`/usr` or :file:`/usr/local`), no additional configuration should be required. If they are installed in a non-standard location, you may need to configure setuptools to use those locations by editing :file:`setup.py` or -:file:`setup.cfg`, or by adding environment variables on the command +:file:`pyproject.toml`, or by adding environment variables on the command line:: CFLAGS="-I/usr/pkg/include" python3 -m pip install --upgrade Pillow --no-binary :all: diff --git a/pyproject.toml b/pyproject.toml index b84db07bdca..652fdb53d03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,73 @@ backend-path = [ "_custom_build", ] +[project] +name = "pillow" +description = "Python Imaging Library (Fork)" +readme = "README.md" +keywords = [ + "Imaging", +] +license = {text = "HPND"} +authors = [{name = "Alex Clark (PIL Fork Author)", email = "aclark@python-pillow.org"}] +requires-python = ">=3.7" +classifiers = [ + "Development Status :: 6 - Mature", + "License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Multimedia :: Graphics", + "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera", + "Topic :: Multimedia :: Graphics :: Capture :: Screen Capture", + "Topic :: Multimedia :: Graphics :: Graphics Conversion", + "Topic :: Multimedia :: Graphics :: Viewers", +] +dynamic = [ + "version", +] +[project.optional-dependencies] +docs = [ + "furo", + "olefile", + "sphinx>=2.4", + "sphinx-copybutton", + "sphinx-issues>=3.0.1", + "sphinx-removed-in", + "sphinxext-opengraph", +] +tests = [ + "check-manifest", + "coverage", + "defusedxml", + "markdown2", + "olefile", + "packaging", + "pyroma", + "pytest", + "pytest-cov", + "pytest-timeout", +] +[project.urls] +Changelog = "https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst" +Documentation = "https://pillow.readthedocs.io" +Funding = "https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi" +Homepage = "https://python-pillow.org" +"Release notes" = "https://pillow.readthedocs.io/en/stable/releasenotes/index.html" +Source = "https://github.com/python-pillow/Pillow" +Twitter = "https://twitter.com/PythonPillow" + +[tool.setuptools] +packages = ["PIL"] +include-package-data = true +package-dir = {"" = "src"} + [tool.isort] profile = "black" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 627788cd8b6..00000000000 --- a/setup.cfg +++ /dev/null @@ -1,67 +0,0 @@ -[metadata] -name = Pillow -description = Python Imaging Library (Fork) -long_description = file: README.md -long_description_content_type = text/markdown -url = https://python-pillow.org -author = Jeffrey A. Clark (Alex) -author_email = aclark@aclark.net -license = HPND -classifiers = - Development Status :: 6 - Mature - License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND) - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Topic :: Multimedia :: Graphics - Topic :: Multimedia :: Graphics :: Capture :: Digital Camera - Topic :: Multimedia :: Graphics :: Capture :: Screen Capture - Topic :: Multimedia :: Graphics :: Graphics Conversion - Topic :: Multimedia :: Graphics :: Viewers -keywords = Imaging -project_urls = - Documentation=https://pillow.readthedocs.io - Source=https://github.com/python-pillow/Pillow - Funding=https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi - Release notes=https://pillow.readthedocs.io/en/stable/releasenotes/index.html - Changelog=https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst - Twitter=https://twitter.com/PythonPillow - Mastodon=https://fosstodon.org/@pillow - -[options] -packages = PIL -python_requires = >=3.8 -include_package_data = True -package_dir = - = src - -[options.extras_require] -docs = - furo - olefile - sphinx>=2.4 - sphinx-copybutton - sphinx-inline-tabs - sphinx-removed-in - sphinxext-opengraph -tests = - check-manifest - coverage - defusedxml - markdown2 - olefile - packaging - pyroma - pytest - pytest-cov - pytest-timeout - -[flake8] -extend-ignore = E203 -max-line-length = 88