Skip to content

Fix py.typed location #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion robotpy_build/command/build_pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class GeneratePyiError(DistutilsError):


class BuildPyi(Command):
base_package: str

command_name = "build_pyi"
description = "Generates pyi files from built extensions"
Expand Down Expand Up @@ -96,7 +97,7 @@ def run(self):
) from None

# Create a py.typed for PEP 561
with open(join(data["out"], "py.typed"), "w"):
with open(join(data["out"], *self.base_package.split("."), "py.typed"), "w"):
pass


Expand Down
3 changes: 2 additions & 1 deletion robotpy_build/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def finalize_options(self):


except ImportError:
bdist_wheel = None
bdist_wheel = None # type: ignore


from .command.build_py import BuildPy
Expand Down Expand Up @@ -122,6 +122,7 @@ def prepare(self):
cls.wrappers = self.wrappers
cls.static_libs = self.static_libs
cls.rpybuild_pkgcfg = self.pkgcfg
BuildPyi.base_package = self.base_package

# We already know some of our packages, so collect those in addition
# to using find_packages()
Expand Down