assimp/contrib/tinyusdz/tinyusdz_repo/doc/python_binding.md

52 lines
1.2 KiB
Markdown
Raw Normal View History

2024-03-30 02:33:07 +00:00
# TinyUSDZ Python binding and prebuilt package.
TinyUSDZ provides pre-built Python binding of TinyUSDZ for Windows, Linux and macOS through PyPI.
## Requirements
* Python 3.8+
* Pip 19.3+
TinyUSDZ uses C++14, so on Linux, minimal supported `manylinux` version is `manylinux2014`.
(`manylinux2010` and `manylinux1` are not supported).
## Install
```
$ python -m pip install -U tinyusdz
```
## Build from source
`pyproject.toml` is provided, so you can build Python binding by `python-build`
```
$ python -m pip install build # if you didn't installed `build` package.
$ python -m build
```
TinyUSDZ python binding uses `scikit-build` to build Python module(and `python-build` is just involing this `scikit-build` to build a package), which provides native support of cmake.
You can alternatively build TinyUSDZ python binding by:
```
$ python setup.py build
$ python setup.py bdist_wheel
```
NOTE: you may need to delete/clean intermediate files/directories generated by `scikit-build`(e.g. `python/tinyusdz.egg-info`)
## Exmaple
T.B.W.
EoL.
## Develper note
Binary wheels are built with cibuildwheel and Github Action.
See [github actions file](../.github/workflows/wheels.yml)