From bc73f6550721e1edd52b063a745b7e69ca0d5c3b Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 7 Sep 2023 10:27:21 +0200 Subject: [PATCH] PEP 621: Migrate from setup.py to pyproject.toml --- pyproject.toml | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 48 --------------------------------- 2 files changed, 72 insertions(+), 48 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..b569cad6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,72 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=61.2", +] + +[project] +name = "sc2reader" +description = "Utility for parsing Starcraft II replay files" +keywords = [ + "parser", + "replay", + "sc2", + "starcraft 2", +] +license = {text = "MIT"} +authors = [{name = "Kevin Leung", email = "kkleung89@gmail.com"}] +requires-python = ">=3.7" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python", + "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 :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Games/Entertainment", + "Topic :: Games/Entertainment :: Real Time Strategy", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities", +] +dynamic = [ + "readme", + "version", +] +dependencies = [ + "mpyq", + "pillow", +] +[project.optional-dependencies] +testing = [ + "pytest", +] +[project.urls] +Homepage = "https://github.com/ggtracker/sc2reader" +[project.scripts] +sc2attributes = "sc2reader.scripts.sc2attributes:main" +sc2json = "sc2reader.scripts.sc2json:main" +sc2parse = "sc2reader.scripts.sc2parse:main" +sc2printer = "sc2reader.scripts.sc2printer:main" +sc2replayer = "sc2reader.scripts.sc2replayer:main" + +[tool.setuptools] +include-package-data = true +zip-safe = true +platforms = ["any"] + +[tool.setuptools.dynamic] +readme = {file = ["README.rst", "CHANGELOG.rst"]} +version = {attr = "sc2reader.__version__"} + +[tool.setuptools.packages] +find = {namespaces = false} diff --git a/setup.py b/setup.py deleted file mode 100644 index 95bf19fd..00000000 --- a/setup.py +++ /dev/null @@ -1,48 +0,0 @@ -import setuptools - -setuptools.setup( - license="MIT", - name="sc2reader", - version="1.8.0", - keywords=["starcraft 2", "sc2", "replay", "parser"], - description="Utility for parsing Starcraft II replay files", - long_description=open("README.rst").read() + "\n\n" + open("CHANGELOG.rst").read(), - author="Kevin Leung", - author_email="kkleung89@gmail.com", - url="https://github.com/ggtracker/sc2reader", - platforms=["any"], - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: Implementation :: PyPy", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Games/Entertainment", - "Topic :: Games/Entertainment :: Real Time Strategy", - "Topic :: Software Development", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities", - ], - entry_points={ - "console_scripts": [ - "sc2printer = sc2reader.scripts.sc2printer:main", - "sc2replayer = sc2reader.scripts.sc2replayer:main", - "sc2parse = sc2reader.scripts.sc2parse:main", - "sc2attributes = sc2reader.scripts.sc2attributes:main", - "sc2json = sc2reader.scripts.sc2json:main", - ] - }, - install_requires=["mpyq", "pillow"], - tests_require=["pytest"], - packages=setuptools.find_packages(), - include_package_data=True, - zip_safe=True, -)