Skip to content

Commit

Permalink
Redo packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Oct 26, 2021
1 parent 3ad6307 commit c164df2
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 4 deletions.
File renamed without changes.
38 changes: 38 additions & 0 deletions admin-tools/make-dist-3.3-3.5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
PACKAGE=uncompyle6

# FIXME put some of the below in a common routine
function finish {
cd $owd
}

cd $(dirname ${BASH_SOURCE[0]})
owd=$(pwd)
trap finish EXIT

if ! source ./pyenv-3.3-3.5-versions ; then
exit $?
fi
if ! source ./setup-python-3.3.sh ; then
exit $?
fi

cd ..
source $PACKAGE/version.py
echo $__version__

for pyversion in $PYVERSIONS; do
if ! pyenv local $pyversion ; then
exit $?
fi
# pip bdist_egg create too-general wheels. So
# we narrow that by moving the generated wheel.

# Pick out first two number of version, e.g. 3.5.1 -> 35
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/${PACKAGE}-$__version__-{py2.py3,py$first_two}-none-any.whl
done

python ./setup.py sdist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd $(dirname ${BASH_SOURCE[0]})
owd=$(pwd)
trap finish EXIT

if ! source ./pyenv-newer-versions ; then
if ! source ./pyenv-newest-versions ; then
exit $?
fi
if ! source ./setup-master.sh ; then
Expand All @@ -19,7 +19,7 @@ fi

cd ..
source $PACKAGE/version.py
echo $VERSION
echo $__version__

for pyversion in $PYVERSIONS; do
if ! pyenv local $pyversion ; then
Expand All @@ -32,7 +32,7 @@ for pyversion in $PYVERSIONS; do
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/${PACKAGE}-$VERSION-{py2.py3,py$first_two}-none-any.whl
mv -v dist/${PACKAGE}-$__version__-{py2.py3,py$first_two}-none-any.whl
done

python ./setup.py sdist
9 changes: 9 additions & 0 deletions admin-tools/pyenv-2.1-2.3-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- shell-script -*-
# Sets PYVERSIONS to be all pyenv the oldest versions we have.
# These are not covered (yet) by uncompyle6, although
# some programs do work here.
if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='2.1.3 2.2.3 2.3.7'
9 changes: 9 additions & 0 deletions admin-tools/pyenv-2.4-2.7-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- shell-script -*-
# Sets PYVERSIONS to be pyenv versions that
# we can use in the python-2.4-to-2.7 branch.

if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='2.4.6 2.5.6 2.6.9 2.7.18'
9 changes: 9 additions & 0 deletions admin-tools/pyenv-3.1-3.2-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- shell-script -*-
# Sets PYVERSIONS to be pyenv versions that
# we can use in the python-2.4 branch.

if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='3.1.5 3.2.6'
8 changes: 8 additions & 0 deletions admin-tools/pyenv-3.3-3.5-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- shell-script -*-
# Sets PYVERSIONS to be pyenv versions that
# we can use in the python-3.3-to-3.5 branch.
if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='3.5.10 3.3.7 3.4.10'
2 changes: 1 addition & 1 deletion admin-tools/pyenv-newest-versions
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='3.6.15 3.7.12 pyston-2.3 3.8.11'
export PYVERSIONS='3.6.15 3.7.12 pyston-2.3 3.8.11 3.9.7 3.10.0'
8 changes: 8 additions & 0 deletions admin-tools/pyenv-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- shell-script -*-
# Sets PYVERSIONS to be pyenv versions that
# we can use in the master branch.
if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='3.7.10 3.8.10'

0 comments on commit c164df2

Please sign in to comment.