Add pyproject.toml and switch setup.py to setup.cfg

This commit is contained in:
Lumir Balhar 2022-11-16 07:22:54 +01:00 committed by Ram Rachum
parent 1ad8ae08b0
commit 231969074e
3 changed files with 39 additions and 48 deletions

3
pyproject.toml Normal file
View File

@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

36
setup.cfg Normal file
View File

@ -0,0 +1,36 @@
[metadata]
name = PySnooper
version = attr: pysnooper.__version__
author = Ram Rachum
author_email = ram@rachum.com
description = A poor man's debugger for Python.
url = https://github.com/cool-RR/PySnooper
long_description = file: README.md
long_description_content_type = text/markdown
classifiers =
Environment :: Console
Intended Audience :: Developers
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
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 :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Topic :: Software Development :: Debuggers
[options]
packages = find:
install_requires = file: requirements.in
[options.packages.find]
exclude = tests*
[options.extras_require]
tests = pytest

View File

@ -1,48 +0,0 @@
# Copyright 2019 Ram Rachum and collaborators.
# This program is distributed under the MIT license.
import setuptools
import re
def read_file(filename):
with open(filename) as file:
return file.read()
version = re.search("__version__ = '([0-9.]*)'",
read_file('pysnooper/__init__.py')).group(1)
setuptools.setup(
name='PySnooper',
version=version,
author='Ram Rachum',
author_email='ram@rachum.com',
description="A poor man's debugger for Python.",
long_description=read_file('README.md'),
long_description_content_type='text/markdown',
url='https://github.com/cool-RR/PySnooper',
packages=setuptools.find_packages(exclude=['tests*']),
install_requires=read_file('requirements.in'),
extras_require={
'tests': {
'pytest',
},
},
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'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 :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Debuggers',
],
)