Skip to content

Commit 70a3077

Browse files
committed
apply setup-py-upgrade
1 parent 5ee7f67 commit 70a3077

File tree

2 files changed

+42
-66
lines changed

2 files changed

+42
-66
lines changed

setup.cfg

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
[metadata]
2+
name = priority
3+
version = attr: priority.__version__
4+
description = A pure-Python implementation of the HTTP/2 priority tree
5+
long_description = file: README.rst, HISTORY.rst
6+
long_description_content_type = text/x-rst
7+
author = Cory Benfield
8+
author_email = cory@lukasa.co.uk
9+
url = https://github.com/python-hyper/priority/
10+
project_urls =
11+
Documentation=https://python-hyper.org/projects/priority/
12+
Source=https://github.com/python-hyper/priority/
13+
Tracker=https://github.com/python-hyper/priority/issues
14+
Changelog=https://github.com/python-hyper/priority/blob/master/HISTORY.rst
15+
license = MIT License
16+
classifiers =
17+
Development Status :: 5 - Production/Stable
18+
Intended Audience :: Developers
19+
License :: OSI Approved :: MIT License
20+
Programming Language :: Python
21+
Programming Language :: Python :: 3
22+
Programming Language :: Python :: 3.6
23+
Programming Language :: Python :: 3.7
24+
Programming Language :: Python :: 3.8
25+
Programming Language :: Python :: 3.9
26+
Programming Language :: Python :: Implementation :: CPython
27+
Programming Language :: Python :: Implementation :: PyPy
28+
29+
[options]
30+
packages = find:
31+
package_dir = =src
32+
python_requires = >=3.6.1
33+
include_package_data = True
34+
35+
[options.packages.find]
36+
where = src
37+
38+
[options.extras_require]
39+
mypy = mypy>=0.812
40+
141
[tool:pytest]
242
testpaths = test
343

setup.py

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,3 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
import os
4-
import re
1+
from setuptools import setup # type: ignore[import]
52

6-
from setuptools import setup, find_packages # type: ignore[import]
7-
8-
9-
PROJECT_ROOT = os.path.dirname(__file__)
10-
11-
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_:
12-
long_description = file_.read()
13-
long_description += '\n\n'
14-
with open(os.path.join(PROJECT_ROOT, 'HISTORY.rst')) as file_:
15-
long_description += file_.read()
16-
17-
# Get the version
18-
version_regex = r'__version__ = ["\']([^"\']*)["\']'
19-
with open(os.path.join(PROJECT_ROOT, 'src/priority/__init__.py')) as file_:
20-
text = file_.read()
21-
match = re.search(version_regex, text)
22-
23-
if match:
24-
version = match.group(1)
25-
else:
26-
raise RuntimeError("No version number found!")
27-
28-
setup(
29-
name='priority',
30-
version=version,
31-
description='A pure-Python implementation of the HTTP/2 priority tree',
32-
long_description=long_description,
33-
long_description_content_type='text/x-rst',
34-
author='Cory Benfield',
35-
author_email='cory@lukasa.co.uk',
36-
url='https://github.com/python-hyper/priority/',
37-
project_urls={
38-
'Documentation': 'https://python-hyper.org/projects/priority/',
39-
'Source': 'https://github.com/python-hyper/priority/',
40-
'Tracker': 'https://github.com/python-hyper/priority/issues',
41-
'Changelog': 'https://github.com/python-hyper/priority/blob/master/HISTORY.rst',
42-
},
43-
packages=find_packages(where='src'),
44-
package_data={
45-
'': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst']
46-
},
47-
package_dir={'': 'src'},
48-
python_requires='>=3.6.1',
49-
include_package_data=True,
50-
license='MIT License',
51-
classifiers=[
52-
'Development Status :: 5 - Production/Stable',
53-
'Intended Audience :: Developers',
54-
'License :: OSI Approved :: MIT License',
55-
'Programming Language :: Python',
56-
'Programming Language :: Python :: 3',
57-
'Programming Language :: Python :: 3.6',
58-
'Programming Language :: Python :: 3.7',
59-
'Programming Language :: Python :: 3.8',
60-
'Programming Language :: Python :: 3.9',
61-
'Programming Language :: Python :: Implementation :: CPython',
62-
'Programming Language :: Python :: Implementation :: PyPy',
63-
],
64-
extras_require={
65-
"mypy": ["mypy>=0.812"],
66-
},
67-
)
3+
setup()

0 commit comments

Comments
 (0)