Skip to content

Commit f93ac86

Browse files
authored
Get rid of pushd and popd (#69)
1 parent 1b7cdbd commit f93ac86

3 files changed

Lines changed: 44 additions & 44 deletions

File tree

.appveyor.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -134,29 +134,29 @@ for:
134134
- BUNDLE_NAME=libpythonbundle.so
135135

136136
# arm64-v8a
137-
- pushd ~/.local/share/python-for-android/dists/serious_python/_python_bundle__arm64-v8a/_python_bundle
137+
- cd ~/.local/share/python-for-android/dists/serious_python/_python_bundle__arm64-v8a/_python_bundle
138138
- zip -r $BUNDLE_NAME .
139139
- mv $BUNDLE_NAME ../../libs/arm64-v8a
140-
- popd
140+
- cd -
141141

142142
# armeabi-v7a
143-
- pushd ~/.local/share/python-for-android/dists/serious_python/_python_bundle__armeabi-v7a/_python_bundle
143+
- cd ~/.local/share/python-for-android/dists/serious_python/_python_bundle__armeabi-v7a/_python_bundle
144144
- zip -r $BUNDLE_NAME .
145145
- mv $BUNDLE_NAME ../../libs/armeabi-v7a
146-
- popd
146+
- cd -
147147

148148
# armeabi-v7a
149-
- pushd ~/.local/share/python-for-android/dists/serious_python/_python_bundle__x86_64/_python_bundle
149+
- cd ~/.local/share/python-for-android/dists/serious_python/_python_bundle__x86_64/_python_bundle
150150
- zip -r $BUNDLE_NAME .
151151
- mv $BUNDLE_NAME ../../libs/x86_64
152-
- popd
152+
- cd -
153153

154154
# package all .so files
155155
- DIST_FILE_NAME=python-android-dist-v$APPVEYOR_BUILD_VERSION.tar.gz
156-
- pushd ~/.local/share/python-for-android/dists/serious_python/libs
156+
- cd ~/.local/share/python-for-android/dists/serious_python/libs
157157
- tar -czvf $DIST_FILE_NAME *
158158
- appveyor PushArtifact $DIST_FILE_NAME -DeploymentName python-dist-android
159-
- popd
159+
- cd -
160160

161161
deploy:
162162
provider: GitHub
@@ -382,55 +382,55 @@ for:
382382
python3 ci/patch_pubspec.py src/serious_python_windows/pubspec.yaml $PKG_VER
383383
python3 ci/patch_pubspec.py src/serious_python_linux/pubspec.yaml $PKG_VER
384384
385-
pushd src/serious_python_platform_interface
385+
cd src/serious_python_platform_interface
386386
dart pub publish --force || exit 1
387-
popd
387+
cd -
388388
389-
pushd src/serious_python_android
389+
cd src/serious_python_android
390390
dart pub publish --force || exit 1
391-
popd
391+
cd -
392392
393-
pushd src/serious_python_darwin
393+
cd src/serious_python_darwin
394394
dart pub publish --force || exit 1
395-
popd
395+
cd -
396396
397-
pushd src/serious_python_windows
397+
cd src/serious_python_windows
398398
dart pub publish --force || exit 1
399-
popd
399+
cd -
400400
401-
pushd src/serious_python_linux
401+
cd src/serious_python_linux
402402
dart pub publish --force || exit 1
403-
popd
403+
cd -
404404
405-
pushd src/serious_python
405+
cd src/serious_python
406406
dart pub publish --force || exit 1
407-
popd
407+
cd -
408408
409409
elif [[ "$APPVEYOR_PULL_REQUEST_NUMBER" == "" ]]; then
410410
411-
pushd src/serious_python_platform_interface
411+
cd src/serious_python_platform_interface
412412
dart pub publish --dry-run
413-
popd
413+
cd -
414414
415-
pushd src/serious_python_android
415+
cd src/serious_python_android
416416
dart pub publish --dry-run
417-
popd
417+
cd -
418418
419-
pushd src/serious_python_darwin
419+
cd src/serious_python_darwin
420420
dart pub publish --dry-run
421-
popd
421+
cd -
422422
423-
pushd src/serious_python_windows
423+
cd src/serious_python_windows
424424
dart pub publish --dry-run
425-
popd
425+
cd -
426426
427-
pushd src/serious_python_linux
427+
cd src/serious_python_linux
428428
dart pub publish --dry-run
429-
popd
429+
cd -
430430
431-
pushd src/serious_python
431+
cd src/serious_python
432432
dart pub publish --dry-run
433-
popd
433+
cd -
434434
fi
435435
436436
test: off

src/serious_python_android/android/bundle.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ rm -rf $JNI_LIBS_DIR
1414
mkdir -p $JNI_LIBS_DIR
1515

1616
echo "Bundling arm64-v8a"
17-
pushd $SERIOUS_PYTHON_P4A_DIST/_python_bundle__arm64-v8a/_python_bundle
17+
cd $SERIOUS_PYTHON_P4A_DIST/_python_bundle__arm64-v8a/_python_bundle
1818
zip -r $BUNDLE_NAME . > /dev/null
1919
mv $BUNDLE_NAME ../../libs/arm64-v8a
20-
popd
20+
cd -
2121

2222
echo "Bundling armeabi-v7a"
23-
pushd $SERIOUS_PYTHON_P4A_DIST/_python_bundle__armeabi-v7a/_python_bundle
23+
cd $SERIOUS_PYTHON_P4A_DIST/_python_bundle__armeabi-v7a/_python_bundle
2424
zip -r $BUNDLE_NAME . > /dev/null
2525
mv $BUNDLE_NAME ../../libs/armeabi-v7a
26-
popd
26+
cd -
2727

2828
echo "Bundling armeabi-v7a"
29-
pushd $SERIOUS_PYTHON_P4A_DIST/_python_bundle__x86_64/_python_bundle
29+
cd $SERIOUS_PYTHON_P4A_DIST/_python_bundle__x86_64/_python_bundle
3030
zip -r $BUNDLE_NAME . > /dev/null
3131
mv $BUNDLE_NAME ../../libs/x86_64
32-
popd
32+
cd -
3333

3434
echo "Copying all .so files to `realpath $JNI_LIBS_DIR`"
3535
cp -R $SERIOUS_PYTHON_P4A_DIST/libs/* $JNI_LIBS_DIR

src/serious_python_darwin/darwin/serious_python_darwin.podspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,33 @@ Pod::Spec.new do |s|
6262
cp #{python_framework}/ios-arm64/Headers/module.modulemap #{python_macos_framework}/macos-arm64_x86_64/Headers
6363
6464
# compile dist_macos/python-stdlib
65-
pushd dist_macos/python-stdlib
65+
cd dist_macos/python-stdlib
6666
$ROOT/dist/hostpython3/bin/python -m compileall -b .
6767
find . \\( -name '*.py' -or -name '*.typed' \\) -type f -delete
6868
rm -rf __pycache__
6969
rm -rf **/__pycache__
70-
popd
70+
cd -
7171
7272
# compile python311.zip
7373
PYTHON311_ZIP=$ROOT/dist/root/python3/lib/python311.zip
7474
unzip $PYTHON311_ZIP -d python311_temp
7575
rm $PYTHON311_ZIP
76-
pushd python311_temp
76+
cd python311_temp
7777
$ROOT/dist/hostpython3/bin/python -m compileall -b .
7878
find . \\( -name '*.so' -or -name '*.py' -or -name '*.typed' \\) -type f -delete
7979
zip -r $PYTHON311_ZIP .
80-
popd
80+
cd -
8181
rm -rf python311_temp
8282
8383
# fix import subprocess, asyncio
8484
cp -R pod_templates/site-packages/* dist/root/python3/lib/python3.11/site-packages
8585
8686
# zip site-packages
87-
pushd dist/root/python3/lib/python3.11/site-packages
87+
cd dist/root/python3/lib/python3.11/site-packages
8888
$ROOT/dist/hostpython3/bin/python -m compileall -b .
8989
find . \\( -name '*.so' -or -name '*.py' -or -name '*.typed' \\) -type f -delete
9090
zip -r $ROOT/dist/root/python3/lib/site-packages.zip .
91-
popd
91+
cd -
9292
9393
# remove junk
9494
rm -rf dist/root/python3/lib/python3.11

0 commit comments

Comments
 (0)