setup: Convert to building with pyproject.toml.
This commit is contained in:
parent
b0d5fe5aa8
commit
09754b9788
3 changed files with 55 additions and 64 deletions
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[build-system]
|
||||
requires = ["setuptools >= 40.6.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
53
setup.cfg
53
setup.cfg
|
@ -1,7 +1,25 @@
|
|||
[metadata]
|
||||
name = paypal_rest
|
||||
version = 1.0.3
|
||||
author = Software Freedom Conservancy
|
||||
author_email = info@sfconservancy.org
|
||||
description = Library to access PayPal’s REST API
|
||||
license = GNU AGPLv3+
|
||||
license_file = LICENSE.txt
|
||||
long_description = file: README.rst
|
||||
long_description_content_type = text/x-rst; charset=UTF-8
|
||||
project_urls =
|
||||
Documentation = %(url)s
|
||||
Source = %(url)s
|
||||
url = https://k.sfconservancy.org/NPO-Accounting/paypal_rest
|
||||
|
||||
[aliases]
|
||||
test=pytest
|
||||
typecheck=pytest --addopts="--mypy paypal_rest"
|
||||
|
||||
[bdist_wheel]
|
||||
universal = 1
|
||||
|
||||
[mypy]
|
||||
disallow_any_unimported = False
|
||||
disallow_untyped_calls = False
|
||||
|
@ -13,14 +31,39 @@ warn_return_any = False
|
|||
warn_unreachable = True
|
||||
warn_unused_configs = True
|
||||
|
||||
[options]
|
||||
include_package_data = True
|
||||
install_requires =
|
||||
iso8601>=0.1
|
||||
oauthlib>=2.0
|
||||
pyxdg>=0.2
|
||||
PyYAML>=3.0
|
||||
requests>=2.0
|
||||
requests-oauthlib>=1.0
|
||||
packages = find:
|
||||
platforms = any
|
||||
python_requires = >=3.6
|
||||
tests_require =
|
||||
mypy>=0.770
|
||||
pytest
|
||||
pytest-runner
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
paypal-query = paypal_rest.cliquery:entry_point
|
||||
|
||||
[options.packages.find]
|
||||
include =
|
||||
paypal_rest
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
./setup.py test
|
||||
./setup.py typecheck
|
||||
|
||||
[tool:pytest]
|
||||
filterwarnings =
|
||||
ignore::DeprecationWarning:^socks$
|
||||
|
||||
[tox:tox]
|
||||
envlist = py36,py37
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
./setup.py test
|
||||
./setup.py typecheck
|
||||
|
|
63
setup.py
63
setup.py
|
@ -1,62 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
"""setup.py - paypal_rest installation script"""
|
||||
# Copyright © 2020 Brett Smith
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""setup.py - setuptools compatibility shim"""
|
||||
|
||||
from pathlib import Path
|
||||
from setuptools import setup
|
||||
import setuptools
|
||||
|
||||
README_PATH = Path(__file__).with_name('README.rst')
|
||||
|
||||
with README_PATH.open() as readme_file:
|
||||
long_description = readme_file.read()
|
||||
|
||||
setup(
|
||||
name='paypal_rest',
|
||||
version='1.0.2',
|
||||
author='Software Freedom Conservancy',
|
||||
author_email='info@sfconservancy.org',
|
||||
license='GNU AGPLv3+',
|
||||
url='https://k.sfconservancy.org/NPO-Accounting/paypal_rest',
|
||||
description="Library to access PayPal's REST API",
|
||||
long_description=long_description,
|
||||
|
||||
python_requires='>=3.6',
|
||||
install_requires=[
|
||||
'iso8601>=0.1', # Debian:python3-iso8601
|
||||
'oauthlib>=2.0', # Debian:python3-oauthlib
|
||||
'pyxdg>=0.2', # Debian:python3-xdg
|
||||
'PyYAML>=3.0', # Debian:python3-yaml
|
||||
'requests>=2.0', # Debian:python3-requests
|
||||
'requests-oauthlib>=1.0', # Debian:python3-requests-oauthlib
|
||||
],
|
||||
setup_requires=[
|
||||
'pytest-mypy',
|
||||
'pytest-runner', # Debian:python3-pytest-runner
|
||||
],
|
||||
tests_require=[
|
||||
'mypy>=0.770', # Debian:python3-mypy
|
||||
'pytest', # Debian:python3-pytest
|
||||
],
|
||||
|
||||
packages=[
|
||||
'paypal_rest',
|
||||
],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'paypal-query = paypal_rest.cliquery:entry_point',
|
||||
],
|
||||
},
|
||||
)
|
||||
if __name__ == "__main__":
|
||||
setuptools.setup()
|
||||
|
|
Loading…
Reference in a new issue