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

Fix python packaging #1778

Merged

Conversation

remia
Copy link
Collaborator

@remia remia commented Mar 13, 2023

Following #1759, that changed the Python distribution layout by adding a folder containing a __init__.py file, I encountered some issues while using the Python bindings locally for development. The RPATH was no longer correct and the __init__.py also did not import everything (variables starting with underscores like __version__ are not imported).

This PR fix these issues and further try to have the in-build Python package structure close to the install so that unittest are performed in conditions that reflect the distributed package.

While all this is not strictly necessary for the wheels (they are built in static mode so the new __init__.py has little use in the first place I'd imagine), I still updated the Python package structure in the setup.py so that it reflects what we do in the regular build process. This is to avoid having 2 different structures to maintain. I uploaded a new PyPI test version in case you want to compare and test. PyOpenColorIO is now a folder in site-packages, containing __init__.py, PyOpenColorIO.so|pyd, tests and data modules.

Signed-off-by: Rémi Achard <remiachard@gmail.com>
@doug-walker doug-walker merged commit 20f13de into AcademySoftwareFoundation:main Mar 22, 2023
cedrik-fuoco-adsk pushed a commit to autodesk-forks/OpenColorIO that referenced this pull request Mar 24, 2023
Signed-off-by: Rémi Achard <remiachard@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
@remia remia deleted the fix-python-attributes branch May 27, 2023 18:19
@remia remia mentioned this pull request Sep 30, 2024
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.

3 participants