Skip to content

Commit

Permalink
Migrate most metadata to setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed May 12, 2023
1 parent b2014fe commit 76051b8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 39 deletions.
41 changes: 40 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,48 @@ extend-ignore = E203
# black uses 88 : ¯\_(ツ)_/¯
max-line-length = 88

[metadata]
name = maxminddb
author = Gregory Oschwald
author_email = goschwald@maxmind.com
license = Apache License, Version 2.0
description = Reader for the MaxMind DB format
url = http://www.maxmind.com/
long_description = file: README.rst
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Web Environment
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Programming Language :: Python :: 3
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
Topic :: Internet :: Proxy Servers
Topic :: Internet
project_urls =
Documentation = https://maxminddb.readthedocs.org/
Source Code = https://github.com/maxmind/MaxMind-DB-Reader-python
Issue Tracker = https://github.com/maxmind/MaxMind-DB-Reader-python/issues

[options]
package_dir =
maxminddb = maxminddb
packages = maxminddb
install_requires =
include_package_data = True
python_requires = >=3.7

[wheel]
universal = 1

[options.package_data]
maxminddb = extension.pyi; py.typed

[tox:tox]
envlist = {py37,py38,py39,py310}-test,py310-{black,lint,flake8,mypy}

Expand All @@ -23,7 +62,7 @@ passenv = *

[testenv:py310-black]
deps = black
commands = black --check --diff .
commands = black --check --diff .

[testenv:py310-lint]
deps = pylint
Expand Down
38 changes: 0 additions & 38 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
cmdclass = {}
PYPY = hasattr(sys, "pypy_version_info")
JYTHON = sys.platform.startswith("java")
requirements = []

compile_args = ["-Wall", "-Wextra"]

Expand Down Expand Up @@ -73,9 +72,6 @@ def build_extension(self, ext):

with open(os.path.join(ROOT, "maxminddb", "__init__.py"), "rb") as fd:
maxminddb_text = fd.read().decode("utf8")
LICENSE = (
re.compile(r".*__license__ = \"(.*?)\"", re.S).match(maxminddb_text).group(1)
)
VERSION = (
re.compile(r".*__version__ = \"(.*?)\"", re.S).match(maxminddb_text).group(1)
)
Expand Down Expand Up @@ -104,42 +100,8 @@ def run_setup(with_cext):
kwargs["ext_modules"] = ext_module

setup(
name="maxminddb",
version=VERSION,
author="Gregory Oschwald",
author_email="goschwald@maxmind.com",
description="Reader for the MaxMind DB format",
long_description=README,
url="http://www.maxmind.com/",
packages=find_packages("."),
package_data={"": ["LICENSE"], "maxminddb": ["extension.pyi", "py.typed"]},
package_dir={"maxminddb": "maxminddb"},
project_urls={
"Documentation": "https://maxminddb.readthedocs.org/",
"Source Code": "https://github.com/maxmind/MaxMind-DB-Reader-python",
"Issue Tracker": "https://github.com/maxmind/MaxMind-DB-Reader-python/issues",
},
python_requires=">=3.7",
include_package_data=True,
install_requires=requirements,
license=LICENSE,
cmdclass=cmdclass,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"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",
"Topic :: Internet :: Proxy Servers",
"Topic :: Internet",
],
**kwargs
)

Expand Down

0 comments on commit 76051b8

Please sign in to comment.