2017-10-12 01:14:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
PACKAGE=uncompyle6
|
2017-10-12 01:51:01 +00:00
|
|
|
|
|
|
|
# FIXME put some of the below in a common routine
|
|
|
|
function finish {
|
|
|
|
cd $owd
|
|
|
|
}
|
2017-10-12 11:19:46 +00:00
|
|
|
|
|
|
|
cd $(dirname ${BASH_SOURCE[0]})
|
2017-10-12 01:56:49 +00:00
|
|
|
owd=$(pwd)
|
|
|
|
trap finish EXIT
|
|
|
|
|
2021-10-26 22:52:17 +00:00
|
|
|
if ! source ./pyenv-newest-versions ; then
|
2017-10-12 01:51:01 +00:00
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
if ! source ./setup-master.sh ; then
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
2017-10-12 01:14:30 +00:00
|
|
|
source $PACKAGE/version.py
|
2021-10-26 22:52:17 +00:00
|
|
|
echo $__version__
|
2017-10-12 01:51:01 +00:00
|
|
|
|
2017-10-12 01:14:30 +00:00
|
|
|
for pyversion in $PYVERSIONS; do
|
2017-10-12 01:56:49 +00:00
|
|
|
if ! pyenv local $pyversion ; then
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
# pip bdist_egg create too-general wheels. So
|
|
|
|
# we narrow that by moving the generated wheel.
|
|
|
|
|
2017-10-12 11:19:46 +00:00
|
|
|
# Pick out first two number of version, e.g. 3.5.1 -> 35
|
2017-10-12 01:14:30 +00:00
|
|
|
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
|
2017-10-12 01:51:01 +00:00
|
|
|
rm -fr build
|
2017-10-12 01:14:30 +00:00
|
|
|
python setup.py bdist_egg bdist_wheel
|
2021-10-26 22:52:17 +00:00
|
|
|
mv -v dist/${PACKAGE}-$__version__-{py2.py3,py$first_two}-none-any.whl
|
2017-10-12 01:14:30 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
python ./setup.py sdist
|