Skip to content

Commit

Permalink
chore: consolidate packaging / tool config to 'pyproject.toml'
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed May 5, 2024
1 parent d57c458 commit 06c6264
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 92 deletions.
2 changes: 0 additions & 2 deletions .coveragerc

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ include contributing.md
include CONTRIBUTORS.txt
include COPYRIGHT.txt
include LICENSE.txt
include .coveragerc
include pytest.ini

include tox.ini rtd.txt

Expand Down
84 changes: 84 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "zodburi"
version = "3.0dev0"
dynamic = ["readme"]
description="Construct ZODB storage instances from URIs."
keywords = [
"zodb",
"zodbconn",
]
authors = [
{name = "Chris Rossi", email = "[email protected]"},
]
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: Repoze Public License",
]
requires-python = ">=3.8"
dependencies = [
"ZODB",
"ZConfig",
"ZEO"
]

[project.entry-points.'zodburi.resolvers']
zeo = "zodburi.resolvers:client_storage_resolver"
file = "zodburi.resolvers:file_storage_resolver"
zconfig = "zodburi.resolvers:zconfig_resolver"
memory = "zodburi.resolvers:mapping_storage_resolver"
demo = "zodburi.resolvers:demo_storage_resolver"

[project.urls]
Homepage = "https://docs.pylonsproject.org/projects/zodburi/en/latest/"
Repository = "https://github.com/Pylons/zodburi"
Issues = "https://github.com/Pylons/zodburi/issues"
Changelog = "https://github.com/Pylons/zodburi/blob/master/CHANGES.rst"

[project.optional-dependencies]
testing = [
"pytest",
"pytest-cov",
"check-manifest",
]
docs = [
"Sphinx",
"pylons-sphinx-themes",
]

[tool.setuptools]
packages = ["zodburi"]

[tool.setuptools.dynamic]
readme = {file = ["README.rst", "CHANGES.rst"]}

[tool.pytest.ini_options]
addopts = [
"-l",
"--strict",
]
norecursedirs = [
"lib",
"include",
".tox",
".git",
]
python_files = "test_*.py"
filterwarnings = [
"ignore::DeprecationWarning:pkg_resources",
]

[tool.coverage.report]
show_missing = true
7 changes: 0 additions & 7 deletions pytest.ini

This file was deleted.

13 changes: 0 additions & 13 deletions setup.cfg

This file was deleted.

67 changes: 1 addition & 66 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,68 +1,3 @@
import os

from setuptools import setup
from setuptools import find_packages

here = os.path.abspath(os.path.dirname(__file__))

try:
with open(os.path.join(here, 'README.rst')) as f:
README = f.read()
except OSError:
README = ''

try:
with open(os.path.join(here, 'CHANGES.rst')) as f:
CHANGES = f.read()
except OSError:
CHANGES = ''

requires = ['ZODB', 'ZConfig', 'ZEO']
tests_require = requires + ['mock']
testing_extras = tests_require + ['nose', 'coverage']
docs_extras = tests_require + [
'Sphinx >= 1.8.1',
'repoze.sphinx.autointerface',
'pylons-sphinx-themes >= 1.0.10',
]

setup(name='zodburi',
version='2.6.1dev0',
description=('Construct ZODB storage instances from URIs.'),
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: Repoze Public License",
],
keywords='zodb zodbconn',
author="Chris Rossi",
author_email="[email protected]",
url="https://pylonsproject.org/",
license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
packages=find_packages(),
include_package_data=True,
zip_safe=False,
python_requires='>=3.8',
install_requires = requires,
entry_points="""\
[zodburi.resolvers]
zeo = zodburi.resolvers:client_storage_resolver
file = zodburi.resolvers:file_storage_resolver
zconfig = zodburi.resolvers:zconfig_resolver
memory = zodburi.resolvers:mapping_storage_resolver
demo = zodburi.resolvers:demo_storage_resolver
""",
extras_require = {
'testing': testing_extras,
'docs': docs_extras,
},
)
setup()
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ commands =
py.test -q
deps =
pytest
mock
ZODB==5.*
ZEO==5.*

Expand All @@ -29,7 +28,7 @@ deps =

[testenv:docs]
basepython =
python3.11
python3.12
commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
deps =
Expand Down

0 comments on commit 06c6264

Please sign in to comment.