Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 4b13c1b

Browse files
committed
Moved the metadata into setup.cfg.
Added pyproject.toml.
1 parent 18b629b commit 4b13c1b

File tree

3 files changed

+63
-58
lines changed

3 files changed

+63
-58
lines changed

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build-system]
2+
requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools_scm]

setup.cfg

+55-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
1+
[metadata]
2+
name = hyper
3+
version = attr: setup.__version__
4+
author = Cory Benfield
5+
author_email = [email protected]
6+
license = MIT License
7+
description = HTTP/2 Client for Python
8+
long_description = file: README.rst, HISTORY.rst
9+
url = http://hyper.rtfd.org
10+
classifiers =
11+
Development Status :: 3 - Alpha
12+
Intended Audience :: Developers
13+
License :: OSI Approved :: MIT License
14+
Programming Language :: Python
15+
Programming Language :: Python :: 2
16+
Programming Language :: Python :: 2.7
17+
Programming Language :: Python :: 3
18+
Programming Language :: Python :: 3.4
19+
Programming Language :: Python :: 3.5
20+
Programming Language :: Python :: Implementation :: CPython
21+
22+
[options]
23+
packages =
24+
hyper
25+
hyper.http20
26+
hyper.common
27+
hyper.http11
28+
install_requires =
29+
h2>=2.4,<3.0,!=2.5.0
30+
hyperframe>=3.2,<4.0
31+
rfc3986>=1.1.0,<2.0
32+
brotlipy>=0.7.0
33+
pyOpenSSL>=0.15; python_full_version < "2.7.9" # Fallback to good SSL on bad Python versions.
34+
service_identity>=14.0.0; python_full_version < "2.7.9"
35+
cryptography<1.0; platform_python_implementation == "pypy" and python_full_version < "2.7.9" # PyPy with bad SSL modules will likely also need the cryptography module at lower than 1.0, because it doesn't support CFFI v1.0 yet.
36+
enum34>=1.0.4, <2; python_version == "2.7" or python_version == "3.3"
37+
38+
include_package_data = True
39+
tests_require = pytest; requests; mock
40+
41+
[options.entry_points]
42+
console_scripts = hyper = hyper.cli:main
43+
44+
[options.extras_require]
45+
fast = pycohttpparser
46+
47+
[options.package_data]
48+
"" =
49+
LICENSE
50+
README.rst
51+
CONTRIBUTORS.rst
52+
HISTORY.rst
53+
NOTICES
54+
155
[wheel]
256
universal = 1
357

458
[flake8]
5-
max-complexity = 15
59+
max-complexity = 15

setup.py

+3-57
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def run_tests(self):
3434
match = re.search(version_regex, text)
3535

3636
if match:
37-
version = match.group(1)
37+
__version__ = match.group(1)
3838
else:
3939
raise RuntimeError("No version number found!")
4040

@@ -44,59 +44,5 @@ def run_tests(self):
4444
sys.exit()
4545

4646

47-
packages = [
48-
'hyper',
49-
'hyper.http20',
50-
'hyper.common',
51-
'hyper.http11',
52-
]
53-
54-
setup(
55-
name='hyper',
56-
version=version,
57-
description='HTTP/2 Client for Python',
58-
long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(),
59-
author='Cory Benfield',
60-
author_email='[email protected]',
61-
url='http://hyper.rtfd.org',
62-
packages=packages,
63-
package_data={'': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst', 'NOTICES']},
64-
package_dir={'hyper': 'hyper'},
65-
include_package_data=True,
66-
license='MIT License',
67-
classifiers=[
68-
'Development Status :: 3 - Alpha',
69-
'Intended Audience :: Developers',
70-
'License :: OSI Approved :: MIT License',
71-
'Programming Language :: Python',
72-
'Programming Language :: Python :: 2',
73-
'Programming Language :: Python :: 2.7',
74-
'Programming Language :: Python :: 3',
75-
'Programming Language :: Python :: 3.4',
76-
'Programming Language :: Python :: 3.5',
77-
'Programming Language :: Python :: Implementation :: CPython',
78-
],
79-
install_requires=[
80-
'h2>=2.4,<3.0,!=2.5.0', 'hyperframe>=3.2,<4.0', 'rfc3986>=1.1.0,<2.0', 'brotlipy>=0.7.0,<1.0'
81-
],
82-
tests_require=['pytest', 'requests', 'mock'],
83-
cmdclass={'test': PyTest},
84-
entry_points={
85-
'console_scripts': [
86-
'hyper = hyper.cli:main',
87-
],
88-
},
89-
extras_require={
90-
'fast': ['pycohttpparser'],
91-
# Fallback to good SSL on bad Python versions.
92-
':python_full_version < "2.7.9"': [
93-
'pyOpenSSL>=0.15', 'service_identity>=14.0.0'
94-
],
95-
# PyPy with bad SSL modules will likely also need the cryptography
96-
# module at lower than 1.0, because it doesn't support CFFI v1.0 yet.
97-
':platform_python_implementation == "PyPy" and python_full_version < "2.7.9"': [
98-
'cryptography<1.0'
99-
],
100-
':python_version == "2.7" or python_version == "3.3"': ['enum34>=1.0.4, <2']
101-
}
102-
)
47+
if __name__ == "__main__":
48+
setup(cmdclass={'test': PyTest})

0 commit comments

Comments
 (0)