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.
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. TheRPATH
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 thesetup.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
anddata
modules.