forked from MetPX/sarracenia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-win-installer.sh
executable file
·41 lines (32 loc) · 1.3 KB
/
generate-win-installer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Windows specific pkgs
rm -rf pynsist_pkgs
mkdir pynsist_pkgs
cd pynsist_pkgs/
# Ensure to download only windows binaries
pip3 download pynacl --only-binary=:all: --platform win_amd64
pip3 download amqp --only-binary=:all: --platform win_amd64
pip3 download appdirs --only-binary=:all: --platform win_amd64
#pip3 download netifaces-w38 --only-binary=:all: --platform win_amd64
pip3 download netifaces --only-binary=:all: --platform win_amd64
pip3 download psutil --only-binary=:all: --platform win_amd64
pip3 download paramiko --only-binary=:all: --platform win_amd64
# No binary available, thats why they are not fetched by pip (to be tested later)
#pip3 download humanize --only-binary=:all: --platform win_amd64
#pip3 download pycparser --only-binary=:all: --platform win_amd64
#pip3 download pathtools --only-binary=:all: --platform win_amd64
#pip3 download watchdog --only-binary=:all: --platform win_amd64
cd ..
# Remove last build
rm -rf dist
rm -rf build
python3 setup.py bdist_wheel
if [ "$1" ]; then
PYVERSION=$1
else
PYVERSION="`python3 -V| awk '{ print $2; }'`"
fi
VERSION=`grep __version__ sarra/__init__.py | cut -c15- | sed -e 's/"//g'`
sed 's/__version__/'$VERSION'/; s/__pyversion__/'$PYVERSION'/;' <win_installer.cfg.tem >win_installer.cfg
# NSIS packaging
pynsist win_installer.cfg