Skip to content
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

Fix missing py.typed files #109

Merged
merged 1 commit into from
Nov 2, 2023
Merged
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
7 changes: 5 additions & 2 deletions stub_uploader/build_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,11 @@ def copy_stubs(base_dir: str, dst: str) -> None:
if entry == TESTS_NAMESPACE:
# Don't package tests for the stubs
continue
stub_dir = os.path.join(dst, entry + SUFFIX)
shutil.copytree(os.path.join(base_dir, entry), stub_dir)
# Don't append the suffix if already present
stub_dir = os.path.join(
dst, entry if entry.endswith(SUFFIX) else entry + SUFFIX
)
shutil.copytree(os.path.join(base_dir, entry), stub_dir, dirs_exist_ok=True)

# We add original METADATA file in case some type-checking tool will want
# to use it. Note that since it is not easy to package it outside of a package,
Expand Down