You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Merge branch 'master' into python-3.3-to-3.5
This commit is contained in:
@@ -43,10 +43,12 @@ classifiers = [
|
|||||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
|
"Programming Language :: Python :: 2",
|
||||||
"Programming Language :: Python :: 2.4",
|
"Programming Language :: Python :: 2.4",
|
||||||
"Programming Language :: Python :: 2.5",
|
"Programming Language :: Python :: 2.5",
|
||||||
"Programming Language :: Python :: 2.6",
|
"Programming Language :: Python :: 2.6",
|
||||||
"Programming Language :: Python :: 2.7",
|
"Programming Language :: Python :: 2.7",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.0",
|
"Programming Language :: Python :: 3.0",
|
||||||
"Programming Language :: Python :: 3.1",
|
"Programming Language :: Python :: 3.1",
|
||||||
"Programming Language :: Python :: 3.2",
|
"Programming Language :: Python :: 3.2",
|
||||||
@@ -56,6 +58,9 @@ classifiers = [
|
|||||||
"Programming Language :: Python :: 3.6",
|
"Programming Language :: Python :: 3.6",
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
"Topic :: Software Development :: Debuggers",
|
"Topic :: Software Development :: Debuggers",
|
||||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||||
]
|
]
|
||||||
|
@@ -18,7 +18,7 @@ fi
|
|||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
source $PACKAGE/version.py
|
source $PACKAGE/version.py
|
||||||
echo $VERSION
|
echo $__version__
|
||||||
|
|
||||||
for pyversion in $PYVERSIONS; do
|
for pyversion in $PYVERSIONS; do
|
||||||
if ! pyenv local $pyversion ; then
|
if ! pyenv local $pyversion ; then
|
||||||
@@ -29,11 +29,15 @@ for pyversion in $PYVERSIONS; do
|
|||||||
python setup.py bdist_egg
|
python setup.py bdist_egg
|
||||||
done
|
done
|
||||||
|
|
||||||
|
pyenv local 2.7.18
|
||||||
|
python setup.py bdist_wheel
|
||||||
|
mv -v dist/${PACKAGE}-$__version__-py2{.py3,}-none-any.whl
|
||||||
|
|
||||||
# Pypi can only have one source tarball.
|
# Pypi can only have one source tarball.
|
||||||
# Tarballs can get created from the above setup, so make sure to remove them since we want
|
# Tarballs can get created from the above setup, so make sure to remove them since we want
|
||||||
# the tarball from master.
|
# the tarball from master.
|
||||||
|
|
||||||
tarball=dist/${PACKAGE}-$VERSION-tar.gz
|
tarball=dist/${PACKAGE}-${__version_}_-tar.gz
|
||||||
if [[ -f $tarball ]]; then
|
if [[ -f $tarball ]]; then
|
||||||
rm -v dist/${PACKAGE}-$VERSION-tar.gz
|
rm -v dist/${PACKAGE}-${__version__}-tar.gz
|
||||||
fi
|
fi
|
38
admin-tools/make-dist-3.3-3.5.sh
Executable file
38
admin-tools/make-dist-3.3-3.5.sh
Executable file
@@ -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
|
@@ -10,7 +10,7 @@ cd $(dirname ${BASH_SOURCE[0]})
|
|||||||
owd=$(pwd)
|
owd=$(pwd)
|
||||||
trap finish EXIT
|
trap finish EXIT
|
||||||
|
|
||||||
if ! source ./pyenv-newer-versions ; then
|
if ! source ./pyenv-newest-versions ; then
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
if ! source ./setup-master.sh ; then
|
if ! source ./setup-master.sh ; then
|
||||||
@@ -19,7 +19,7 @@ fi
|
|||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
source $PACKAGE/version.py
|
source $PACKAGE/version.py
|
||||||
echo $VERSION
|
echo $__version__
|
||||||
|
|
||||||
for pyversion in $PYVERSIONS; do
|
for pyversion in $PYVERSIONS; do
|
||||||
if ! pyenv local $pyversion ; then
|
if ! pyenv local $pyversion ; then
|
||||||
@@ -32,7 +32,7 @@ for pyversion in $PYVERSIONS; do
|
|||||||
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
|
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
|
||||||
rm -fr build
|
rm -fr build
|
||||||
python setup.py bdist_egg bdist_wheel
|
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
|
done
|
||||||
|
|
||||||
python ./setup.py sdist
|
python ./setup.py sdist
|
9
admin-tools/pyenv-2.1-2.3-versions
Normal file
9
admin-tools/pyenv-2.1-2.3-versions
Normal file
@@ -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
admin-tools/pyenv-2.4-2.7-versions
Normal file
9
admin-tools/pyenv-2.4-2.7-versions
Normal file
@@ -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
admin-tools/pyenv-3.1-3.2-versions
Normal file
9
admin-tools/pyenv-3.1-3.2-versions
Normal file
@@ -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'
|
@@ -1,7 +1,6 @@
|
|||||||
# -*- shell-script -*-
|
# -*- shell-script -*-
|
||||||
# Sets PYVERSIONS to be pyenv versions that
|
# Sets PYVERSIONS to be pyenv versions that
|
||||||
# we can use in the python-2.4 branch.
|
# we can use in the python-3.3-to-3.5 branch.
|
||||||
|
|
||||||
if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
|
if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
|
||||||
echo "This script should be *sourced* rather than run directly through bash"
|
echo "This script should be *sourced* rather than run directly through bash"
|
||||||
exit 1
|
exit 1
|
||||||
|
@@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
|
|||||||
echo "This script should be *sourced* rather than run directly through bash"
|
echo "This script should be *sourced* rather than run directly through bash"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
admin-tools/pyenv-versions
Normal file
8
admin-tools/pyenv-versions
Normal file
@@ -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'
|
7
setup.py
7
setup.py
@@ -5,12 +5,17 @@ import sys
|
|||||||
|
|
||||||
SYS_VERSION = sys.version_info[0:2]
|
SYS_VERSION = sys.version_info[0:2]
|
||||||
if not ((3, 3) <= SYS_VERSION <= (3, 5)):
|
if not ((3, 3) <= SYS_VERSION <= (3, 5)):
|
||||||
mess = "Python Release 3.3 .. 3.9 are supported in this code branch."
|
mess = "Python Release 3.3 .. 3.5 are supported in this code branch."
|
||||||
if (2, 4) <= SYS_VERSION <= (2, 7):
|
if (2, 4) <= SYS_VERSION <= (2, 7):
|
||||||
mess += (
|
mess += (
|
||||||
"\nFor your Python, version %s, use the python-2.4 code/branch."
|
"\nFor your Python, version %s, use the python-2.4 code/branch."
|
||||||
% sys.version[0:3]
|
% sys.version[0:3]
|
||||||
)
|
)
|
||||||
|
if SYS_VERSION >= (3, 6):
|
||||||
|
mess += (
|
||||||
|
"\nFor your Python, version %s, use the master code/branch."
|
||||||
|
% sys.version[0:3]
|
||||||
|
)
|
||||||
elif SYS_VERSION < (2, 4):
|
elif SYS_VERSION < (2, 4):
|
||||||
mess += (
|
mess += (
|
||||||
"\nThis package is not supported for Python version %s." % sys.version[0:3]
|
"\nThis package is not supported for Python version %s." % sys.version[0:3]
|
||||||
|
@@ -77,6 +77,12 @@ check-3.8: check-bytecode
|
|||||||
$(PYTHON) test_pythonlib.py --bytecode-3.8-run --verify-run
|
$(PYTHON) test_pythonlib.py --bytecode-3.8-run --verify-run
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-3.8 --syntax-verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --bytecode-3.8 --syntax-verify $(COMPILE)
|
||||||
|
|
||||||
|
check-3.9: check-bytecode
|
||||||
|
@echo "Note that we do not support decompiling Python 3.9 bytecode - no 3.9 tests run"
|
||||||
|
|
||||||
|
check-3.10: check-bytecode
|
||||||
|
@echo "Note that we do not support decompiling Python 3.10 bytecode - no 3.10 tests run"
|
||||||
|
|
||||||
# FIXME
|
# FIXME
|
||||||
#: this is called when running under pypy3.5-5.8.0, pypy2-5.6.0, or pypy3.6-7.3.0
|
#: this is called when running under pypy3.5-5.8.0, pypy2-5.6.0, or pypy3.6-7.3.0
|
||||||
5.8 5.6:
|
5.8 5.6:
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
#
|
#
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import sys, os, getopt, time
|
import sys, os, getopt, time
|
||||||
|
from xdis.version_info import version_tuple_to_str
|
||||||
|
|
||||||
program = 'uncompyle6'
|
program = 'uncompyle6'
|
||||||
|
|
||||||
@@ -197,6 +198,9 @@ def main_bin():
|
|||||||
mess = status_msg(do_verify, *result)
|
mess = status_msg(do_verify, *result)
|
||||||
print('# ' + mess)
|
print('# ' + mess)
|
||||||
pass
|
pass
|
||||||
|
except ImportError as e:
|
||||||
|
print(str(e))
|
||||||
|
sys.exit(2)
|
||||||
except (KeyboardInterrupt):
|
except (KeyboardInterrupt):
|
||||||
pass
|
pass
|
||||||
except verify.VerifyCmpError:
|
except verify.VerifyCmpError:
|
||||||
|
Reference in New Issue
Block a user