move metadata to setup.cfg
diff --git a/setup.cfg b/setup.cfg index 44ee656..95b4994 100644 --- a/setup.cfg +++ b/setup.cfg
@@ -1,7 +1,36 @@ [metadata] -license_file = LICENSE.rst -long_description = file:README.rst +name = MarkupSafe +version = attr: markupsafe.__version__ +url = https://palletsprojects.com/p/markupsafe/ +project_urls = + Documentation = https://markupsafe.palletsprojects.com/ + Code = https://github.com/pallets/markupsafe + Issue tracker = https://github.com/pallets/markupsafe/issues +license = BSD-3-Clause +license_files = LICENSE.rst +maintainer = Pallets +maintainer_email = contact@palletsprojects.com +description = Safely add untrusted strings to HTML/XML markup. +long_description = file: README.rst long_description_content_type = text/x-rst +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Web Environment + Intended Audience :: Developers + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python + Topic :: Internet :: WWW/HTTP :: Dynamic Content + Topic :: Text Processing :: Markup :: HTML + +[options] +packages = find: +package_dir = = src +include_package_data = true +python_requires = >= 3.6 + +[options.packages.find] +where = src [tool:pytest] testpaths = tests @@ -10,7 +39,6 @@ [coverage:run] branch = true -parallel = true source = markupsafe tests
diff --git a/setup.py b/setup.py index 02e0c3f..9ef2acd 100644 --- a/setup.py +++ b/setup.py
@@ -1,18 +1,13 @@ import platform -import re import sys from distutils.errors import CCompilerError from distutils.errors import DistutilsExecError from distutils.errors import DistutilsPlatformError from setuptools import Extension -from setuptools import find_packages from setuptools import setup from setuptools.command.build_ext import build_ext -with open("src/markupsafe/__init__.py", encoding="utf8") as f: - version = re.search(r'__version__ = "(.*?)"', f.read()).group(1) - ext_modules = [Extension("markupsafe._speedups", ["src/markupsafe/_speedups.c"])] @@ -44,32 +39,6 @@ def run_setup(with_binary): setup( name="MarkupSafe", - version=version, - url="https://palletsprojects.com/p/markupsafe/", - project_urls={ - "Documentation": "https://markupsafe.palletsprojects.com/", - "Code": "https://github.com/pallets/markupsafe", - "Issue tracker": "https://github.com/pallets/markupsafe/issues", - }, - license="BSD-3-Clause", - maintainer="Pallets", - maintainer_email="contact@palletsprojects.com", - description="Safely add untrusted strings to HTML/XML markup.", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Text Processing :: Markup :: HTML", - ], - packages=find_packages("src"), - package_dir={"": "src"}, - include_package_data=True, - python_requires=">=3.6", cmdclass={"build_ext": ve_build_ext}, ext_modules=ext_modules if with_binary else [], )