Skip to content

Commit e2b69ea

Browse files
authored
Merge pull request #126 from maxmind/greg/modernize-packaging
Switch to pyproject.toml for project info
2 parents 13afab4 + add31ca commit e2b69ea

File tree

5 files changed

+56
-67
lines changed

5 files changed

+56
-67
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include HISTORY.rst README.rst LICENSE minfraud/py.typed
2+
exclude .* .github/**/* dev-bin/*
23
recursive-include tests *
34
recursive-include docs *
45
recursive-exclude docs *.pyc

dev-bin/release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ fi
3838
pip install -U sphinx wheel voluptuous email_validator twine geoip2
3939

4040
perl -pi -e "s/(?<=__version__ = \").+?(?=\")/$version/g" minfraud/version.py
41+
perl -pi -e "s/(?<=^version = \").+?(?=\")/$version/gsm" pyproject.toml
4142

4243
echo $"Test results:"
4344
tox
@@ -65,5 +66,5 @@ git push --tags
6566

6667
rm -fr build dist
6768
python -m sphinx -M html ./docs ./build/sphinx -W
68-
python setup.py sdist bdist_wheel
69+
python -m pipx run build
6970
twine upload dist/*

pyproject.toml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,57 @@
1-
# We should probably migrate most of setup.cfg here
1+
[project]
2+
name = "minfraud"
3+
version = "2.8.0"
4+
description = "MaxMind minFraud Score, Insights, Factors and Report Transactions API"
5+
authors = [
6+
{name = "Gregory Oschwald", email = "goschwald@maxmind.com"},
7+
]
8+
dependencies = [
9+
"setuptools>=60.0.0",
10+
"aiohttp>=3.6.2,<4.0.0",
11+
"email_validator>=1.1.1,<3.0.0",
12+
"geoip2>=4.7.0,<5.0.0",
13+
"requests>=2.24.0,<3.0.0",
14+
"voluptuous",
15+
]
16+
requires-python = ">=3.7"
17+
readme = "README.rst"
18+
license = {text = "Apache License 2.0"}
19+
classifiers = [
20+
"Development Status :: 5 - Production/Stable",
21+
"Environment :: Web Environment",
22+
"Intended Audience :: Developers",
23+
"License :: OSI Approved :: Apache Software License",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3",
26+
"Programming Language :: Python :: 3.7",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Topic :: Internet",
32+
"Topic :: Internet :: Proxy Servers",
33+
"Topic :: Internet :: WWW/HTTP",
34+
]
35+
36+
[project.optional-dependencies]
37+
test = [
38+
"mocket>=3.11.1",
39+
]
40+
41+
[tool.setuptools.package-data]
42+
minfraud = ["py.typed"]
43+
44+
[project.urls]
45+
Homepage = "https://www.maxmind.com/"
46+
Documentation = "https://minfraud.readthedocs.org/"
47+
"Source Code" = "https://github.com/maxmind/minfraud-api-python"
48+
"Issue Tracker" = "https://github.com/maxmind/minfraud-api-python/issues"
49+
50+
[build-system]
51+
requires = ["setuptools", "setuptools-scm", "wheel"]
52+
build-backend = "setuptools.build_meta"
253

354
[tool.black]
455
# src is showing up in our GitHub linting builds. It seems to
556
# contain deps.
6-
extend-exclude = '^/src/'
57+
extend-exclude = '^/src/'

setup.cfg

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,7 @@
1-
[metadata]
2-
name = minfraud
3-
author = Gregory Oschwald
4-
author_email = goschwald@maxmind.com
5-
license = Apache License 2.0
6-
description = MaxMind minFraud Score, Insights, Factors and Report Transactions API
7-
url = https://www.maxmind.com/
8-
long_description = file: README.rst
9-
classifiers =
10-
Development Status :: 5 - Production/Stable
11-
Environment :: Web Environment
12-
Intended Audience :: Developers
13-
License :: OSI Approved :: Apache Software License
14-
Programming Language :: Python :: 3
15-
Programming Language :: Python :: 3.7
16-
Programming Language :: Python :: 3.8
17-
Programming Language :: Python :: 3.9
18-
Programming Language :: Python :: 3.10
19-
Programming Language :: Python :: 3.11
20-
Programming Language :: Python
21-
Topic :: Internet :: Proxy Servers
22-
Topic :: Internet :: WWW/HTTP
23-
Topic :: Internet
24-
platforms = any
25-
project_urls =
26-
Documentation = https://minfraud.readthedocs.org/
27-
Source Code = https://github.com/maxmind/minfraud-api-python
28-
Issue Tracker = https://github.com/maxmind/minfraud-api-python/issues
29-
301
[flake8]
312
# black uses 88 : ¯\_(ツ)_/¯
323
max-line-length = 88
334

34-
[options]
35-
packages = minfraud
36-
install_requires =
37-
aiohttp>=3.6.2,<4.0.0
38-
email_validator>=1.1.1,<3.0.0
39-
geoip2>=4.7.0,<5.0.0
40-
requests>=2.24.0,<3.0.0
41-
voluptuous
42-
include_package_data = True
43-
python_requires = >=3.7
44-
test_suite = tests
45-
tests_require = mocket>=3.11.1
46-
47-
[wheel]
48-
universal = 1
49-
50-
[options.package_data]
51-
minfraud = py.typed
52-
535
[tox:tox]
546
envlist = {py37,py38,py39,py310}-test,py310-{black,lint,flake8,mypy}
557

setup.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)