-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Build script for third-party distributions #2545
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
Conversation
I have gone ahead and merged this even though I would like to see more reviews. But since this is merged into an experimental branch anyway, we can always make changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are just some more technical/fun thoughts, the bigger picture thoughts I have I am putting in #2491.
|
||
# Build a stubs-only distribution for a third-party package. | ||
# | ||
# Usage: python3.7 build-dist.py <PACKAGE> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure requiring people to have a 3.7 install is a good idea, but then again it doesn't bother me too much. At minimum a version check/warning before importing anything would avoid people being confused by "no module named dataclasses".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually this script is meant to be run as part of the CI process, do I didn't worry about that too much. But the version check is a good idea!
from pathlib import Path | ||
from typing import List | ||
|
||
DIST_SUFFIX = "-ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it amusing this looks like typescript :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, when I reviewed my suggestion before writing this script I wondered why I had chosen that suffix and whether I made a mistake because I had written a lot of typescript lately. Then I remembered that it was the abbreviation for typeshed. :)
That said, I think we should get the pypi maintainers on board for a final decision for a suffix.
Part of #2491
This script allows to build third-party stubs packages as stubs-only distributions. Usage:
A wheel will be built into
third-party/build/dist
.