Skip to content

Commit 5d45a96

Browse files
authored
Merge pull request #144 from Kriechi/repo-layout
unify repository layout
2 parents a64b888 + ba9f3ee commit 5d45a96

File tree

7 files changed

+44
-28
lines changed

7 files changed

+44
-28
lines changed

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
graft priority
1+
graft src/priority
22
graft docs
33
graft test
44
graft visualizer
55
graft examples
66
prune docs/build
77
recursive-include *.py
8-
include README.rst LICENSE CONTRIBUTORS.rst HISTORY.rst tox.ini Makefile
8+
include README.rst LICENSE CONTRIBUTORS.rst HISTORY.rst tox.ini
99
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store

Makefile

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

README.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1+
==========================================
12
Priority: A HTTP/2 Priority Implementation
23
==========================================
34

5+
.. image:: https://github.com/python-hyper/priority/workflows/CI/badge.svg
6+
:target: https://github.com/python-hyper/priority/actions
7+
:alt: Build Status
8+
.. image:: https://codecov.io/gh/python-hyper/priority/branch/master/graph/badge.svg
9+
:target: https://codecov.io/gh/python-hyper/priority
10+
:alt: Code Coverage
11+
.. image:: https://readthedocs.org/projects/priority/badge/?version=latest
12+
:target: https://priority.readthedocs.io/en/latest/
13+
:alt: Documentation Status
14+
.. image:: https://img.shields.io/badge/chat-join_now-brightgreen.svg
15+
:target: https://gitter.im/python-hyper/community
16+
:alt: Chat community
17+
18+
.. image:: https://raw.github.com/python-hyper/documentation/master/source/logo/hyper-black-bg-white.png
19+
20+
421
Priority is a pure-Python implementation of the priority logic for HTTP/2, set
522
out in `RFC 7540 Section 5.3 (Stream Priority)`_. This logic allows for clients
623
to express a preference for how the server allocates its (limited) resources to

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@
6565
# Add any paths that contain custom static files (such as style sheets) here,
6666
# relative to this directory. They are copied after the builtin static files,
6767
# so a file named "default.css" will overwrite the builtin "default.css".
68-
html_static_path = ['_static']
68+
# html_static_path = ['_static']

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ exclude_lines =
1818
source =
1919
src
2020
.tox/*/site-packages
21+
22+
[flake8]
23+
max-line-length = 120
24+
max-complexity = 10

setup.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
1+
#!/usr/bin/env python3
2+
33
import os
44
import re
55

66
from setuptools import setup, find_packages
77

8-
98
PROJECT_ROOT = os.path.dirname(__file__)
109

1110
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_:
1211
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()
1612

17-
# Get the version
1813
version_regex = r'__version__ = ["\']([^"\']*)["\']'
1914
with open(os.path.join(PROJECT_ROOT, 'src/priority/__init__.py')) as file_:
2015
text = file_.read()
2116
match = re.search(version_regex, text)
22-
2317
if match:
2418
version = match.group(1)
2519
else:
@@ -41,10 +35,9 @@
4135
'Changelog': 'https://github.com/python-hyper/priority/blob/master/HISTORY.rst',
4236
},
4337
packages=find_packages(where='src'),
44-
package_data={'': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst']},
38+
package_data={'priority': ['py.typed']},
4539
package_dir={'': 'src'},
4640
python_requires='>=3.6.1',
47-
include_package_data=True,
4841
license='MIT License',
4942
classifiers=[
5043
'Development Status :: 5 - Production/Stable',

tox.ini

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ envlist = py36, py37, py38, py39, pypy3, lint, docs, packaging
55
python =
66
3.6: py36
77
3.7: py37
8-
3.8: py38, format, mypy, lint, docs, packaging
9-
3.9: py39
8+
3.8: py38
9+
3.9: py39, lint, docs, packaging
1010
pypy3: pypy3
1111

1212
[testenv]
@@ -16,7 +16,7 @@ deps =
1616
pytest>=6.2,<7
1717
pytest-cov>=2.10,<3
1818
pytest-xdist>=2.1,<3
19-
hypothesis>=6.9,<6.10
19+
hypothesis>=6.9,<7
2020
commands =
2121
pytest --cov-report=xml --cov-report=term --cov=priority {posargs}
2222

@@ -25,30 +25,37 @@ commands =
2525
commands = pytest {posargs}
2626

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

3332
[testenv:docs]
34-
basepython = python3.8
3533
deps =
36-
sphinx>=3.5,<4
34+
sphinx>=3.5,<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 =
4644
check-manifest==0.46
4745
readme-renderer==29.0
48-
twine==3.4.1
46+
twine>=3.4.1,<4
4947
whitelist_externals = rm
5048
commands =
5149
rm -rf dist/
5250
check-manifest
5351
python setup.py sdist bdist_wheel
5452
twine check dist/*
53+
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/*

0 commit comments

Comments
 (0)