3 remain:
future (probably can’t be a wheel?)
pyspark (very difficult to make a wheel)
sagemaker (probably could be a wheel)
No reason why it couldn’t be. However, this package is effectively dead for a long time now, so it’s really worrying that it’s in “top packages”.
There was a release in 2023. I wonder if they’d consider releasing a wheel…
Their website isn’t updated with the latest version changelogs so I don’t think they’re super active
It’s been requested for future since 2018:
And for sagemaker since 2022:
six is way higher at 14th on the list. I guess a lot of the big software just never updates and there’s really nothing we can do about it.
I’m by far more concerned with SageMaker though. Or OSS from AWS in general really, it is quite noticeably less than on-par from offerings from most other FAANGs. Not they have bad individual developers but more like the company as a whole just don’t care to put enough resource over it…
Looks like they did try a wheel for future. Looks like there is some evidence it doesn’t work on Windows.
I don’t have enough context about why a pure Python wheel may have problems on Windows.
The Windows errors are about installing from sdist.
And they only uploaded wheels for 0.18.0, so I expect people are getting errors with the latest 0.18.3 that only has an sdist.
Oh. Fascinating.
I’m surprised that there can be a problem installing such a popular dependency on Windows. Maybe it only fails under certain conditions.
If the sdist is broken anyway, I wonder why they’ve not pressed ahead with a wheel. The change required is minimal for this package.
I’ll ask for clarification in that PR if the sdist is broken.
There are even more surprising facts.
“Of the 4000 most downloaded packages from PyPI, 489 use non-ASCII characters in their README, and 82 fail to install from source on non-UTF-8 locales due to not specifying an encoding for a non-ASCII file. [1]”
Source: PEP 597
I’ve been finding that just reaching out and making PRs for release automation leveraging GitHub Actions and all the provided bells/whistles has been working.
cibuildwheel
(link) is a great utility for this if the package has compiled code. Otherwise pipx run build --sdist --wheel
works out of the box.
I also went the extra mile on these and ran a test run of the action to https://test.pypi.org so that I could demonstrate in a PR comment that the workflow does in fact work, and does upload wheels. I include the article about configuring the GitHub Actions “Trusted Publishers” and even a screenshot of my test.pypi.org configuration for the project.
That way the owner/reviewer should have everything they need to understand what’s happening in the PR.
The only part that isn’t cookie-cutter is figuring out the right trigger for the build. Some projects would use a manual trigger, while others push tags, while others, releases.
Here’s some examples to get you going:
cibuildwheels example
name: Upload Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-11]
steps:
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/cibuildwheel@v2.15.0
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
Pure-Python Example
name: Release Package
on: [workflow_dispatch]
permissions:
contents: read
jobs:
build_package:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist and wheel
run: pipx run build --sdist --wheel
- uses: actions/upload-artifact@v3
with:
path: dist
pypi-publish:
needs: [build_package]
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1