Skip to content

Commit

Permalink
unify repository layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Jun 6, 2021
1 parent 94b89b8 commit 8ab1e61
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 32 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- 3.6
- 3.7
- 3.8
- 3.9
- pypy3

steps:
Expand Down
11 changes: 9 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ dev
**Note:** The GitHub repository has been renamed to ``python-hyper/h2``, previously
was ``python-hyper/hyper-h2``. **The name of the package on PyPI is unchanged**

**API Changes (Backward Incompatible)**
API Changes (Backward-Compatible)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Support for Python 3.9 has been added.

API Changes (Backward-Incompatible)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-

**Bugfixes**
Bugfixes
~~~~~~~~

-

Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
graft h2
graft src/h2
graft docs
graft test
graft visualizer
graft examples
prune docs/build
recursive-include examples *.py *.crt *.key *.pem *.csr
include README.rst LICENSE CHANGELOG.rst tox.ini Makefile
include README.rst LICENSE CHANGELOG.rst tox.ini
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ h2: HTTP/2 Protocol Stack
:target: https://codecov.io/gh/python-hyper/h2
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/h2/badge/?version=latest
:target: https://h2.readthedocs.io
:target: https://h2.readthedocs.io/en/latest/
:alt: Documentation Status
.. image:: https://img.shields.io/badge/chat-join_now-brightgreen.svg
:target: https://gitter.im/python-hyper/community
:alt: Chat community

.. image:: https://raw.github.com/Lukasa/hyper/development/docs/source/images/hyper.png
.. image:: https://raw.github.com/python-hyper/documentation/master/source/logo/hyper-black-bg-white.png

This repository contains a pure-Python implementation of a HTTP/2 protocol
stack. It's written from the ground up to be embeddable in whatever program you
Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ exclude_lines =
source =
src
.tox/*/site-packages

[flake8]
max-line-length = 120
max-complexity = 10
11 changes: 4 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python3

import os
import re
import sys

from setuptools import setup, find_packages

Expand All @@ -11,12 +10,10 @@
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_:
long_description = file_.read()

# Get the version
version_regex = r'__version__ = ["\']([^"\']*)["\']'
with open(os.path.join(PROJECT_ROOT, 'src/h2/__init__.py')) as file_:
text = file_.read()
match = re.search(version_regex, text)

if match:
version = match.group(1)
else:
Expand All @@ -32,10 +29,9 @@
author_email='cory@lukasa.co.uk',
url='https://github.com/python-hyper/h2',
packages=find_packages(where="src"),
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst']},
package_data={'h2': []},
package_dir={'': 'src'},
python_requires='>=3.6.1',
include_package_data=True,
license='MIT License',
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand All @@ -46,6 +42,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
Expand Down
36 changes: 22 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
[tox]
envlist = py36, py37, py38, pypy3, lint, docs, packaging
envlist = py36, py37, py38, py39, pypy3, lint, docs, packaging

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38, format, mypy, lint, docs, packaging, h2spec
3.8: py38
3.9: py39, lint, docs, packaging, h2spec
pypy3: pypy3

[testenv]
passenv =
GITHUB_*
deps =
pytest==6.0.2
pytest-cov==2.10.1
pytest-xdist==2.1.0
pytest>=6.0.1,<7
pytest-cov>=2.10.1,<3
pytest-xdist>=2.0.0,<3
hypothesis>=5.5,<6
commands =
pytest --cov-report=xml --cov-report=term --cov=h2 {posargs}
Expand All @@ -24,34 +25,41 @@ commands =
commands = pytest {posargs}

[testenv:lint]
basepython = python3.8
deps =
flake8==3.8.3
commands = flake8 --max-complexity 10 src test
flake8>=3.9.1,<4
commands = flake8 src/ test/

[testenv:docs]
basepython = python3.8
deps =
sphinx==3.2.1
sphinx>=4.0.2,<5
whitelist_externals = make
changedir = {toxinidir}/docs
commands =
make clean
make html

[testenv:packaging]
basepython = python3.8
basepython = python3.9
deps =
check-manifest==0.42
readme-renderer==26.0
twine==3.2.0
check-manifest==0.46
readme-renderer==29.0
twine>=3.4.1,<4
whitelist_externals = rm
commands =
rm -rf dist/
check-manifest
python setup.py sdist bdist_wheel
twine check dist/*

[testenv:publish]
basepython = {[testenv:packaging]basepython}
deps =
{[testenv:packaging]deps}
whitelist_externals = {[testenv:packaging]whitelist_externals}
commands =
{[testenv:packaging]commands}
twine upload dist/*

[testenv:graphs]
basepython = python3.8
deps =
Expand Down

0 comments on commit 8ab1e61

Please sign in to comment.