release scripts

This commit is contained in:
Jason Madden 2018-02-07 09:18:05 -06:00
parent e5393b4e51
commit dc21d22ca0
No known key found for this signature in database
GPG Key ID: 349F84431A08B99E
4 changed files with 98 additions and 0 deletions

View File

@ -17,3 +17,4 @@ recursive-include doc *.py *.rst *.png Makefile
recursive-exclude doc relstorage.*.rst _build
recursive-include repltest *.cfg *.conf *.in *.patch *.sql
recursive-include scripts *.sh make-manylinux

24
scripts/releases/make-manylinux Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
# Initially based on a snippet from the greenlet project.
# This needs to be run from the root of the project.
set -e
export PYTHONUNBUFFERED=1
export PYTHONDONTWRITEBYTECODE=1
if [ -d /RelStorage -a -d /opt/python ]; then
# Running inside docker
yum -y install libffi-devel
cd /RelStorage
rm -rf wheelhouse
for variant in `ls -d /opt/python/cp{27,34,35,36}*`; do
rm -rf dist build *.egg-info
$variant/bin/pip install -U cffi setuptools wheel
$variant/bin/pip install -U .
PATH=$variant/bin:$PATH $variant/bin/python setup.py bdist_wheel
auditwheel repair dist/*.whl
done
rm -rf dist build *.egg-info
exit 0
fi
docker run --rm -ti -v "$(pwd):/RelStorage" quay.io/pypa/manylinux1_x86_64 /RelStorage/scripts/releases/$(basename $0)

View File

@ -0,0 +1,46 @@
#!/opt/local/bin/bash
#
# Quick hack script to build a single release in a virtual env. Takes one
# argument, the path to python to use.
# Has hardcoded paths, probably only works on my (JAM) machine.
set -e
export WORKON_HOME=$HOME/Projects/VirtualEnvs
export VIRTUALENVWRAPPER_LOG_DIR=~/.virtualenvs
source `which virtualenvwrapper.sh`
# Make sure there are no -march flags set
# https://github.com/gevent/gevent/issues/791
unset CFLAGS
unset CXXFLAGS
unset CPPFLAGS
# If we're building on 10.12, we have to exclude clock_gettime
# because it's not available on earlier releases and leads to
# segfaults because the symbol clock_gettime is NULL.
# See https://github.com/gevent/gevent/issues/916
export CPPFLAGS="-D_DARWIN_FEATURE_CLOCK_GETTIME=0"
BASE=`pwd`/../../
BASE=`greadlink -f $BASE`
cd /tmp/RelStorage
virtualenv -p $1 `basename $1`
cd `basename $1`
echo "Made tmpenv"
echo `pwd`
source bin/activate
echo cloning $BASE
git clone $BASE RelStorage
cd ./RelStorage
pip install -U pip
pip install -U setuptools cython greenlet cffi
pip install -U wheel
# We may need different versions of deps depending on the
# version of python; that's captured in this file.
# we still need to upgrade cython first, though
# because we can get kwargs errors otherwise
pip install -U .
python ./setup.py sdist bdist_wheel
cp dist/*whl /tmp/RelStorage/

View File

@ -0,0 +1,27 @@
#!/opt/local/bin/bash
# Quick hack script to create many gevent releases.
# Contains hardcoded paths. Probably only works on my (JAM) machine
# (OS X 10.11)
mkdir /tmp/RelStorage/
# 2.7 is a python.org build, builds a 10_6_intel wheel
./relstoragerel.sh /usr/local/bin/python2.7
# 3.4 is a python.org build, builds a 10_6_intel wheel
./relstoragerel.sh /usr/local/bin/python3.4
# 3.5 is a python.org build, builds a 10_6_intel wheel
./relstoragerel.sh /usr/local/bin/python3.5
# 3.6 is a python.org build, builds a 10_6_intel wheel
./relstoragerel.sh /usr/local/bin/python3.6
# 3.7 is a python.org build, builds a 10_6_intel wheel
./relstoragerel.sh /usr/local/bin/python3.7
# PyPy 4.0
./relstoragerel.sh `which pypy`