I would like to build a Python wheels package for easier sharing and installation of the binaries. USD itself has a setup.py file in its build scripts that does exactly that, if you execute it after the actual build process. However, I'm having a hard time figuring out how to make the fileformat plugins work with this wheel building workflow.
As far as I can tell, the build of USD is correct, and so is the build of the fileformat plugins. I believe I'm not moving the fileformat files into the proper folders for the setup.py script from USD to pick them up, though. Running the setup.py script seems to "ignore" the files generated by the plugin.
I understand that the setup.py script probably doesn't take 3rd Party plugins into account, but any help would be appreciated, if anyone has any idea.
Expected Behaviour
After running the setup.py script, assuming USD-Fileformat-plugins files are in the proper locations beforehand, the user should have a .wheel package file that can be distributed or installed in any machine, without needing to manually setup env variables or move files. The USD-Fileformat-plugins should then be accessible by the Python environment that the .wheel package is installed to.
Actual Behaviour
After generating the .wheels, no USD-Fileformat-plugins seems to be present in the .package file.
If attempting to install the .wheels, opening any file format of a USD-Fileformat-plugins (e.g. .glb) results in an error.
Other USD plugins (e.g. usdMtlx) and features seem to be working correctly, however.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Build USD (as instructed by the USD-Fileformat-plugins repo)
Execute OpenUSD/build_scripts/pypi/package_files/setup.py from the USD repository
Platform and Version
Windows 11, Python 3.9, newest version from Main.
Sample Code that illustrates the problem
>>> from pxr import Usd
>>> stage = Usd.Stage.Open("test_file.glb")
Logs taken while reproducing problem
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pxr.Tf.ErrorException:
Error in 'pxrInternal_v0_24__pxrReserved__::SdfLayer::_OpenLayerAndUnlockRegistry' at line 3344 in file C:\Users\dgg_26\Desktop\ASWF\OpenUSD\OpenUSDSrc\pxr\usd\sdf\layer.cpp : 'Cannot determine file format for @C:/Users/dgg_26/Desktop/test_file.glb:SDF_FORMAT_ARGS:target=usd@'
Error in 'pxrInternal_v0_24__pxrReserved__::UsdStage::Open' at line 1051 in file C:\Users\dgg_26\Desktop\ASWF\OpenUSD\OpenUSDSrc\pxr\usd\usd\stage.cpp : 'Failed to open layer @C:\Users\dgg_26\Desktop\test_file.glb@'
I would like to build a Python wheels package for easier sharing and installation of the binaries. USD itself has a setup.py file in its build scripts that does exactly that, if you execute it after the actual build process. However, I'm having a hard time figuring out how to make the fileformat plugins work with this wheel building workflow.
As far as I can tell, the build of USD is correct, and so is the build of the fileformat plugins. I believe I'm not moving the fileformat files into the proper folders for the setup.py script from USD to pick them up, though. Running the setup.py script seems to "ignore" the files generated by the plugin.
I tried to follow the steps of the readme to "copy" the files into the USD install folder before running the setup.py script, but I guess that's either not enough or I'm missing something, as there's no fileformat related files in the resulting .wheel package.
I understand that the setup.py script probably doesn't take 3rd Party plugins into account, but any help would be appreciated, if anyone has any idea.
Expected Behaviour
After running the setup.py script, assuming USD-Fileformat-plugins files are in the proper locations beforehand, the user should have a .wheel package file that can be distributed or installed in any machine, without needing to manually setup env variables or move files. The USD-Fileformat-plugins should then be accessible by the Python environment that the .wheel package is installed to.
Actual Behaviour
Reproduce Scenario (including but not limited to)
Steps to Reproduce
OpenUSD/build_scripts/pypi/package_files/setup.py
from the USD repositoryPlatform and Version
Windows 11, Python 3.9, newest version from Main.
Sample Code that illustrates the problem
Logs taken while reproducing problem