Skip to content

Commit 2ce2889

Browse files
committed
Get ready for release 1.9.0.
1 parent c070a6a commit 2ce2889

12 files changed

+326
-61
lines changed

NEWS.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
1.9.0 2024-10-8 Has it been that long?
22
======================================
33

4-
Revamp for more modern Python style in the 3.12 era:
4+
Revamp for a more modern Python style in the 3.12 era:
55
- start adding type annotations to code.
66
- use pyproject.toml
77
- remove illegal escape sequences
88

9-
BuildTree now builds trees iteratively rather than recursively. With this we can handle larger trees which are needed in the decompielrs.
9+
`BuildTree` now builds trees iteratively rather than recursively. With this we can handle larger trees which are needed in the decompilers.
1010

11-
Revise README.rst for above and go over spelling and grammar
12-
13-
Internally, more git branches have been created to supoprt older Python.
11+
Revise `README.rst` for the above and go over spelling and grammar
1412

13+
Internally, more git branches have been created to support older Python.
1514

1615
1.8.9 2018-07-28 S
1716
======================================

admin-tools/make-dist-2.4-2.7.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
PACKAGE=spark_parser
3+
4+
# FIXME put some of the below in a common routine
5+
function finish {
6+
cd $make_spark_dist_24_owd
7+
}
8+
make_spark_dist_24_owd=$(pwd)
9+
trap finish EXIT
10+
11+
cd $(dirname ${BASH_SOURCE[0]})
12+
if ! source ./pyenv-2.4-2.7-versions ; then
13+
exit $?
14+
fi
15+
if ! source ./setup-python-2.4.sh ; then
16+
exit $?
17+
fi
18+
19+
cd ..
20+
source $PACKAGE/version.py
21+
if [[ ! -n $__version__ ]]; then
22+
echo "You need to set __version__ first"
23+
exit 1
24+
fi
25+
echo $__version__
26+
27+
for pyversion in $PYVERSIONS; do
28+
echo --- $pyversion ---
29+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
30+
echo "$pyversion - PyPy does not get special packaging"
31+
continue
32+
fi
33+
if ! pyenv local $pyversion ; then
34+
exit $?
35+
fi
36+
37+
rm -fr build
38+
python setup.py bdist_egg
39+
echo === $pyversion ===
40+
done
41+
42+
echo "--- python 2.7 wheel ---"
43+
pyenv local 2.7.18
44+
python setup.py bdist_wheel
45+
echo === $pyversion ===
46+
47+
# PyPI can only have one source tarball.
48+
# Tarballs can get created from the above setup, so make sure to remove them since we want
49+
# the tarball from master.
50+
51+
tarball=dist/${PACKAGE}-$__version__-tar.gz
52+
if [[ -f $tarball ]]; then
53+
rm -v dist/${PACKAGE}-$__version__-tar.gz
54+
fi
55+
finish

admin-tools/make-dist-3.0-3.2.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
PACKAGE=spark_parser
3+
4+
# FIXME put some of the below in a common routine
5+
function finish {
6+
cd $make_spark_dist_30_owd
7+
}
8+
9+
make_spark_dist_30_owd=$(pwd)
10+
cd $(dirname ${BASH_SOURCE[0]})
11+
trap finish EXIT
12+
13+
if ! source ./pyenv-3.0-3.2-versions ; then
14+
exit $?
15+
fi
16+
if ! source ./setup-python-3.0.sh ; then
17+
exit $?
18+
fi
19+
20+
cd ..
21+
source $PACKAGE/version.py
22+
if [[ ! -n $__version__ ]]; then
23+
echo "You need to set __version__ first"
24+
exit 1
25+
fi
26+
echo $__version__
27+
28+
for pyversion in $PYVERSIONS; do
29+
echo --- $pyversion ---
30+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
31+
echo "$pyversion - PyPy does not get special packaging"
32+
continue
33+
fi
34+
if ! pyenv local $pyversion ; then
35+
exit $?
36+
fi
37+
# pip bdist_egg create too-general wheels. So
38+
# we narrow that by moving the generated wheel.
39+
40+
# Pick out first two numbers of version, e.g. 3.5.1 -> 35
41+
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
42+
rm -fr build
43+
python setup.py bdist_egg bdist_wheel
44+
if [[ $first_two =~ py* ]]; then
45+
if [[ $first_two =~ pypy* ]]; then
46+
# For PyPy, remove the what is after the dash, e.g. pypy37-none-any.whl instead of pypy37-7-none-any.whl
47+
first_two=${first_two%-*}
48+
fi
49+
mv -v dist/${PACKAGE}-$__version__-{py3,$first_two}-none-any.whl
50+
else
51+
mv -v dist/${PACKAGE}-$__version__-{py3,py$first_two}-none-any.whl
52+
fi
53+
echo === $pyversion ===
54+
done
55+
56+
python ./setup.py sdist
57+
58+
tarball=dist/${PACKAGE}-${__version__}.tar.gz
59+
if [[ -f $tarball ]]; then
60+
mv -v $tarball dist/${PACKAGE}_31-${__version__}.tar.gz
61+
fi
62+
finish

