Skip to content

PyPI wheel #3181

Closed
Closed

Description

@groodt

Describe the feature you'd like

The benefits of wheels are well documented. See: https://pythonwheels.com/
This package is pure Python and publishing it as both source and as a wheel is simple.

Would you accept a PR to publish a wheel?

How would this feature be used? Please describe.
A clear and concise description of the use case for this feature. Please provide an example, if possible.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Activity

  1. darthale commented on Nov 15, 2022

    @darthale

    I am a bit surprised that no one followed up on this one. This is a pretty "basic" requirement to have for a python package. Having to build the library from scratch all the time is beyond time and resource-consuming.

  2. hugovk commented on Nov 16, 2022

    @hugovk

    To make a wheel using https://github.com/pypa/build:

    python -m pip install -U build
    python -m build
    $ ls dist
    sagemaker-2.117.1.dev0-py2.py3-none-any.whl sagemaker-2.117.1.dev0.tar.gz
  3. jmahlik commented on Oct 9, 2023

    @jmahlik
    Contributor

    I was looking at submitting a PR for this to improve the install time.

    I see a twine check of the sdist in the tox.ini but don't see where it's getting uploaded to pypi. Where exactly in the ci is the sdist getting built and uploaded? Maybe somewhere in a separate code build job?

  4. akrishna1995 commented on Dec 21, 2023

    @akrishna1995
    Contributor

    Thanks for raising this issue. We have since updated our internal CI to publish the wheel file : python3 setup.py sdist bdist_wheel to PyPi. The latest sagemaker now contains the wheel file https://pypi.org/project/sagemaker/2.201.0/#files. Please feel free to reopen if there are any issues.

  5. hugovk commented on Dec 21, 2023

    @hugovk

    Thank you!

    I recommend using the commands in #3181 (comment) because invoking setup.py directly is deprecated.

    The long version: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

  6. martinRenou commented on Dec 21, 2023

    @martinRenou
    Collaborator

    I recommend using the commands in #3181 (comment) because invoking setup.py directly is deprecated.

    Adding my two cents. I would actually not recommend building the wheel as a wheel is now published on PyPi.

    Now users can simply run pip install sagemaker to get the latest published wheel 🚀 Thanks for your work

  7. hugovk commented on Dec 21, 2023

    @hugovk

    I agree end users should pip install to get the latest wheel. My suggestion is for how the maintainers create the wheel in the first place. Anyway, thanks again!

  8. jmahlik commented on Dec 21, 2023

    @jmahlik
    Contributor

    Awesome, thanks for getting the wheel out there! This will save time installing in CI and for the hundreds of users I support.

    I did notice the wheel is labeled as "universal" sagemaker-2.201.0-py2.py3-none-any.whl i.e. supporting python 2 and 3.

    The py2 tag should be dropped since it doesn't support python 2. So: sagemaker-2.201.0-py3-none-any.whl

    See the note on universal wheels: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#wheels.

    Here's a patch that drops the py2 tag

    diff --git a/setup.cfg b/setup.cfg
    index bf718e48..80eaced1 100644
    --- a/setup.cfg
    +++ b/setup.cfg
    @@ -10,6 +10,3 @@ test=pytest
     [metadata]
     description_file = README.rst
     license_files = LICENSE.txt
    -
    -[wheel]
    -universal = 1

    With universal = 1

    python -m build .
    ls dist/
    sagemaker-2.201.1.dev0.tar.gz  sagemaker-2.201.1.dev0-py2.py3-none-any.whl
    # and with the deprecated setup.py invocation
    python setup.py sdist bdist_wheel
    ls dist/
    sagemaker-2.201.1.dev0.tar.gz  sagemaker-2.201.1.dev0-py2.py3-none-any.whl

    Removed universal = 1:

    python -m build .
    ls dist/
    sagemaker-2.201.1.dev0.tar.gz  sagemaker-2.201.1.dev0-py3-none-any.whl
    # and with the deprecated setup.py invocation
    python setup.py sdist bdist_wheel
    ls dist/
    sagemaker-2.201.1.dev0.tar.gz  sagemaker-2.201.1.dev0-py3-none-any.whl
  9. martinRenou commented on Dec 22, 2023

    @martinRenou
    Collaborator

    Thank you for your suggestion, I just pushed a PR making those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions