diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4648fd141969cc40c5d492f955ac63c2767df794 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM quay.io/pypa/manylinux2014_x86_64 + +COPY . /fbxsdkpy + +CMD ./buildall.sh diff --git a/build.sh b/build.sh index 1b5578ea48b4980bd70ea9206dcc1a1f0214f382..1887403cb05c397cd3dd82eb051022db8df48a2c 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,8 @@ set -x -which auditwheel +which python +python --version origdir=$(pwd) scdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" @@ -17,16 +18,18 @@ ls -1 *.tar.gz|while read a;do tar -xvzf "$a" -C "$builddir";done rm fbx*.tar.gz # install fbxsdk -[ -d "$fbxsdkdir" ] || mkdir "$fbxsdkdir" -printf "yes\nn\n" |"$builddir"/fbx*fbxsdk_linux "$fbxsdkdir" +[ -d "$fbxsdkdir" ] || (mkdir "$fbxsdkdir" && printf "yes\nn\n" |"$builddir"/fbx*fbxsdk_linux "$fbxsdkdir") # install fbxsdk python bindings -[ -d "$fbxpydir" ] || mkdir "$fbxpydir" -printf "yes\nn\n" |"$builddir"/fbx*fbxpythonbindings_linux "$fbxpydir" +[ -d "$fbxpydir" ] || (mkdir "$fbxpydir" && printf "yes\nn\n" |"$builddir"/fbx*fbxpythonbindings_linux "$fbxpydir") # patch sip files and library headers so that they compile with sip5 patch -p0 < patch +# patch libfbxsdk.so because it is not linked against libxml2 and libz for some reason +patchelf --add-needed libz.so.1 ${fbxsdkdir}/lib/gcc/x64/release/libfbxsdk.so +patchelf --add-needed libxml2.so.2 ${fbxsdkdir}/lib/gcc/x64/release/libfbxsdk.so + sip-wheel --verbose -auditwheel repair build/fbx/fbx*.whl +LD_LIBRARY_PATH=$(pwd)/build/fbxsdk/lib/gcc/x64/release/:$LD_LIBRARY_PATH auditwheel -v repair $(ls -1t fbx*.whl|head -1) diff --git a/buildall.sh b/buildall.sh new file mode 100755 index 0000000000000000000000000000000000000000..80a1e6bdb6ab6de713eeff03ce47bbfb8250ebc5 --- /dev/null +++ b/buildall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +ifss="$IFS" +IFS=$'\n' +for a in $(ls -d /opt/python/cp3*/);do + PATH=${a}bin/:$PATH python -m pip install sip + PATH=${a}bin/:$PATH ./build.sh +done + +IFS="$ifss" diff --git a/pyproject.toml b/pyproject.toml index 9e9edcd787855a110c2f2e3db2a8057a3ca002a6..b5b0922da35a08ebcbd187d32b201132cad171a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "sipbuild.api" # Specify the PEP 566 metadata for the project. [tool.sip.metadata] name = "fbxsdkpy" +version = "2020.1" # Configure the building of the fib bindings. [tool.sip.bindings.fbx_module] @@ -17,3 +18,4 @@ library-dirs = ["build/fbxsdk/lib/gcc/x64/release"] [tool.sip.project] sip-files-dir = "build/fbxpy/sip" wheel-includes = ["build/fbxpy/common/FbxCommon.py"] +mum-glibc-version = "2.17"