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

Generate Python wheels in CI #1317

Merged
merged 37 commits into from
Aug 22, 2023
Merged

Generate Python wheels in CI #1317

merged 37 commits into from
Aug 22, 2023

Conversation

JeanChristopheMorinPerso
Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso commented Apr 10, 2023

Fixes #570.

This PR adds a new GitHub Actions workflow that generates Python wheels and an sdist that all can be uploaded to PyPI.

It generates wheels for Python 3.7, 3.8, 3.9 and 3.10 for Windows, macOS and Linux.

I used https://github.com/scikit-build/scikit-build-core as the build backend. It's a new tool that is quite simple and allows to build Python extensions (C, C++, etc) without setuptools. Since it's a build backend, everything can be built with pip install . or https://github.com/pypa/build (python -m build).

Marked as draft because I'll take some more time to document. But at least we have something working for users to test. I also need to create the workflow that will publish to PyPI. And as a reminder, we have reserved the MaterialX name on PyPI, see https://pypi.org/project/MaterialX/.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 10, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Member Author

@JeanChristopheMorinPerso JeanChristopheMorinPerso left a comment

Choose a reason for hiding this comment

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

I left some comments for the reviewers

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
python/CMakeLists.txt Show resolved Hide resolved
python/CMakeLists.txt Show resolved Hide resolved
source/MaterialXCore/CMakeLists.txt Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
.github/workflows/python.yml Show resolved Hide resolved
@jstone-lucasfilm
Copy link
Member

This work looks really promising, and I'd recommend that we continue refining it in the upcoming 1.38.8 version of MaterialX, rather than trying to rush it into the 1.38.7 release.

@JeanChristopheMorinPerso
Copy link
Member Author

@jstone-lucasfilm Yep, it makes sense to not rush it. Anyway I'll probably have limited time to work on this in the next 2 weeks.

Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
This changelist simplifies the list of new build exclusions for GitHub Actions, since the overhead of running this workflow is relatively small.

Signed-off-by: Jonathan Stone <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
Signed-off-by: Jonathan Stone <[email protected]>
@JeanChristopheMorinPerso
Copy link
Member Author

Rebased with main branch.

Signed-off-by: Jean-Christophe Morin <[email protected]>
@JeanChristopheMorinPerso
Copy link
Member Author

JeanChristopheMorinPerso commented Jun 3, 2023

The wheel generation is failing with my last commit. I'll need to investigate why it's failing.

Edit: Problem fixed.

Signed-off-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Jean-Christophe Morin <[email protected]>
@jstone-lucasfilm jstone-lucasfilm marked this pull request as ready for review June 13, 2023 01:00
Signed-off-by: Jonathan Stone <[email protected]>
This changelist restores the original concurrency rules to the "main" workflow for now, and we can consider this change separately in the future.

Signed-off-by: Jonathan Stone <[email protected]>
@jstone-lucasfilm jstone-lucasfilm merged commit c545829 into AcademySoftwareFoundation:main Aug 22, 2023
14 checks passed
@JeanChristopheMorinPerso JeanChristopheMorinPerso deleted the python_packaging branch September 8, 2023 20:06
Michaelredaa pushed a commit to Michaelredaa/MaterialX that referenced this pull request Oct 21, 2023
This PR adds a new GitHub Actions workflow that generates Python wheels and an sdist that all can be uploaded to PyPI.

It generates wheels for Python 3.7, 3.8, 3.9 3.10, and 3.11 for Windows, macOS and Linux.

I used https://github.com/scikit-build/scikit-build-core as the build backend. It's a new tool that is quite simple and allows to build Python extensions (C, C++, etc) without setuptools. Since it's a build backend, everything can be built with pip install. or https://github.com/pypa/build (python -m build).
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.

Add MaterialX Python to PyPi
3 participants