diff --git a/docker/manylinux2014/README.md b/docker/manylinux2014/README.md index 4020d530f430c261d58d2b77ed75c698483fc3f4..b2bcc67d1513d3ec5b9eac31836a8a1e0a3ffb22 100644 --- a/docker/manylinux2014/README.md +++ b/docker/manylinux2014/README.md @@ -24,12 +24,11 @@ docker run --rm -it manylinux-test ## Upload the wheels on PyPi ``` -twine upload wheelhouse/* +twine upload dist/* ``` ## TODO -- use TARGET instead of PACKAGE_NAME: hpp-fcl on PyPI - use robotpkg to build, instead of downloading the sources: could build all non-python stuff in the docker image - pyproject.toml in skbuild doc - lib/pythonX.Y/site-packages/foo.cpython\*.so links to libfoo.so and has RPATH: $ORIGIN/../../../foo.libs diff --git a/docker/manylinux2014/all.sh b/docker/manylinux2014/all.sh index 3ec2b36981a67bd08d76fbc38eaf363f7792d67c..139d41a36f72c9298b0ba54f919648f9ad05add1 100755 --- a/docker/manylinux2014/all.sh +++ b/docker/manylinux2014/all.sh @@ -1,8 +1,7 @@ #!/bin/bash -eux -sudo touch dist wheelhouse -sudo rm -rf dist wheelhouse docker build -t manylinux . +docker run -v "$(pwd -P):/io" -t manylinux rm -rf /io/dist /io/wheelhouse docker run -v "$(pwd -P):/io" -t manylinux /scripts/setup.sh eigenpy docker run -v "$(pwd -P):/io" -t manylinux /scripts/setup.sh hpp-fcl docker run -v "$(pwd -P):/io" -t manylinux /scripts/setup.sh pinocchio diff --git a/docker/manylinux2014/config/eigenpy/config b/docker/manylinux2014/config/eigenpy/config index c7c1f4753b576f54a8ba4eb6ce414369fbfb76c5..a0136ab6b4479ba85f2a609981a3b35b9d4afa82 100644 --- a/docker/manylinux2014/config/eigenpy/config +++ b/docker/manylinux2014/config/eigenpy/config @@ -1,5 +1,4 @@ -PACKAGE_NAME=eigenpy -GITHUB_ORG=stack-of-tasks +ORG=stack-of-tasks VERSION=2.5.0 INSTALL_REQUIRES='["numpy"]' NPROC=8 diff --git a/docker/manylinux2014/config/hpp-fcl/config b/docker/manylinux2014/config/hpp-fcl/config index dd2969d9e55f5e975c0614c928d9aaf085cd6cf6..5c77d6c1a7a9f40ad958b51db04a05606559242b 100644 --- a/docker/manylinux2014/config/hpp-fcl/config +++ b/docker/manylinux2014/config/hpp-fcl/config @@ -1,5 +1,4 @@ -PACKAGE_NAME=hppfcl -GITHUB_ORG=humanoid-path-planner +ORG=humanoid-path-planner VERSION=1.6.0 INSTALL_REQUIRES='["eigenpy"]' NPROC=8 diff --git a/docker/manylinux2014/config/pinocchio/config b/docker/manylinux2014/config/pinocchio/config index 78f44d8588a6782fe6a167f614c2e19334a00135..ef0af2ed5d6c8f54807d4ceb15b59147be603f46 100644 --- a/docker/manylinux2014/config/pinocchio/config +++ b/docker/manylinux2014/config/pinocchio/config @@ -1,5 +1,4 @@ -PACKAGE_NAME=pinocchio -GITHUB_ORG=stack-of-tasks +ORG=stack-of-tasks VERSION=2.5.0 -INSTALL_REQUIRES='["hppfcl"]' +INSTALL_REQUIRES='["hpp-fcl"]' NPROC=8 diff --git a/docker/manylinux2014/config/pinocchio/pre_build.sh b/docker/manylinux2014/config/pinocchio/pre_build.sh index aeaca83dffe9b703589301966af5460db8ab9da2..c579982d1821ec86422a78c52b206ca94f2069e8 100755 --- a/docker/manylinux2014/config/pinocchio/pre_build.sh +++ b/docker/manylinux2014/config/pinocchio/pre_build.sh @@ -3,5 +3,5 @@ source "/io/config/hpp-fcl/config" for PYBIN in /opt/python/*/bin; do - "$PYBIN/pip" install --find-links=/io/dist/ eigenpy hppfcl + "$PYBIN/pip" install --find-links=/io/dist/ eigenpy hpp-fcl done diff --git a/docker/manylinux2014/scripts/build_wheels.sh b/docker/manylinux2014/scripts/build_wheels.sh index da91bb2286bf519c2840653ff097c85ee8519724..a4a30790ac7e8d5a0f94b246a819186553e540bb 100755 --- a/docker/manylinux2014/scripts/build_wheels.sh +++ b/docker/manylinux2014/scripts/build_wheels.sh @@ -62,8 +62,8 @@ done # Install packages and test for PYBIN in /opt/python/*/bin; do PYVERSION=$(find "$PYBIN" -type f -name 'python*.*' | head -1 | grep -Eo "[0-9]\.[0-9]") - "$PYBIN/pip" install "$PACKAGE_NAME" --no-index --find-links=/io/wheelhouse/ - (cd "$HOME"; "$PYBIN/python" "/io/config/$TARGET/test.py") || touch "/io/wheelhouse/$PYVERSION-$PACKAGE_NAME" + "$PYBIN/pip" install "$TARGET" --no-index --find-links=/io/wheelhouse/ + (cd "$HOME"; "$PYBIN/python" "/io/config/$TARGET/test.py") || touch "/io/wheelhouse/$PYVERSION-$TARGET" done # TODO: Fix generated .cmake files (need to be done after installing the wheels so we know where the shared libraries are installed) @@ -72,7 +72,7 @@ for whl in /io/wheelhouse/*.whl; do WHEEL_DIR=$(find . -name *.so | head -1 | cut -d'/' -f2) PYVERSION=$(find "$WHEEL_DIR" -type d -name 'python*' | grep 'lib/python' | tail -c4) - MAIN_LIB=$(find / ! -path "*$WHEEL_DIR*" -path "*$PYVERSION*$PACKAGE_NAME*.libs/*" -name "*$PACKAGE_NAME*.so*") + MAIN_LIB=$(find / ! -path "*$WHEEL_DIR*" -path "*$PYVERSION*$TARGET*.libs/*" -name "*$TARGET*.so*") MAIN_LIB_NAME=$(basename "$MAIN_LIB") # libeigenpy-[hash].so MAIN_LIB_NAME_NO_HASH=$(echo $MAIN_LIB_NAME | sed 's/-.*\.so/\.so/') # libeigenpy.so @@ -88,7 +88,7 @@ for whl in /io/wheelhouse/*.whl; do rm -rf "${WHEEL_DIR:?}"/ done -rm -rf "$PACKAGE_NAME".egg-info/ dist/ +rm -rf "$TARGET".egg-info/ dist/ mkdir -p /io/dist mv /io/wheelhouse/* /io/dist/ diff --git a/docker/manylinux2014/scripts/setup.py b/docker/manylinux2014/scripts/setup.py index 6d3a958de37fa10cf20b6c11f50c4f8e9f612dfb..b2939af18f2a4684457fc858480130f2defdd966 100644 --- a/docker/manylinux2014/scripts/setup.py +++ b/docker/manylinux2014/scripts/setup.py @@ -7,12 +7,12 @@ except FileNotFoundError: long_description = "" setup( - name="PACKAGE_NAME", + name="TARGET", version="VERSION", description="DESCRIPTION", long_description=long_description, long_description_content_type="text/markdown", - url="https://github.com/GITHUB_ORG/TARGET", + url="https://github.com/ORG/TARGET", install_requires=INSTALL_REQUIRES, classifiers=[ "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", diff --git a/docker/manylinux2014/scripts/setup.sh b/docker/manylinux2014/scripts/setup.sh index 53f5f91044a56b09acc111e2495fe7bf859482a2..8a36c399c528d461fad2180acefeb3a8bff9915f 100755 --- a/docker/manylinux2014/scripts/setup.sh +++ b/docker/manylinux2014/scripts/setup.sh @@ -4,14 +4,14 @@ TARGET=${1:-eigenpy} # Verify that variables are set properly source "/io/config/$TARGET/config" -for var in PACKAGE_NAME GITHUB_ORG VERSION NPROC; do +for var in ORG VERSION NPROC; do [ -z "${!var}" ] && { echo "$var is not set."; exit; } done mkdir -p /io/wheelhouse [ "$(ls -A /io/wheelhouse)" ] && { echo "./wheelhouse should be empty before running this script."; exit; } -curl -sSL "https://github.com/$GITHUB_ORG/$TARGET/releases/download/v$VERSION/$TARGET-$VERSION.tar.gz" \ +curl -sSL "https://github.com/$ORG/$TARGET/releases/download/v$VERSION/$TARGET-$VERSION.tar.gz" \ | tar xz --strip-components=1 2> /dev/null cp /scripts/setup.py . @@ -22,7 +22,7 @@ sed -i 's/REQUIRED COMPONENTS Interpreter Development/REQUIRED COMPONENTS Interp # Write setup.py DESCRIPTION=$(grep PROJECT_DESCRIPTION CMakeLists.txt | cut -d'"' -f2) # TODO: Not working on multiple lines -for var in PACKAGE_NAME GITHUB_ORG TARGET VERSION DESCRIPTION; do +for var in ORG TARGET VERSION DESCRIPTION; do sed -i "s~$var~${!var}~" setup.py done diff --git a/docker/manylinux2014/test.sh b/docker/manylinux2014/test.sh index cae4a400de39ce5ca9c9b2ba1cc452d022f344f7..e687a54d59b905619f63e5eff6975d2346ae7c6a 100755 --- a/docker/manylinux2014/test.sh +++ b/docker/manylinux2014/test.sh @@ -2,7 +2,6 @@ while read tgt do echo -e "\n================================ $tgt ===================================\n" - source "/$tgt/config" - pip install --find-links=/ "$PACKAGE_NAME" + pip install --find-links=/ "$tgt" python "/$tgt/test.py" done < targets