diff --git a/admin-tools/check-newer-versions.sh b/admin-tools/check-newer-versions.sh index a6d27051..1c2d18d4 100755 --- a/admin-tools/check-newer-versions.sh +++ b/admin-tools/check-newer-versions.sh @@ -1,4 +1,12 @@ #!/bin/bash +function finish { + cd $owd +} + +# FIXME put some of the below in a common routine +owd=$(pwd) +trap finish EXIT + cd $(dirname ${BASH_SOURCE[0]}) if ! source ./pyenv-newer-versions ; then exit $? @@ -11,7 +19,7 @@ for version in $PYVERSIONS; do if ! pyenv local $version ; then exit $? fi - make clean && python setup.py develop + make clean && pip install -e . if ! make check; then exit $? fi diff --git a/admin-tools/check-older-versions.sh b/admin-tools/check-older-versions.sh index 53a00f6f..84355622 100755 --- a/admin-tools/check-older-versions.sh +++ b/admin-tools/check-older-versions.sh @@ -1,4 +1,10 @@ #!/bin/bash +function finish { + cd $owd +} +owd=$(pwd) +trap finish EXIT + cd $(dirname ${BASH_SOURCE[0]}) if ! source ./pyenv-older-versions ; then exit $? diff --git a/admin-tools/how-to-make-a-release.txt b/admin-tools/how-to-make-a-release.txt index 38e346ac..70bf3449 100644 --- a/admin-tools/how-to-make-a-release.txt +++ b/admin-tools/how-to-make-a-release.txt @@ -18,38 +18,25 @@ git push Make sure pyenv is running # Pyenv -source make-dist/pyenv-versions +source admin-tools/check-newer-versions.sh -Test all python versions: - for version in $PYVERSIONS; do pyenv local $version && make clean && python setup.py develop && make check; done - # Switch to python-2.4 and build that first... - - ----- - -./setup-python-2.4.sh +source admin-tools/setup-python-2.4 rm ChangeLog git merge master -check uncompyle6/version.py to see it has changed -make ChangeLog Update NEWS from master branch git commit -m"Get ready for release $VERSION" . -PYVERSIONS='2.4.6 2.5.6' - -for version in $PYVERSIONS; do pyenv local $version && make clean && python setup.py develop && make check; done +source admin-tools/check-older-versions.sh +source admin-tools/check-newer-versions.sh make-dist-older.sh git tag release-python-2.4-$VERSION -git push --tags - -. ./setup-master.sh ./make-dist-newer.sh diff --git a/admin-tools/make-dist-newer.sh b/admin-tools/make-dist-newer.sh index 4f10e3b1..49f4614c 100755 --- a/admin-tools/make-dist-newer.sh +++ b/admin-tools/make-dist-newer.sh @@ -1,12 +1,26 @@ #!/bin/bash PACKAGE=uncompyle6 + +# FIXME put some of the below in a common routine +function finish { + cd $owd +} +cd $(dirname ${BASH_SOURCE[0]}) +if ! source ./pyenv-older-versions ; then + exit $? +fi +if ! source ./setup-master.sh ; then + exit $? +fi + +cd .. source $PACKAGE/version.py -. ./setup-master.sh echo $VERSION -PYVERSIONS='3.5.2 3.6.2 2.6.9 3.3.6 2.7.13 3.4.2 3.5.6' + for pyversion in $PYVERSIONS; do # Pick out first two numbers first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//') + rm -fr build python setup.py bdist_egg bdist_wheel mv -v dist/uncompyle6-$VERSION-{py2.py3,py$first_two}-none-any.whl done diff --git a/admin-tools/make-dist-older.sh b/admin-tools/make-dist-older.sh index 8300bf95..cfdbe79d 100755 --- a/admin-tools/make-dist-older.sh +++ b/admin-tools/make-dist-older.sh @@ -1,18 +1,34 @@ #!/bin/bash PACKAGE=uncompyle6 + +# FIXME put some of the below in a common routine +function finish { + cd $owd +} + +cd $(dirname ${BASH_SOURCE[0]}) +if ! source ./pyenv-older-versions ; then + exit $? +fi if ! source ./setup-python-2.4.sh ; then exit $? fi -source $PACKAGE/version.py + +source ../$PACKAGE/version.py echo $VERSION -PYVERSIONS='2.4.6 2.5.6' + for pyversion in $PYVERSIONS; do # Pick out first two numbers first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//') rm -fr build python setup.py bdist_egg done + +# Pypi can only have one source taball. +# Tarballs can get created from the above setup, so make sure to remove them since we want +# the tarball from master. + tarball=dist/uncompyle6-$VERSION-tar.gz if -f $tarball; then - rm dist/uncompyle6-$VERSION-tar.gz + rm -v dist/uncompyle6-$VERSION-tar.gz fi