typeshed-internal / stub_uploader

Scripts and actions to auto-upload typeshed stubs to PyPI
Apache License 2.0
21 stars 16 forks source link

Create an sdist for every wheel that is built #19

Closed nemacysts closed 3 years ago

nemacysts commented 3 years ago

Some users prefer to build their own wheels, and the fact that the modular types packages are only uploaded as wheels means that these users can't use pip with "--no-binary :all:" to guarantee that pip only downloads sdists in order to then rebuild the corresponding wheel.

nemacysts commented 3 years ago

This looks like it should resolve https://github.com/python/typeshed/issues/5643 - although I can't test the rest of the workflow, https://github.com/typeshed-internal/stub_uploader/blob/main/scripts/upload_changed.py#L48 looks like it'd also upload the sdist that will now be created.

I tested this by:

  1. creating + activating a venv
  2. installing the python packages mentioned in the Github Actions setup into that venv
  3. cloning typeshed
  4. running python -m scripts.build_wheel typeshed/ mock 1
  5. verifying that the tmpdir contains both a wheel and an sdist:
    types-mock-0.1.1.tar.gz  types_mock-0.1.1-py2.py3-none-any.whl
JelleZijlstra commented 3 years ago

Should we trigger an update for all types-* packages somehow so that we get sdists for existing packages?

srittau commented 3 years ago

Sounds like a good idea.

ilevkivskyi commented 3 years ago

You both should have permission to do this https://github.com/typeshed-internal/stub_uploader/actions/workflows/force_update.yml (IIRC the package accepts regex, so you probably want something like '.*').

ilevkivskyi commented 3 years ago

Actually, let me do this right now.

ilevkivskyi commented 3 years ago

And it is done! (took around 5min to build and upload all)

JelleZijlstra commented 3 years ago

Thanks Ivan!