mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-23 01:16:34 +03:00
Merge back manylinux build script from the psycopg2-wheels project
This commit is contained in:
parent
8341792c5b
commit
815869375b
|
@ -4,8 +4,8 @@
|
||||||
#
|
#
|
||||||
# Run this script with something like:
|
# 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`:/psycopg2 quay.io/pypa/manylinux1_x86_64 /psycopg2/scripts/build-manylinux.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_i686 linux32 /psycopg2/scripts/build-manylinux.sh
|
||||||
#
|
#
|
||||||
# (Note: -t is requrired for sudo)
|
# (Note: -t is requrired for sudo)
|
||||||
|
|
||||||
|
@ -15,21 +15,25 @@ set -e -x
|
||||||
# This doesn't work:
|
# This doesn't work:
|
||||||
# rpm -Uvh "http://yum.postgresql.org/9.5/redhat/rhel-5-x86_64/pgdg-redhat95-9.5-3.noarch.rpm"
|
# 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"
|
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
|
yum install -y postgresql95-devel postgresql95-server sudo
|
||||||
|
|
||||||
# Make pg_config available
|
# Make pg_config available
|
||||||
export PGPATH=/usr/pgsql-9.5/bin/
|
export PGPATH=/usr/pgsql-9.5/bin/
|
||||||
export PATH="$PGPATH:$PATH"
|
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
|
# Create the wheel packages
|
||||||
for PYBIN in /opt/python/*/bin; do
|
for PYBIN in /opt/python/*/bin; do
|
||||||
"${PYBIN}/pip" wheel /psycopg/ -w wheels/
|
"${PYBIN}/pip" wheel /psycopg2/ -w "$WHEELSDIR"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Bundle external shared libraries into the wheels
|
# Bundle external shared libraries into the wheels
|
||||||
for WHL in wheels/*.whl; do
|
for WHL in "$WHEELSDIR"/*.whl; do
|
||||||
auditwheel repair "$WHL" -w /psycopg/wheels
|
auditwheel repair "$WHL" -w "$WHEELSDIR"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Create a test cluster
|
# Create a test cluster
|
||||||
|
@ -42,6 +46,6 @@ export PSYCOPG2_TESTDB_USER=postgres
|
||||||
|
|
||||||
# Install packages and test
|
# Install packages and test
|
||||||
for PYBIN in /opt/python/*/bin; do
|
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')"
|
"${PYBIN}/python" -c "from psycopg2 import tests; tests.unittest.main(defaultTest='tests.test_suite')"
|
||||||
done
|
done
|
Loading…
Reference in New Issue
Block a user