Skip to content

Commit 07723dc

Browse files
committed
Move code to a src directory
This is gaining traction in the community as well as avoiding some potential testing pitfalls, see https://hynek.me/articles/testing-packaging/
1 parent d795938 commit 07723dc

File tree

12 files changed

+7
-7
lines changed

12 files changed

+7
-7
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ graft compliance
22
graft example
33
graft docs
44
graft test
5-
graft wsproto
5+
graft src/wsproto
66
prune docs/build
77
prune compliance/autobahntestsuite-venv
88
prune compliance/reports

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# Get the version
1515
version_regex = r'__version__ = ["\']([^"\']*)["\']'
16-
with open(os.path.join(PROJECT_ROOT, 'wsproto/__init__.py')) as file_:
16+
with open(os.path.join(PROJECT_ROOT, 'src/wsproto/__init__.py')) as file_:
1717
text = file_.read()
1818
match = re.search(version_regex, text)
1919

@@ -35,9 +35,9 @@
3535
author='Benno Rice',
3636
author_email='[email protected]',
3737
url='https://github.com/python-hyper/wsproto/',
38-
packages=find_packages(exclude=['test']),
38+
packages=find_packages("src"),
39+
package_dir={"": "src"},
3940
package_data={'': ['LICENSE', 'README.rst']},
40-
package_dir={'wsproto': 'wsproto'},
4141
python_requires=">=3.6.1",
4242
include_package_data=True,
4343
license='MIT',
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)