summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-18 07:00:17 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-18 07:00:17 +0000
commitce64a219c0815f9ca8c76d863a27209db3579bd2 (patch)
tree184214a4dea3b52caaa5c2ceead0e24d209388e5
parent4b8f746d0c72de520541078b014c895e7b5f23ce (diff)
automatic import of python-assimp-py
-rw-r--r--.gitignore1
-rw-r--r--python-assimp-py.spec275
-rw-r--r--sources1
3 files changed, 277 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..f2e8269 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/assimp_py-1.0.7.tar.gz
diff --git a/python-assimp-py.spec b/python-assimp-py.spec
new file mode 100644
index 0000000..6fbbddd
--- /dev/null
+++ b/python-assimp-py.spec
@@ -0,0 +1,275 @@
+%global _empty_manifest_terminate_build 0
+Name: python-assimp-py
+Version: 1.0.7
+Release: 1
+Summary: Minimal Python Bindings for ASSIMP Library using C-API
+License: MIT
+URL: https://pypi.org/project/assimp-py/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d7/23/e986ed6964530e005218d8b131fa0fddd60fe3c4571b454aaceb42862e17/assimp_py-1.0.7.tar.gz
+
+
+%description
+# assimp-py
+![PyPI Linux](https://github.com/ranjian0/assimp_py/workflows/PyPI%20ManyLinux/badge.svg)
+![PyPI Windows](https://github.com/ranjian0/assimp_py/workflows/PyPI%20WinMac/badge.svg)
+
+Minimal Python Bindings for ASSIMP Library using C-API
+
+
+# Installation
+
+```
+pip install assimp-py
+```
+
+from source
+
+```
+git clone https://github.com/ranjian0/assimp_py.git
+cd assimp_py
+python setup.py install
+```
+
+> **cmake>=3.18 is required for building from source**
+
+## [Optional] Run tests to make sure everything works fine
+```
+pip install pytest
+pytest tests
+```
+
+
+# Example Program
+
+```python
+import assimp_py
+
+# -- loading the scene
+process_flags = (
+ assimp_py.Process_Triangulate | assimp_py.Process_CalcTangentSpace
+)
+scene = assimp_py.ImportFile("models/planet/planet.obj", process_flags)
+
+# -- getting data
+for m in scene.meshes:
+ # -- getting vertex data
+ # vertices are guaranteed to exist
+ verts = m.vertices
+
+ # other components must be checked for None
+ normals = [] or m.normals
+ texcoords = [] or m.texcoords
+ tangents = [] or m.tangents
+ bitangent = [] or m.bitangents
+
+ # -- getting materials
+ # mat is a dict consisting of assimp material properties
+ mat = scene.materials[m.material_index]
+
+ # -- getting color
+ diffuse_color = mat["COLOR_DIFFUSE"]
+
+ # -- getting textures
+ diffuse_tex = mat["TEXTURES"][assimp_py.TextureType_DIFFUSE]
+```
+# Supported Mesh Formats
+
+> AMF 3DS AC ASE ASSBIN B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS M3D MD2 MD3 MD5 MDC MDL NFF NDO OFF OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD OBJ
+
+
+
+%package -n python3-assimp-py
+Summary: Minimal Python Bindings for ASSIMP Library using C-API
+Provides: python-assimp-py
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+BuildRequires: python3-cffi
+BuildRequires: gcc
+BuildRequires: gdb
+%description -n python3-assimp-py
+# assimp-py
+![PyPI Linux](https://github.com/ranjian0/assimp_py/workflows/PyPI%20ManyLinux/badge.svg)
+![PyPI Windows](https://github.com/ranjian0/assimp_py/workflows/PyPI%20WinMac/badge.svg)
+
+Minimal Python Bindings for ASSIMP Library using C-API
+
+
+# Installation
+
+```
+pip install assimp-py
+```
+
+from source
+
+```
+git clone https://github.com/ranjian0/assimp_py.git
+cd assimp_py
+python setup.py install
+```
+
+> **cmake>=3.18 is required for building from source**
+
+## [Optional] Run tests to make sure everything works fine
+```
+pip install pytest
+pytest tests
+```
+
+
+# Example Program
+
+```python
+import assimp_py
+
+# -- loading the scene
+process_flags = (
+ assimp_py.Process_Triangulate | assimp_py.Process_CalcTangentSpace
+)
+scene = assimp_py.ImportFile("models/planet/planet.obj", process_flags)
+
+# -- getting data
+for m in scene.meshes:
+ # -- getting vertex data
+ # vertices are guaranteed to exist
+ verts = m.vertices
+
+ # other components must be checked for None
+ normals = [] or m.normals
+ texcoords = [] or m.texcoords
+ tangents = [] or m.tangents
+ bitangent = [] or m.bitangents
+
+ # -- getting materials
+ # mat is a dict consisting of assimp material properties
+ mat = scene.materials[m.material_index]
+
+ # -- getting color
+ diffuse_color = mat["COLOR_DIFFUSE"]
+
+ # -- getting textures
+ diffuse_tex = mat["TEXTURES"][assimp_py.TextureType_DIFFUSE]
+```
+# Supported Mesh Formats
+
+> AMF 3DS AC ASE ASSBIN B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS M3D MD2 MD3 MD5 MDC MDL NFF NDO OFF OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD OBJ
+
+
+
+%package help
+Summary: Development documents and examples for assimp-py
+Provides: python3-assimp-py-doc
+%description help
+# assimp-py
+![PyPI Linux](https://github.com/ranjian0/assimp_py/workflows/PyPI%20ManyLinux/badge.svg)
+![PyPI Windows](https://github.com/ranjian0/assimp_py/workflows/PyPI%20WinMac/badge.svg)
+
+Minimal Python Bindings for ASSIMP Library using C-API
+
+
+# Installation
+
+```
+pip install assimp-py
+```
+
+from source
+
+```
+git clone https://github.com/ranjian0/assimp_py.git
+cd assimp_py
+python setup.py install
+```
+
+> **cmake>=3.18 is required for building from source**
+
+## [Optional] Run tests to make sure everything works fine
+```
+pip install pytest
+pytest tests
+```
+
+
+# Example Program
+
+```python
+import assimp_py
+
+# -- loading the scene
+process_flags = (
+ assimp_py.Process_Triangulate | assimp_py.Process_CalcTangentSpace
+)
+scene = assimp_py.ImportFile("models/planet/planet.obj", process_flags)
+
+# -- getting data
+for m in scene.meshes:
+ # -- getting vertex data
+ # vertices are guaranteed to exist
+ verts = m.vertices
+
+ # other components must be checked for None
+ normals = [] or m.normals
+ texcoords = [] or m.texcoords
+ tangents = [] or m.tangents
+ bitangent = [] or m.bitangents
+
+ # -- getting materials
+ # mat is a dict consisting of assimp material properties
+ mat = scene.materials[m.material_index]
+
+ # -- getting color
+ diffuse_color = mat["COLOR_DIFFUSE"]
+
+ # -- getting textures
+ diffuse_tex = mat["TEXTURES"][assimp_py.TextureType_DIFFUSE]
+```
+# Supported Mesh Formats
+
+> AMF 3DS AC ASE ASSBIN B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS M3D MD2 MD3 MD5 MDC MDL NFF NDO OFF OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD OBJ
+
+
+
+%prep
+%autosetup -n assimp-py-1.0.7
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-assimp-py -f filelist.lst
+%dir %{python3_sitearch}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.7-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..687355b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+7c71d4b6b00ef2ad6c0d82155b80a9f3 assimp_py-1.0.7.tar.gz