admin-tools/make-dist-3.3-3.5.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
PACKAGE=spark_parser
3+
4+
# FIXME put some of the below in a common routine
5+
function finish {
6+
cd $make_spark_dist_33_owd
7+
}
8+
9+
make_spark_dist_33_owd=$(pwd)
10+
cd $(dirname ${BASH_SOURCE[0]})
11+
trap finish EXIT
12+
13+
if ! source ./pyenv-3.3-3.5-versions ; then
14+
exit $?
15+
fi
16+
if ! source ./setup-python-3.3.sh ; then
17+
exit $?
18+
fi
19+
20+
cd ..
21+
source $PACKAGE/version.py
22+
if [[ ! -n $__version__ ]]; then
23+
echo "You need to set __version__ first"
24+
exit 1
25+
fi
26+
echo $__version__
27+
28+
for pyversion in $PYVERSIONS; do
29+
echo --- $pyversion ---
30+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
31+
echo "$pyversion - PyPy does not get special packaging"
32+
continue
33+
fi
34+
if ! pyenv local $pyversion ; then
35+
exit $?
36+
fi
37+
# pip bdist_egg create too-general wheels. So
38+
# we narrow that by moving the generated wheel.
39+
40+
# Pick out first two numbers of version, e.g. 3.5.1 -> 35
41+
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
42+
rm -fr build
43+
python setup.py bdist_egg bdist_wheel
44+
if [[ $first_two =~ py* ]]; then
45+
if [[ $first_two =~ pypy* ]]; then
46+
# For PyPy, remove the what is after the dash, e.g. pypy37-none-any.whl instead of pypy37-7-none-any.whl
47+
first_two=${first_two%-*}
48+
fi
49+
mv -v dist/${PACKAGE}-$__version__-{py3,$first_two}-none-any.whl
50+
else
51+
mv -v dist/${PACKAGE}-$__version__-{py3,py$first_two}-none-any.whl
52+
fi
53+
echo === $pyversion ===
54+
done
55+
56+
python ./setup.py sdist
57+
58+
tarball=dist/${PACKAGE}-${__version__}.tar.gz
59+
if [[ -f $tarball ]]; then
60+
mv -v $tarball dist/${PACKAGE}_33-${__version__}.tar.gz
61+
fi
62+
finish

