Skip to content

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

Merged
merged 3 commits into from
Oct 26, 2018

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Oct 23, 2018

Part of #2491

This script allows to build third-party stubs packages as stubs-only distributions. Usage:

python3.7 build-dist.py <package>

A wheel will be built into third-party/build/dist.

@srittau srittau merged commit e608b2a into python:third-party-dist Oct 26, 2018
@srittau srittau deleted the tp-setup branch October 26, 2018 08:08
@srittau
Copy link
Collaborator Author

srittau commented Oct 26, 2018

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.

Copy link
Member

@emmatyping emmatyping left a 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>
Copy link
Member

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".

Copy link
Collaborator Author

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"
Copy link
Member

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 :)

Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants