Skip to content

Commit 41b31cb

Browse files
dtantsurjstasiak
authored andcommitted
Add py.typed marker (closes #199)
This required changing to a proper package.
1 parent 3db9d82 commit 41b31cb

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ ci: test_coverage lint
3030
lint: $(LINT_TARGETS)
3131

3232
flake8:
33-
flake8 --max-line-length=$(MAX_LINE_LENGTH) examples *.py
33+
flake8 --max-line-length=$(MAX_LINE_LENGTH) setup.py examples zeroconf
3434

3535
.PHONY: black_check
3636
black_check:
37-
black --check *.py examples
37+
black --check setup.py examples zeroconf
3838

3939
mypy:
40-
mypy examples/*.py test_zeroconf.py zeroconf.py
40+
mypy examples/*.py zeroconf/*.py
4141

4242
test:
4343
nosetests -v $(TEST_ARGS)
@@ -46,4 +46,4 @@ test_coverage:
4646
nosetests -v --with-coverage --cover-package=zeroconf $(TEST_ARGS)
4747

4848
autopep8:
49-
autopep8 --max-line-length=$(MAX_LINE_LENGTH) -i examples *.py
49+
autopep8 --max-line-length=$(MAX_LINE_LENGTH) -i setup.py examples zeroconf

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
readme = f.read()
1010

1111
version = (
12-
[l for l in open(join(PROJECT_ROOT, 'zeroconf.py')) if '__version__' in l][0]
12+
[l for l in open(join(PROJECT_ROOT, 'zeroconf', '__init__.py')) if '__version__' in l][0]
1313
.split('=')[-1]
1414
.strip()
1515
.strip('\'"')
@@ -22,7 +22,8 @@
2222
long_description=readme,
2323
author='Paul Scott-Murphy, William McBrine, Jakub Stasiak',
2424
url='https://github.com/jstasiak/python-zeroconf',
25-
py_modules=['zeroconf'],
25+
package_data={"zeroconf": ["py.typed"]},
26+
packages=["zeroconf"],
2627
platforms=['unix', 'linux', 'osx'],
2728
license='LGPL',
2829
zip_safe=False,
File renamed without changes.

zeroconf/py.typed

Whitespace-only changes.
File renamed without changes.

0 commit comments

Comments
 (0)