admin-tools/make-dist-3.6-3.10.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
PACKAGE=spark_parser
3+
4+
# FIXME put some of the below in a common routine
5+
function finish {
6+
cd $make_spark_dist_36_owd
7+
}
8+
9+
cd $(dirname ${BASH_SOURCE[0]})
10+
make_spark_dist_36_owd=$(pwd)
11+
trap finish EXIT
12+
13+
if ! source ./pyenv-3.6-3.10-versions ; then
14+
exit $?
15+
fi
16+
if ! source ./setup-python-3.6.sh ; then
17+
exit $?
18+
fi
19+
20+
cd ..
21+
source $PACKAGE/version.py
22+
if [[ ! -n $__version__ ]]; then
23+
echo "You need to set __version__ first"
24+
exit 1
25+
fi
26+
echo $__version__
27+
28+
for pyversion in $PYVERSIONS; do
29+
echo --- $pyversion ---
30+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
31+
echo "$pyversion - PyPy does not get special packaging"
32+
continue
33+
fi
34+
if ! pyenv local $pyversion ; then
35+
exit $?
36+
fi
37+
# pip bdist_egg create too-general wheels. So
38+
# we narrow that by moving the generated wheel.
39+
40+
# Pick out first two numbers of version, e.g. 3.5.1 -> 35
41+
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
42+
rm -fr build
43+
python setup.py bdist_egg bdist_wheel
44+
if [[ $first_two =~ py* ]]; then
45+
if [[ $first_two =~ pypy* ]]; then
46+
# For PyPy, remove the what is after the dash, e.g. pypy37-none-any.whl instead of pypy37-7-none-any.whl
47+
first_two=${first_two%-*}
48+
fi
49+
mv -v dist/${PACKAGE}-$__version__-{py3,$first_two}-none-any.whl
50+
else
51+
mv -v dist/${PACKAGE}-$__version__-{py3,py$first_two}-none-any.whl
52+
fi
53+
echo === $pyversion ===
54+
done
55+
56+
python ./setup.py sdist
57+
58+
tarball=dist/${PACKAGE}-${__version__}.tar.gz
59+
if [[ -f $tarball ]]; then
60+
mv -v $tarball dist/${PACKAGE}_36-${__version__}.tar.gz
61+
fi
62+
finish

admin-tools/make-dist-newer.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.

admin-tools/make-dist-newest.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
PACKAGE=spark_parser
3+
4+
# FIXME put some of the below in a common routine
5+
function finish {
6+
cd $make_spark_dist_newest_owd
7+
}
8+
9+
cd $(dirname ${BASH_SOURCE[0]})
10+
make_spark_dist_newest_owd=$(pwd)
11+
trap finish EXIT
12+
13+
if ! source ./pyenv-newest-versions ; then
14+
exit $?
15+
fi
16+
if ! source ./setup-master.sh ; then
17+
exit $?
18+
fi
19+
20+
cd ..
21+
source $PACKAGE/version.py
22+
echo $__version__
23+
24+
for pyversion in $PYVERSIONS; do
25+
echo --- $pyversion ---
26+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
27+
echo "$pyversion - PyPy does not get special packaging"
28+
continue
29+
fi
30+
if ! pyenv local $pyversion ; then
31+
exit $?
32+
fi
33+
# pip bdist_egg create too-general wheels. So
34+
# we narrow that by moving the generated wheel.
35+
36+
# Pick out first two numbers of version, e.g. 3.5.1 -> 35
37+
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
38+
rm -fr build
39+
python setup.py bdist_egg bdist_wheel
40+
if [[ $first_two =~ py* ]]; then
41+
if [[ $first_two =~ pypy* ]]; then
42+
# For PyPy, remove the what is after the dash, e.g. pypy37-none-any.whl instead of pypy37-7-none-any.whl
43+
first_two=${first_two%-*}
44+
fi
45+
mv -v dist/${PACKAGE}-$__version__-{py3,$first_two}-none-any.whl
46+
else
47+
mv -v dist/${PACKAGE}-$__version__-{py3,py$first_two}-none-any.whl
48+
fi
49+
echo === $pyversion ===
50+
done
51+
52+
python ./setup.py sdist
53+
finish

admin-tools/pyenv-newer-versions

Lines changed: 0 additions & 6 deletions
This file was deleted.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,8 @@ py-modules = [
6262
"example",
6363
]
6464

65+
[project.scripts]
66+
spark-parser-coverage = "spark_parser.bin.parser_coverage:run"
67+
6568
[tool.setuptools.dynamic]
6669
version = {attr = "spark_parser.version.__version__"}

spark_parser/bin/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)