Skip to content

Commit 915577c

Browse files
committed
Compile .py and do not copy originals
1 parent cc184c8 commit 915577c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

linux/package-for-linux.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ curl -OL https://github.com/indygreg/python-build-standalone/releases/download/$
66
mkdir -p $PYTHON_ARCH/build
77
tar zxvf $DIST_FILE -C $PYTHON_ARCH/build
88

9+
# compile lib
10+
python -m compileall -b $PYTHON_ARCH/build/python/lib/python3.12
11+
912
# copy build to dist
1013
mkdir -p $PYTHON_ARCH/dist
1114
rsync -av --exclude-from=python-linux-dart.exclude $PYTHON_ARCH/build/python/* $PYTHON_ARCH/dist
1215

13-
# compile lib
14-
python -m compileall -b $PYTHON_ARCH/dist/lib/python3.12
15-
1616
# archive
1717
tar -czf python-linux-dart-$PYTHON_VERSION_SHORT-$PYTHON_ARCH.tar.gz -C $PYTHON_ARCH/dist .

linux/python-linux-dart.exclude

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Files to exclude for Linux distro
22
#
3+
*.py
34
lib/python*/lib-dynload/_test*.so
45
lib/python*/lib-dynload/_ctypes_test*.so
56
lib/python*/lib-dynload/xxlimited*.so

0 commit comments

Comments
 (0)