mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Append version to PyInstaller packages
This commit is contained in:
parent
3341c894c5
commit
9f4664c2b8
@ -31,7 +31,7 @@ exe = EXE(pyz,
|
||||
upx=True,
|
||||
console=False )
|
||||
|
||||
import shutil
|
||||
import sys, shutil
|
||||
|
||||
# remove util dir if it exists
|
||||
util_dir = 'util'
|
||||
@ -54,13 +54,11 @@ if platform.system() == "Linux":
|
||||
else:
|
||||
data_tree += Tree('C:/Python27/Lib/site-packages/gtk-2.0/runtime/share/gtksourceview-2.0', prefix='share/gtksourceview-2.0')
|
||||
|
||||
|
||||
|
||||
coll = COLLECT(exe,
|
||||
data_tree,
|
||||
strip=None,
|
||||
upx=True,
|
||||
name='openmv')
|
||||
name=sys.argv[2])
|
||||
# cleanup
|
||||
if os.path.exists(util_dir):
|
||||
shutil.rmtree(util_dir)
|
||||
|
||||
@ -3,11 +3,17 @@
|
||||
# Execute in openmv/user ./mkpkg.sh
|
||||
DIST_DIR=dist
|
||||
BUILD_DIR=build
|
||||
OPENMV_DIR=openmv
|
||||
PACKAGE=$(python -c "import sys,platform; print('openmv_'+sys.platform+'_'+platform.machine()+'.zip'.lower())")
|
||||
OPENMV_DIR=openmv_$1
|
||||
PACKAGE=$(python -c "import sys,platform; print('openmv_'+sys.platform+'_'+platform.machine()+'_$1.zip'.lower())")
|
||||
SPEC_FILE=openmv-ide.spec
|
||||
|
||||
# Check args
|
||||
if [ "$#" = "0" ]; then
|
||||
echo "usage mkpkg <version>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -fr $DIST_DIR $BUILD_DIR $PACKAGE
|
||||
pyinstaller $SPEC_FILE
|
||||
pyinstaller $SPEC_FILE $OPENMV_DIR
|
||||
(cd $DIST_DIR && zip ../$PACKAGE -r $OPENMV_DIR)
|
||||
rm -fr $DIST_DIR $BUILD_DIR
|
||||
|
||||
Loading…
Reference in New Issue
Block a user