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

Commit

Permalink
Moved the metadata into setup.cfg.
Browse files Browse the repository at this point in the history
Added pyproject.toml.
  • Loading branch information
KOLANICH committed Jan 12, 2021
1 parent 18b629b commit 4b13c1b
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 58 deletions.
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build-system]
requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
56 changes: 55 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
[metadata]
name = hyper
version = attr: setup.__version__
author = Cory Benfield
author_email = [email protected]
license = MIT License
description = HTTP/2 Client for Python
long_description = file: README.rst, HISTORY.rst
url = http://hyper.rtfd.org
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: Implementation :: CPython

[options]
packages =
hyper
hyper.http20
hyper.common
hyper.http11
install_requires =
h2>=2.4,<3.0,!=2.5.0
hyperframe>=3.2,<4.0
rfc3986>=1.1.0,<2.0
brotlipy>=0.7.0
pyOpenSSL>=0.15; python_full_version < "2.7.9" # Fallback to good SSL on bad Python versions.
service_identity>=14.0.0; python_full_version < "2.7.9"
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.
enum34>=1.0.4, <2; python_version == "2.7" or python_version == "3.3"

include_package_data = True
tests_require = pytest; requests; mock

[options.entry_points]
console_scripts = hyper = hyper.cli:main

[options.extras_require]
fast = pycohttpparser

[options.package_data]
"" =
LICENSE
README.rst
CONTRIBUTORS.rst
HISTORY.rst
NOTICES

[wheel]
universal = 1

[flake8]
max-complexity = 15
max-complexity = 15
60 changes: 3 additions & 57 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run_tests(self):
match = re.search(version_regex, text)

if match:
version = match.group(1)
__version__ = match.group(1)
else:
raise RuntimeError("No version number found!")

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


packages = [
'hyper',
'hyper.http20',
'hyper.common',
'hyper.http11',
]

setup(
name='hyper',
version=version,
description='HTTP/2 Client for Python',
long_description=open('README.rst').read() + '\n\n' + open('HISTORY.rst').read(),
author='Cory Benfield',
author_email='[email protected]',
url='http://hyper.rtfd.org',
packages=packages,
package_data={'': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst', 'NOTICES']},
package_dir={'hyper': 'hyper'},
include_package_data=True,
license='MIT License',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
],
install_requires=[
'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'
],
tests_require=['pytest', 'requests', 'mock'],
cmdclass={'test': PyTest},
entry_points={
'console_scripts': [
'hyper = hyper.cli:main',
],
},
extras_require={
'fast': ['pycohttpparser'],
# Fallback to good SSL on bad Python versions.
':python_full_version < "2.7.9"': [
'pyOpenSSL>=0.15', 'service_identity>=14.0.0'
],
# 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.
':platform_python_implementation == "PyPy" and python_full_version < "2.7.9"': [
'cryptography<1.0'
],
':python_version == "2.7" or python_version == "3.3"': ['enum34>=1.0.4, <2']
}
)
if __name__ == "__main__":
setup(cmdclass={'test': PyTest})

0 comments on commit 4b13c1b

Please sign in to comment.