Repository navigation
Build script for third-party distributions - #2545
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.
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.
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.
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.
I find it amusing this looks like typescript :)
There was a problem hiding this comment.
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.