Move version from setup.py to pyproject.toml

This commit is contained in:
Hugo van Kemenade 2023-10-22 20:35:21 +03:00
parent adc64336ab
commit 5fb892a9e2
2 changed files with 3 additions and 1 deletions

View File

@ -74,6 +74,9 @@ packages = ["PIL"]
include-package-data = true include-package-data = true
package-dir = {"" = "src"} package-dir = {"" = "src"}
[tool.setuptools.dynamic]
version = {attr = "PIL.__version__"}
[tool.isort] [tool.isort]
profile = "black" profile = "black"

View File

@ -986,7 +986,6 @@ ext_modules = [
try: try:
setup( setup(
version=PILLOW_VERSION,
cmdclass={"build_ext": pil_build_ext}, cmdclass={"build_ext": pil_build_ext},
ext_modules=ext_modules, ext_modules=ext_modules,
zip_safe=not (debug_build() or PLATFORM_MINGW), zip_safe=not (debug_build() or PLATFORM_MINGW),