You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Get ready for release 3.9.1
This commit is contained in:
@@ -43,9 +43,9 @@ jobs:
|
||||
- run:
|
||||
command: | # Use pip to install dependengcies
|
||||
sudo pip install --user --upgrade setuptools
|
||||
# Until the next release
|
||||
sudo pip install git+https://github.com/rocky/python-xdis#egg=xdis
|
||||
pip install --user -e .
|
||||
# Not sure why "pip install -e" doesn't work above
|
||||
# pip install click spark-parser xdis
|
||||
pip install --user -r requirements-dev.txt
|
||||
|
||||
# Save dependency cache
|
||||
|
4
.github/workflows/osx.yml
vendored
4
.github/workflows/osx.yml
vendored
@@ -22,9 +22,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# Until the next xdis release
|
||||
pip install git+https://github.com/rocky/python-xdis#egg=xdis
|
||||
pip install -e .
|
||||
# Not sure why "pip install -e" doesn't work above
|
||||
# pip install click spark-parser xdis
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Test uncompyle6
|
||||
run: |
|
||||
|
3
.github/workflows/ubuntu.yml
vendored
3
.github/workflows/ubuntu.yml
vendored
@@ -21,9 +21,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# Until the next xdis release
|
||||
pip install git+https://github.com/rocky/python-xdis#egg=xdis
|
||||
pip install -e .
|
||||
# pip install click spark-parser xdis
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Test uncompyle6
|
||||
run: |
|
||||
|
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@@ -22,9 +22,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
# Until the next xdis release
|
||||
pip install git+https://github.com/rocky/python-xdis#egg=xdis
|
||||
pip install -e .
|
||||
# Not sure why "pip install -e" doesn't work above
|
||||
# pip install click spark-parser xdis
|
||||
pip install -r requirements-dev.txt
|
||||
- name: Test uncompyle6
|
||||
run: |
|
||||
|
20
NEWS.md
20
NEWS.md
@@ -1,3 +1,23 @@
|
||||
3.9.1: 2024-05-15
|
||||
=================
|
||||
|
||||
Lots of changes major changes. track xdis API has changes.
|
||||
|
||||
Separate Phases more clearly:
|
||||
* disassembly
|
||||
* tokenization
|
||||
* parsing
|
||||
* abstracting to AST (more is done in newer projects)
|
||||
* printing
|
||||
|
||||
Although we do not decompile bytecode greater than 3.8, code supports running from up to 3.12.
|
||||
|
||||
Many bugs fixed.
|
||||
|
||||
A lot of Linting and coding style modernization.
|
||||
|
||||
Work done in preparation for Blackhat Asia 2024
|
||||
|
||||
3.9.0: 2022-12-22
|
||||
=================
|
||||
|
||||
|
@@ -62,6 +62,8 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: Implementation :: PyPy",
|
||||
"Topic :: Software Development :: Debuggers",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
|
@@ -3,9 +3,9 @@ PACKAGE=uncompyle6
|
||||
|
||||
# FIXME put some of the below in a common routine
|
||||
function finish {
|
||||
cd $owd
|
||||
cd $make_dist_uncompyle6_owd
|
||||
}
|
||||
owd=$(pwd)
|
||||
make_dist_uncompyle6_owd=$(pwd)
|
||||
trap finish EXIT
|
||||
|
||||
cd $(dirname ${BASH_SOURCE[0]})
|
||||
@@ -21,6 +21,11 @@ source $PACKAGE/version.py
|
||||
echo $__version__
|
||||
|
||||
for pyversion in $PYVERSIONS; do
|
||||
echo --- $pyversion ---
|
||||
if [[ ${pyversion:0:4} == "pypy" ]] ; then
|
||||
echo "$pyversion - PyPy does not get special packaging"
|
||||
continue
|
||||
fi
|
||||
if ! pyenv local $pyversion ; then
|
||||
exit $?
|
||||
fi
|
||||
@@ -41,3 +46,4 @@ tarball=dist/${PACKAGE}-${__version_}_-tar.gz
|
||||
if [[ -f $tarball ]]; then
|
||||
rm -v dist/${PACKAGE}-${__version__}-tar.gz
|
||||
fi
|
||||
finish
|
||||
|
49
admin-tools/make-dist-3.0-3.2.sh
Normal file
49
admin-tools/make-dist-3.0-3.2.sh
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
PACKAGE=uncompyle6
|
||||
|
||||
# FIXME put some of the below in a common routine
|
||||
function finish {
|
||||
cd $uncompyle6_30_make_dist_owd
|
||||
}
|
||||
|
||||
cd $(dirname ${BASH_SOURCE[0]})
|
||||
uncompyle6_30_make_dist_owd=$(pwd)
|
||||
trap finish EXIT
|
||||
|
||||
if ! source ./pyenv-3.0-3.2-versions ; then
|
||||
exit $?
|
||||
fi
|
||||
if ! source ./setup-python-3.0.sh ; then
|
||||
exit $?
|
||||
fi
|
||||
|
||||
cd ..
|
||||
source $PACKAGE/version.py
|
||||
echo $__version__
|
||||
|
||||
for pyversion in $PYVERSIONS; do
|
||||
echo --- $pyversion ---
|
||||
if [[ ${pyversion:0:4} == "pypy" ]] ; then
|
||||
echo "$pyversion - PyPy does not get special packaging"
|
||||
continue
|
||||
fi
|
||||
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
|
||||
echo === $pyversion ===
|
||||
done
|
||||
|
||||
python ./setup.py sdist
|
||||
tarball=dist/${PACKAGE}-${__version__}.tar.gz
|
||||
if [[ -f $tarball ]]; then
|
||||
mv -v $tarball dist/${PACKAGE}_31-${__version__}.tar.gz
|
||||
fi
|
||||
finish
|
@@ -3,11 +3,11 @@ PACKAGE=uncompyle6
|
||||
|
||||
# FIXME put some of the below in a common routine
|
||||
function finish {
|
||||
cd $owd
|
||||
cd $uncompyle6_33_make_owd
|
||||
}
|
||||
|
||||
cd $(dirname ${BASH_SOURCE[0]})
|
||||
owd=$(pwd)
|
||||
uncompyle6_33_make_owd=$(pwd)
|
||||
trap finish EXIT
|
||||
|
||||
if ! source ./pyenv-3.3-3.5-versions ; then
|
||||
@@ -22,6 +22,11 @@ source $PACKAGE/version.py
|
||||
echo $__version__
|
||||
|
||||
for pyversion in $PYVERSIONS; do
|
||||
echo --- $pyversion ---
|
||||
if [[ ${pyversion:0:4} == "pypy" ]] ; then
|
||||
echo "$pyversion - PyPy does not get special packaging"
|
||||
continue
|
||||
fi
|
||||
if ! pyenv local $pyversion ; then
|
||||
exit $?
|
||||
fi
|
||||
@@ -33,6 +38,12 @@ for pyversion in $PYVERSIONS; do
|
||||
rm -fr build
|
||||
python setup.py bdist_egg bdist_wheel
|
||||
mv -v dist/${PACKAGE}-$__version__-{py2.py3,py$first_two}-none-any.whl
|
||||
echo === $pyversion ===
|
||||
done
|
||||
|
||||
python ./setup.py sdist
|
||||
tarball=dist/${PACKAGE}-${__version__}.tar.gz
|
||||
if [[ -f $tarball ]]; then
|
||||
mv -v $tarball dist/${PACKAGE}_31-${__version__}.tar.gz
|
||||
fi
|
||||
finish
|
||||
|
@@ -3,11 +3,11 @@ PACKAGE=uncompyle6
|
||||
|
||||
# FIXME put some of the below in a common routine
|
||||
function finish {
|
||||
cd $owd
|
||||
cd $make_uncompyle6_newest_owd
|
||||
}
|
||||
|
||||
cd $(dirname ${BASH_SOURCE[0]})
|
||||
owd=$(pwd)
|
||||
make_uncompyle6_newest_owd=$(pwd)
|
||||
trap finish EXIT
|
||||
|
||||
if ! source ./pyenv-newest-versions ; then
|
||||
@@ -22,6 +22,11 @@ source $PACKAGE/version.py
|
||||
echo $__version__
|
||||
|
||||
for pyversion in $PYVERSIONS; do
|
||||
echo --- $pyversion ---
|
||||
if [[ ${pyversion:0:4} == "pypy" ]] ; then
|
||||
echo "$pyversion - PyPy does not get special packaging"
|
||||
continue
|
||||
fi
|
||||
if ! pyenv local $pyversion ; then
|
||||
exit $?
|
||||
fi
|
||||
@@ -36,3 +41,4 @@ for pyversion in $PYVERSIONS; do
|
||||
done
|
||||
|
||||
python ./setup.py sdist
|
||||
finish
|
||||
|
64
pyproject.toml
Normal file
64
pyproject.toml
Normal file
@@ -0,0 +1,64 @@
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=61.2",
|
||||
]
|
||||
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
authors = [
|
||||
{name = "Rocky Bernstein", email = "rb@dustyfeet.com"},
|
||||
]
|
||||
|
||||
name = "uncompyle6"
|
||||
description = "Python cross-version byte-code library and disassembler"
|
||||
dependencies = [
|
||||
"click",
|
||||
"spark-parser >= 1.8.9, < 1.9.0",
|
||||
"xdis >= 6.0.8, < 6.2.0",
|
||||
]
|
||||
readme = "README.rst"
|
||||
license = {text = "GPL"}
|
||||
keywords = ["Python bytecode", "bytecode", "disassembler"]
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python",
|
||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||
"Programming Language :: Python :: 2.4",
|
||||
"Programming Language :: Python :: 2.5",
|
||||
"Programming Language :: Python :: 2.6",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3.0",
|
||||
"Programming Language :: Python :: 3.1",
|
||||
"Programming Language :: Python :: 3.2",
|
||||
"Programming Language :: Python :: 3.3",
|
||||
"Programming Language :: Python :: 3.4",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/rocky/python-uncompyle6"
|
||||
Downloads = "https://github.com/rocky/python-uncompyle6/releases"
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pre-commit",
|
||||
"pytest",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
uncompyle6 = "uncompyle6.bin.uncompile:main_bin"
|
||||
uncompyle6-tokenize = "uncompyle6.bin.pydisassemble:main"
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = {attr = "uncompyle6.version.__version__"}
|
61
setup.py
61
setup.py
@@ -1,61 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
import setuptools
|
||||
import sys
|
||||
"""Setup script for the 'xdis' distribution."""
|
||||
|
||||
"""Setup script for the 'uncompyle6' distribution."""
|
||||
from setuptools import setup
|
||||
|
||||
SYS_VERSION = sys.version_info[0:2]
|
||||
if not ((2, 4) <= SYS_VERSION < (3, 13)):
|
||||
mess = "Python Release 2.6 .. 3.12 are supported in this code branch."
|
||||
if (2, 4) <= SYS_VERSION <= (2, 7):
|
||||
mess += (
|
||||
"\nFor your Python, version %s, use the python-2.4 code/branch."
|
||||
% sys.version[0:3]
|
||||
)
|
||||
if (3, 3) <= SYS_VERSION < (3, 6):
|
||||
mess += (
|
||||
"\nFor your Python, version %s, use the python-3.3-to-3.5 code/branch."
|
||||
% sys.version[0:3]
|
||||
)
|
||||
elif SYS_VERSION < (2, 4):
|
||||
mess += (
|
||||
"\nThis package is not supported for Python version %s." % sys.version[0:3]
|
||||
)
|
||||
print(mess)
|
||||
raise Exception(mess)
|
||||
|
||||
from __pkginfo__ import (
|
||||
author,
|
||||
author_email,
|
||||
install_requires,
|
||||
license,
|
||||
long_description,
|
||||
classifiers,
|
||||
entry_points,
|
||||
modname,
|
||||
py_modules,
|
||||
short_desc,
|
||||
__version__,
|
||||
web,
|
||||
zip_safe,
|
||||
)
|
||||
|
||||
setuptools.setup(
|
||||
author=author,
|
||||
author_email=author_email,
|
||||
classifiers=classifiers,
|
||||
description=short_desc,
|
||||
entry_points=entry_points,
|
||||
install_requires=install_requires,
|
||||
license=license,
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/x-rst",
|
||||
name=modname,
|
||||
packages=setuptools.find_packages(),
|
||||
py_modules=py_modules,
|
||||
test_suite="nose.collector",
|
||||
url=web,
|
||||
tests_require=["nose>=1.0"],
|
||||
version=__version__,
|
||||
zip_safe=zip_safe,
|
||||
)
|
||||
setup(packages=["uncompyle6"])
|
||||
|
@@ -14,4 +14,4 @@
|
||||
# This file is suitable for sourcing inside POSIX shell as
|
||||
# well as importing into Python
|
||||
# fmt: off
|
||||
__version__="3.9.1.dev0" # noqa
|
||||
__version__="3.9.1" # noqa
|
||||
|
Reference in New Issue
Block a user