Skip to content

Fix python packaging#1778

Merged
doug-walker merged 2 commits into
AcademySoftwareFoundation:mainfrom
remia:fix-python-attributes
Mar 22, 2023
Merged

Fix python packaging#1778
doug-walker merged 2 commits into
AcademySoftwareFoundation:mainfrom
remia:fix-python-attributes

Conversation

@remia
Copy link
Copy Markdown
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