Skip to content

Commit 1973f07

Browse files
Kriechipgjones
authored andcommitted
move all code under src/
1 parent 4e068f4 commit 1973f07

File tree

8 files changed

+12
-16
lines changed

8 files changed

+12
-16
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
graft hyperframe
1+
graft src
22
graft docs
33
graft test
44
prune docs/build

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ exclude_lines =
1717

1818
[coverage:paths]
1919
source =
20-
hyperframe/
21-
*/site-packages/hyperframe
20+
src
21+
.tox/*/site-packages

setup.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
import re
66
import sys
77

8-
try:
9-
from setuptools import setup
10-
except ImportError:
11-
from distutils.core import setup
12-
8+
from setuptools import setup, find_packages
139

1410
PROJECT_ROOT = os.path.dirname(__file__)
1511

@@ -18,8 +14,8 @@
1814

1915
# Get the version
2016
version_regex = r'__version__ = ["\']([^"\']*)["\']'
21-
with open('hyperframe/__init__.py', 'r') as f:
22-
text = f.read()
17+
with open(os.path.join(PROJECT_ROOT, 'src/hyperframe/__init__.py')) as file_:
18+
text = file_.read()
2319
match = re.search(version_regex, text)
2420

2521
if match:
@@ -32,19 +28,19 @@
3228
os.system('python setup.py sdist upload')
3329
sys.exit()
3430

35-
3631
setup(
3732
name='hyperframe',
3833
version=version,
3934
description='HTTP/2 framing layer for Python',
4035
long_description=long_description,
36+
long_description_content_type='text/x-rst',
4137
author='Cory Benfield',
4238
author_email='cory@lukasa.co.uk',
4339
url='https://github.com/python-hyper/hyperframe/',
44-
packages=['hyperframe'],
45-
package_data={'': ['LICENSE', 'README.rst', 'CONTRIBUTORS.rst', 'HISTORY.rst']},
46-
package_dir={'hyperframe': 'hyperframe'},
47-
python_requires=">=3.6.1",
40+
packages=find_packages(where="src"),
41+
package_data={'': ['LICENSE', 'README.rst', 'HISTORY.rst']},
42+
package_dir={'': 'src'},
43+
python_requires='>=3.6.1',
4844
include_package_data=True,
4945
license='MIT License',
5046
classifiers=[

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ commands =
3636
basepython = python3.8
3737
deps =
3838
flake8==3.8.3
39-
commands = flake8 --max-complexity 10 hyperframe test
39+
commands = flake8 --max-complexity 10 src test
4040

4141
[testenv:packaging]
4242
basepython = python3.8

0 commit comments

Comments
 (0)