diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-01 17:05:47 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2017-02-01 17:05:47 +0000 |
commit | 815869375b6346add3b76d74dab2e8e177c0e0d0 (patch) | |
tree | 2ce65d2b5ea9c605b267b140e916f01b7971e837 | |
parent | 8341792c5bb8d47408f72afc5ae128c53e17fbf4 (diff) | |
download | psycopg2-815869375b6346add3b76d74dab2e8e177c0e0d0.tar.gz |
Merge back manylinux build script from the psycopg2-wheels project
-rwxr-xr-x | scripts/build-manylinux.sh (renamed from scripts/wheels-build.sh) | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/scripts/wheels-build.sh b/scripts/build-manylinux.sh index ede3024..4ceb133 100755 --- a/scripts/wheels-build.sh +++ b/scripts/build-manylinux.sh @@ -4,8 +4,8 @@ # # Run this script with something like: # -# docker run -t --rm -v `pwd`:/psycopg quay.io/pypa/manylinux1_x86_64 /psycopg/scripts/wheels-build.sh -# docker run -t --rm -v `pwd`:/psycopg quay.io/pypa/manylinux1_i686 linux32 /psycopg/scripts/wheels-build.sh +# docker run -t --rm -v `pwd`:/psycopg2 quay.io/pypa/manylinux1_x86_64 /psycopg2/scripts/build-manylinux.sh +# docker run -t --rm -v `pwd`:/psycopg2 quay.io/pypa/manylinux1_i686 linux32 /psycopg2/scripts/build-manylinux.sh # # (Note: -t is requrired for sudo) @@ -15,21 +15,25 @@ set -e -x # This doesn't work: # rpm -Uvh "http://yum.postgresql.org/9.5/redhat/rhel-5-x86_64/pgdg-redhat95-9.5-3.noarch.rpm" wget -O "/tmp/pgdg.rpm" "https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-5-x86_64/pgdg-centos95-9.5-3.noarch.rpm" -rpm -Uvh "/tmp/pgdg.rpm" +rpm -Uv "/tmp/pgdg.rpm" yum install -y postgresql95-devel postgresql95-server sudo # Make pg_config available export PGPATH=/usr/pgsql-9.5/bin/ export PATH="$PGPATH:$PATH" +# Find psycopg version +export VERSION=$(grep -e ^PSYCOPG_VERSION /psycopg2/setup.py | sed "s/.*'\(.*\)'/\1/") +export WHEELSDIR="/psycopg2/wheels/psycopg2-$VERSION" + # Create the wheel packages for PYBIN in /opt/python/*/bin; do - "${PYBIN}/pip" wheel /psycopg/ -w wheels/ + "${PYBIN}/pip" wheel /psycopg2/ -w "$WHEELSDIR" done # Bundle external shared libraries into the wheels -for WHL in wheels/*.whl; do - auditwheel repair "$WHL" -w /psycopg/wheels +for WHL in "$WHEELSDIR"/*.whl; do + auditwheel repair "$WHL" -w "$WHEELSDIR" done # Create a test cluster @@ -42,6 +46,6 @@ export PSYCOPG2_TESTDB_USER=postgres # Install packages and test for PYBIN in /opt/python/*/bin; do - "${PYBIN}/pip" install psycopg2 --no-index -f /psycopg/wheels + "${PYBIN}/pip" install psycopg2 --no-index -f "$WHEELSDIR" "${PYBIN}/python" -c "from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')" done |