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 9eac101 commit 5632eb8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 30 deletions.
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
graft src
graft src/hyperframe
graft docs
graft test
prune docs/build
prune test/http2-frame-test-case
include README.rst LICENSE CHANGELOG.rst CONTRIBUTORS.rst tox.ini .gitmodules
include src/hyperframe/py.typed
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ source =

[flake8]
max-line-length = 120
max-complexity = 10

[check-manifest]
ignore =
Expand Down
12 changes: 4 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import itertools
#!/usr/bin/env python3

import os
import re
import sys

from setuptools import setup, find_packages

Expand All @@ -12,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/hyperframe/__init__.py')) as file_:
text = file_.read()
match = re.search(version_regex, text)

if match:
version = match.group(1)
else:
Expand All @@ -33,10 +29,9 @@
author_email='cory@lukasa.co.uk',
url='https://github.com/python-hyper/hyperframe/',
packages=find_packages(where="src"),
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst'], "hyperframe": ["py.typed"]},
package_data={'hyperframe': ['py.typed']},
package_dir={'': 'src'},
python_requires='>=3.6.1',
include_package_data=True,
license='MIT License',
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand All @@ -47,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
37 changes: 22 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ envlist = py36, py37, py38, py39, pypy3, lint, docs, packaging
python =
3.6: py36
3.7: py37
3.8: py38, lint, docs, packaging
3.9: py39
3.8: py38
3.9: py39, lint, docs, packaging
pypy3: pypy3

[testenv]
Expand All @@ -23,34 +23,41 @@ commands =
# temporarily disable coverage testing on PyPy due to performance problems
commands = pytest {posargs}

[testenv:lint]
deps =
flake8>=3.9.1,<4
mypy==0.812
commands =
flake8 src/ test/
mypy --strict src/

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

[testenv:lint]
basepython = python3.8
deps =
flake8==3.9.1
mypy==0.812
commands =
flake8 --max-complexity 10 src test
mypy --strict src/

[testenv:packaging]
basepython = python3.8
basepython = python3.9
deps =
check-manifest==0.46
readme-renderer==29.0
twine==3.4.1
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/*

0 comments on commit 5632eb8

Please sign in to comment.