Skip to content

Commit

Permalink
Switch kgb to pyproject.toml.
Browse files Browse the repository at this point in the history
This modernizes kgb's packaging, moving from `setup.py` to
`pyproject.toml`. This maintains Python 2/3 compatibility, but allows us
to use modern `pip` to put this into an editable install and stay
compliant with modern Python practices.

The metadata has changed to now explicitly list Python 3.12 and 3.13 as
supported versions.

Testing Done:
Successfully built source dists and wheels, verifying the package
contents and the Python 2/3 compatibility metadata.

Reviewed at https://reviews.reviewboard.org/r/14172/
  • Loading branch information
chipx86 committed Nov 4, 2024
1 parent d1c01a9 commit 7d3e8a2
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 82 deletions.
64 changes: 64 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[build-system]
requires = ['setuptools']
build-backend = 'setuptools.build_meta'

[project]
name = 'kgb'
description = 'Utilities for spying on function calls in unit tests.'
authors = [
{name = 'Beanbag, Inc.', email = '[email protected]'},
]
license = { text = 'MIT' }
readme = 'README.rst'
requires-python = '>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*'
dynamic = ['version']

keywords = [
'pytest',
'unit tests',
'spies',
]

classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Other Environment',
'Framework :: Pytest',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'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 :: 3.12',
'Programming Language :: Python :: 3.13',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Testing',
]


[project.urls]
Homepage = 'https://github.com/beanbaginc/kgb'
Documentation = 'https://github.com/beanbaginc/kgb'
Repository = 'https://github.com/beanbaginc/kgb'


[project.entry-points."pytest11"]
kgb = 'kgb.pytest_plugin'


[tool.setuptools.dynamic]
version = { attr = 'kgb.get_package_version' }


[tool.setuptools.packages.find]
where = ['.']
include = ['kgb*']
namespaces = false
82 changes: 0 additions & 82 deletions setup.py

This file was deleted.

0 comments on commit 7d3e8a2

Please sign in to comment.