Skip to content

Commit 02afcab

Browse files
committed
unify repository layout
1 parent d7e76bd commit 02afcab

File tree

7 files changed

+41
-45
lines changed

7 files changed

+41
-45
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- 3.6
1717
- 3.7
1818
- 3.8
19+
- 3.9
1920
- pypy3
2021

2122
steps:

CHANGELOG.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ dev
1616
4.0.0 (2020-08-30)
1717
------------------
1818

19-
API Changes (Backward-Incompatible)
20-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19+
**API Changes (Backward Incompatible)**
2120

2221
- Support for Python 2.7 has been removed.
2322
- Support for Python 3.4 has been removed.

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
graft src
1+
graft src/hpack
22
graft docs
33
graft test
44
prune bench
@@ -7,5 +7,5 @@ prune utils
77
exclude tasks.py
88
exclude test/test_fixtures/*/*.json
99
exclude test/test_hpack_integration.py
10-
include README.rst LICENSE CHANGELOG.rst CONTRIBUTORS.rst tox.ini Makefile
10+
include README.rst LICENSE CHANGELOG.rst CONTRIBUTORS.rst tox.ini
1111
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store

Makefile

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ hpack: HTTP/2 Header Encoding for Python
1515
:target: https://gitter.im/python-hyper/community
1616
:alt: Chat community
1717

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

2020
This module contains a pure-Python HTTP/2 header encoding (HPACK) logic for use
2121
in Python programs that implement HTTP/2.
2222

23+
Documentation
24+
=============
25+
26+
Documentation is available at https://hpack.readthedocs.io .
27+
2328
Contributing
2429
============
2530

setup.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
import codecs
1+
#!/usr/bin/env python3
2+
43
import os
54
import re
6-
import sys
75

86
from setuptools import setup, find_packages
97

@@ -12,22 +10,15 @@
1210
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_:
1311
long_description = file_.read()
1412

15-
# Get the version
1613
version_regex = r'__version__ = ["\']([^"\']*)["\']'
1714
with open(os.path.join(PROJECT_ROOT, 'src/hpack/__init__.py')) as file_:
1815
text = file_.read()
1916
match = re.search(version_regex, text)
20-
2117
if match:
2218
version = match.group(1)
2319
else:
2420
raise RuntimeError("No version number found!")
2521

26-
# Stealing this from Kenneth Reitz
27-
if sys.argv[-1] == 'publish':
28-
os.system('python setup.py sdist upload')
29-
sys.exit()
30-
3122
setup(
3223
name='hpack',
3324
version=version,
@@ -38,10 +29,9 @@
3829
author_email='[email protected]',
3930
url='https://github.com/python-hyper/hpack',
4031
packages=find_packages(where="src"),
41-
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst']},
32+
package_data={'hpack': []},
4233
package_dir={'': 'src'},
4334
python_requires='>=3.6.1',
44-
include_package_data=True,
4535
license='MIT License',
4636
classifiers=[
4737
'Development Status :: 5 - Production/Stable',
@@ -52,6 +42,7 @@
5242
'Programming Language :: Python :: 3.6',
5343
'Programming Language :: Python :: 3.7',
5444
'Programming Language :: Python :: 3.8',
45+
'Programming Language :: Python :: 3.9',
5546
'Programming Language :: Python :: Implementation :: CPython',
5647
'Programming Language :: Python :: Implementation :: PyPy',
5748
],

tox.ini

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
[tox]
2-
envlist = py36, py37, py38, pypy3, lint, docs, packaging
2+
envlist = py36, py37, py38, py39, pypy3, lint, docs, packaging
33

44
[gh-actions]
55
python =
66
3.6: py36
77
3.7: py37
8-
3.8: py38, lint, docs, packaging
8+
3.8: py38
9+
3.9: py39, lint, docs, packaging
910
pypy3: pypy3
1011

1112
[testenv]
1213
passenv =
1314
GITHUB_*
1415
deps =
15-
pytest==6.0.1
16-
pytest-cov==2.10.1
17-
pytest-xdist==2.0.0
18-
hypothesis>=5.5,<6
19-
attrs==19.3.0
16+
pytest>=6.0.1,<7
17+
pytest-cov>=2.10.1,<3
18+
pytest-xdist>=2.0.0,<3
19+
hypothesis>=5.5,<7
2020
commands =
2121
pytest --cov-report=xml --cov-report=term --cov=hpack {posargs}
2222

@@ -25,32 +25,41 @@ commands =
2525
commands = pytest {posargs}
2626

2727
[testenv:lint]
28-
basepython = python3.8
2928
deps =
30-
flake8==3.8.3
31-
commands = flake8 --max-complexity 10 src test utils
29+
flake8>=3.9.1,<4
30+
commands = flake8 src/ test/ utils/
3231

3332
[testenv:docs]
34-
basepython = python3.8
3533
deps =
36-
sphinx==3.2.1
34+
sphinx>=4.0.2,<5
3735
whitelist_externals = make
3836
changedir = {toxinidir}/docs
3937
commands =
4038
make clean
4139
make html
4240

4341
[testenv:packaging]
44-
basepython = python3.8
42+
basepython = python3.9
4543
deps =
46-
check-manifest==0.42
47-
readme-renderer==26.0
48-
twine==3.2.0
44+
check-manifest==0.46
45+
readme-renderer==29.0
46+
twine>=3.4.1,<4
47+
whitelist_externals = rm
4948
commands =
49+
rm -rf dist/
5050
check-manifest
5151
python setup.py sdist bdist_wheel
5252
twine check dist/*
5353

54+
[testenv:publish]
55+
basepython = {[testenv:packaging]basepython}
56+
deps =
57+
{[testenv:packaging]deps}
58+
whitelist_externals = {[testenv:packaging]whitelist_externals}
59+
commands =
60+
{[testenv:packaging]commands}
61+
twine upload dist/*
62+
5463
[testenv:bench]
5564
deps =
5665
{[testenv]deps}
@@ -60,4 +69,6 @@ commands =
6069

6170
[testenv:create_test_output]
6271
basepython = python3.7
72+
; rm -rf hpack-test-case/
73+
; git clone https://github.com/http2jp/hpack-test-case.git
6374
commands = python {toxinidir}/utils/create_test_output.py {posargs}

0 commit comments

Comments
 (0)