dhermes / bezier

Helper for Bézier Curves, Triangles, and Higher Order Objects
Apache License 2.0
266 stars 36 forks source link

Release `2024.6.20`. #333

Closed dhermes closed 5 months ago

dhermes commented 5 months ago

Populated templates via:

$ python scripts/doc_template_release.py
Linux GitHub Actions Run ID: 9607943395
Windows GitHub Actions Run ID: 9607943396
Coveralls Build ID: 68215528
macOS GitHub Actions Run ID: 9607943397

I'll be using this PR to post comments about the release process (for audit purposes).


See also #309 and #330

dhermes commented 5 months ago

Built all wheels via: https://github.com/dhermes/bezier/actions/runs/9608025437

dhermes commented 5 months ago

To upload, I made a ~/.pypirc for TestPyPI

[distutils]
  index-servers =
    testpypi

[testpypi]
  username = __token__
  password = pypi-Ag...

I downloaded all the files and put them in a shared artifacts/ directory, then uploaded via:

$ cd artifacts/
$ twine upload --repository testpypi *

depending on the "current" contents of ~/.pypirc. Note that it's possible to have both testpypi and pypi index servers / repositories present at once, but I elected not to (and immediately deleted ~/.pypirc after) to reduce the surface area for possible mistakes.

dhermes commented 5 months ago

As part of the upload process, I also tagged the commit and pushed the tag:

git tag 2024.6.20
git push origin 2024.6.20

To make the actual release (https://github.com/dhermes/bezier/releases/tag/2024.6.20) in Markdown, I used pandoc to convert:

$ cd docs/releases/
$ pandoc --standalone --output latest.md latest.rst

Even still it is imperfect because of line wrapping, so I manually edited the output (latest.md) to just make every line VERY long (instead of doing line wrapping).

dhermes commented 5 months ago

After pushing the tag, the TestPyPI release checked out (URLs in the release refer to the tag).

After this was validated, I changed ~/.pypirc to the production pypi index server:

[distutils]
  index-servers =
    pypi

[testpypi]
  username = __token__
  password = pypi-Ag...

and then uploaded via:

$ cd artifacts/
$ twine upload --repository pypi *

depending on the "current" contents of ~/.pypirc. Note that it's possible to have both testpypi and pypi index servers / repositories present at once, but I elected not to (and immediately deleted ~/.pypirc after) to reduce the surface area for possible mistakes.

dhermes commented 4 months ago

Worth noting: I do not have easy access to macOS hardware running 10.9 (x86_64) or 11.0 (arm64). As a result, the only macOS wheels I built were on the macos-14 GitHub Actions runners.

This may be an issue for macOS users on earlier versions.

If someone has a request for earlier versions and hardware, I can likely help collaborate with them to get wheels built and uploaded to PyPI.


The biggest blocker to this is actually getting a version of gcc that has a "minimum SDK version" of 10.9 / 11.0.

$ otool -l /opt/homebrew/Cellar/gcc/14.1.0_1/lib/gcc/14/libgfortran.5.dylib | grep -B 3 -A 5 minos
      cmd LC_BUILD_VERSION
  cmdsize 32
 platform 1
    minos 14.0
      sdk n/a
   ntools 1
     tool 3
  version 1053.12
Load command 11

See delocate failure involving the gcc (gfortran) shared libraries for a concrete example.

I actually considered using old versions of the gcc bottles (pre-built images specific to each version of macOS) but elected not to.