Skip to content
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

Packaging updates #167

Merged
merged 4 commits into from
May 19, 2024
Merged

Conversation

dihm
Copy link
Contributor

@dihm dihm commented May 17, 2024

Fixes #166

This PR modernizes the packaging for ARC, allowing to be PEP-517 compliant and fixing some other deprecations in the build process. It fully implements a pyproject.toml description file that contains all meta-data as well as install and setup requirements.

Note that the new build process uses isolated build environments using PyPA's build or via pip.

I've confirmed basic operation, but more thorough checks are warranted to ensure meta data hasn't been lost or package functionality is not fundamentally broken somehow.

dihm added 4 commits May 17, 2024 12:48
Moves all meta-data to pyproject.toml.
Moves to a PEP-517 compliant build backend specification.
Moves all build and install dependency specification to pyproject.toml.
…t doesn't recognize.

Also remove old distutils code as no longer supported for python>=3.8
Note: updates action pins in the windows.yaml workflow
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
pypi/arc@1.0 None 0 36 kB charlex

View full report↗︎

@dihm
Copy link
Contributor Author

dihm commented May 17, 2024

Regarding osx-arm64 builds, since v3.4.1 ARC technically already has them via the universal2 package standard. This is because the macos-latest runner was recently updated by github to run on M1 hardware, and the default python installed by the setup-python action uses the universal2 "architecture" (which includes both x64 and arm64 binaries).

This is probably good enough, though it should be noted that scipy packages (numpy, scipy, matplotlib, etc) have chosen not to use universal2 and instead build each architecture individually. There may or may not be a good reason behind that, but I'll have to test on an M1 mac to see if it matters.

Final question: is there a particular reason you don't distribute wheels for linux? It would be fairly easy to add to the workflows.

@dihm
Copy link
Contributor Author

dihm commented May 18, 2024

I have confirmed that the universal2 builds work for M1 macs (in both normal python installs and conda python). I'm inclined to leave things as is in that regard.

I've also confirmed the build source tarballs are identical (up to intended changes), and the built wheels install functional packages.

Copy link
Owner

@nikolasibalic nikolasibalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will need to keep

- requirements: doc/requirements.txt

in .readthedocs.yaml as these are requirements for documentation building, which are separate from the package build requirements. But the rest looks great (thank you for your efforts!). I will merge therefore this PR, and then check and add the above line, before releasing new version.

@nikolasibalic nikolasibalic merged commit c0aa6a7 into nikolasibalic:master May 19, 2024
2 checks passed
@dihm
Copy link
Contributor Author

dihm commented May 19, 2024

That is interesting. I thought my change would install the package with pip during the docs build, pulling the requirements from the project.toml that way and reducing the amount of redundant information.

But I didn't think too hard about it and RTD has a mind of its own when it comes to these things.

Apologies for the incomplete solution.

@nikolasibalic nikolasibalic mentioned this pull request May 19, 2024
@nikolasibalic
Copy link
Owner

I have updated CI workflow (#168 ) so that it uses build wheels action used by scipy and numpy projects. So now we have wheels for Linux, and for Mac (and Mac ones are separated by architecture; should be better in principle).

Everything is released now as ver 3.5.0. I hope with new build system the installation will be smoother.

Thank you for your contribution @dihm !

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.

Modernizing and extending the build backend
2 participants