Skip to content

Commit 9d1016b

Browse files
committed
Shrink python package files
1 parent ec7f938 commit 9d1016b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/package.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ jobs:
5959
UV_PYTHON= uvx change_wheel_version mxnet-1.9.1-cp38-cp38-${{ matrix.python-platform }}.whl --version 1.6.99
6060
uv pip install --prefix "$PYTHON_PREFIX" --no-deps mxnet-1.6.99-cp38-cp38-${{ matrix.python-platform }}.whl
6161
uv pip install --prefix "$PYTHON_PREFIX" -r requirements.in
62+
- name: Shrink python site-packages
63+
shell: bash
64+
run: |
65+
SP=$(find $PYTHON_PREFIX -name site-packages -type d)
66+
rm -rf $SP/Crypto/SelfTest
67+
find $SP/ -name tests -type d | xargs rm -rf
68+
find $SP/ -name '*.pyi' -type f -delete
6269
- name: Get git
6370
uses: knicknic/os-specific-run@v1.0.3
6471
with:
@@ -181,6 +188,7 @@ jobs:
181188
cp -a ../git/dist/libexec/git-core/{git,git-remote-http,git-remote-https} toolkit/libexec/git-core/
182189
ln toolkit/libexec/git-core/git toolkit/bin/
183190
cp -r $PYTHON_PREFIX/* toolkit/
191+
find toolkit/ -type f -name '*.so*' -or -type f -executable -exec strip --strip-unneeded {} \;
184192
mkdir -p config
185193
cp ../deploy.unix.yaml config/deploy.yaml
186194
cp ../target/release/alas-launcher alas-launcher

0 commit comments

Comments
 (0)