Skip to content

Commit 80694de

Browse files
committed
Add testpep561 test
1 parent c2492e8 commit 80694de

File tree

13 files changed

+73
-17
lines changed

13 files changed

+73
-17
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
from setuptools import setup, find_packages
1+
from setuptools import setup
22

33
setup(
44
name='typedpkg_namespace.alpha',
55
version='1.0.0',
6-
packages=find_packages(),
76
namespace_packages=['typedpkg_ns'],
87
zip_safe=False,
9-
package_data={'typedpkg_ns.ns': ['py.typed']}
8+
package_data={'typedpkg_ns.a': ['py.typed']},
9+
packages=['typedpkg_ns.a'],
1010
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
This setup file installs packages to test mypy's PEP 561 implementation
3+
"""
4+
5+
from distutils.core import setup
6+
7+
setup(
8+
name='typedpkg_ns_b-stubs',
9+
author="The mypy team",
10+
version='0.1',
11+
namespace_packages=['typedpkg_ns-stubs'],
12+
package_data={'typedpkg_ns-stubs.b': ['__init__.pyi', 'bbb.pyi']},
13+
packages=['typedpkg_ns-stubs.b'],
14+
)

test-data/packages/typedpkg_ns_b-stubs/typedpkg_ns-stubs/b/__init__.pyi

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
def bf(a: bool) -> bool: ...
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from setuptools import setup
2+
3+
setup(
4+
name='typedpkg_namespace.beta',
5+
version='1.0.0',
6+
namespace_packages=['typedpkg_ns'],
7+
zip_safe=False,
8+
package_data={'typedpkg_ns.b': []},
9+
packages=['typedpkg_ns.b'],
10+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# namespace pkg
2+
__import__("pkg_resources").declare_namespace(__name__)

0 commit comments

Comments
 (0)