Skip to content

Commit 67a9755

Browse files
committed
unify repository layout
1 parent 55bf7a4 commit 67a9755

File tree

3 files changed

+33
-44
lines changed

3 files changed

+33
-44
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
graft src
1+
graft src/wsproto
22
graft compliance
33
graft example
44
graft docs

setup.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
import os
44
import re
5-
import sys
65

76
from setuptools import setup, find_packages
87

@@ -11,22 +10,15 @@
1110
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_:
1211
long_description = file_.read()
1312

14-
# Get the version
1513
version_regex = r'__version__ = ["\']([^"\']*)["\']'
1614
with open(os.path.join(PROJECT_ROOT, 'src/wsproto/__init__.py')) as file_:
1715
text = file_.read()
1816
match = re.search(version_regex, text)
19-
2017
if match:
2118
version = match.group(1)
2219
else:
2320
raise RuntimeError("No version number found!")
2421

25-
# Stealing this from Cory Benfield who stole it from Kenneth Reitz
26-
if sys.argv[-1] == 'publish':
27-
os.system('python setup.py sdist upload')
28-
sys.exit()
29-
3022
setup(
3123
name='wsproto',
3224
version=version,
@@ -37,10 +29,9 @@
3729
author_email='[email protected]',
3830
url='https://github.com/python-hyper/wsproto/',
3931
packages=find_packages(where="src"),
40-
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst']},
32+
package_data={'wsproto': ['py.typed']},
4133
package_dir={'': 'src'},
4234
python_requires='>=3.6.1',
43-
include_package_data=True,
4435
license='MIT License',
4536
classifiers=[
4637
'Development Status :: 5 - Production/Stable',

tox.ini

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,73 @@
11
[tox]
2-
envlist = py36, py37, py38, py39, pypy3, format, mypy, 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, 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]
1313
passenv =
1414
GITHUB_*
1515
deps =
16-
pytest==6.1.2
17-
pytest-cov==2.10.1
18-
pytest-xdist==2.1.0
16+
pytest>=6.1.2,<7
17+
pytest-cov>=2.10.1,<3
18+
pytest-xdist>=2.2.1,<3
1919
commands =
2020
pytest --cov-report=xml --cov-report=term --cov=wsproto {posargs}
2121

2222
[testenv:pypy3]
2323
# temporarily disable coverage testing on PyPy due to performance problems
2424
commands = pytest {posargs}
2525

26-
[testenv:autobahn]
27-
changedir = {toxinidir}/compliance
28-
commands =
29-
python run-autobahn-tests.py {env:SIDE:}
30-
31-
[testenv:format]
32-
basepython = python3.8
26+
[testenv:lint]
3327
deps =
28+
prospector==1.3.1
3429
black==20.8b1
3530
isort==5.6.4
36-
commands =
37-
black --check --diff src/ test/ example/ compliance/ bench/
38-
isort --check --diff src/ test/ example/ compliance/ bench/
39-
40-
[testenv:mypy]
41-
basepython = python3.8
42-
deps =
4331
mypy==0.790
4432
pytest==6.1.2
4533
commands =
34+
prospector
35+
black --check --diff src/ test/ example/ compliance/ bench/
36+
isort --check --diff src/ test/ example/ compliance/ bench/
4637
mypy src/ test/ example/ bench/
4738

48-
[testenv:lint]
49-
basepython = python3.8
50-
deps =
51-
prospector==1.3.1
52-
commands = prospector
53-
5439
[testenv:docs]
55-
basepython = python3.8
5640
deps =
57-
sphinx==3.3.1
41+
sphinx>=4.0.2,<5
5842
whitelist_externals = make
5943
changedir = {toxinidir}/docs
6044
commands =
6145
make clean
6246
make html
6347

6448
[testenv:packaging]
65-
basepython = python3.8
49+
basepython = python3.9
6650
deps =
67-
check-manifest==0.45
68-
readme-renderer==28.0
69-
twine==3.2.0
51+
check-manifest==0.46
52+
readme-renderer==29.0
53+
twine>=3.4.1,<4
7054
whitelist_externals = rm
7155
commands =
7256
rm -rf dist/
7357
check-manifest
7458
python setup.py sdist bdist_wheel
7559
twine check dist/*
60+
61+
[testenv:publish]
62+
basepython = {[testenv:packaging]basepython}
63+
deps =
64+
{[testenv:packaging]deps}
65+
whitelist_externals = {[testenv:packaging]whitelist_externals}
66+
commands =
67+
{[testenv:packaging]commands}
68+
twine upload dist/*
69+
70+
[testenv:autobahn]
71+
changedir = {toxinidir}/compliance
72+
commands =
73+
python run-autobahn-tests.py {env:SIDE:}

0 commit comments

Comments
 (0)