diff --git a/.gitignore b/.gitignore index 72af1994..a7e67336 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ setup.iss /novelwriter.desktop /novelWriter.pyw /setup/macos/Info.plist +.venv # Translations /novelwriter/assets/i18n/*.qm diff --git a/setup/make_pip.sh b/setup/make_pip.sh index 3c1fdc54..7d3817e0 100755 --- a/setup/make_pip.sh +++ b/setup/make_pip.sh @@ -1,16 +1,30 @@ #!/bin/bash set -e +ENVPATH=/tmp/nwBuild + if [ ! -f pkgutils.py ]; then echo "Must be called from the root folder of the source" exit 1 fi +echo "" +echo " Building Dependencies" +echo "================================================================================" +echo "" + +if [ ! -d $ENVPATH ]; then + python3 -m venv $ENVPATH +fi +source $ENVPATH/bin/activate +pip3 install -r docs/source/requirements.txt +python3 pkgutils.py qtlrelease manual sample +deactivate + echo "" echo " Building Packages" echo "================================================================================" echo "" -python3 pkgutils.py qtlrelease manual sample python3 -m build mkdir -pv dist_upload cp -v dist/novelWriter-*.whl dist_upload/ diff --git a/setup/make_release.sh b/setup/make_release.sh index bdbb2426..4ee78940 100755 --- a/setup/make_release.sh +++ b/setup/make_release.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +ENVPATH=/tmp/nwBuild + if [ ! -f pkgutils.py ]; then echo "Must be called from the root folder of the source" exit 1 @@ -10,8 +12,14 @@ echo "" echo " Building Dependencies" echo "================================================================================" echo "" +if [ ! -d $ENVPATH ]; then + python3 -m venv $ENVPATH +fi +source $ENVPATH/bin/activate +pip3 install -r docs/source/requirements.txt python3 pkgutils.py clean-assets python3 pkgutils.py qtlrelease manual sample +deactivate echo "" echo " Building Minimal Packages" diff --git a/setup/make_snapshot.sh b/setup/make_snapshot.sh index 8ad797be..5b92350c 100755 --- a/setup/make_snapshot.sh +++ b/setup/make_snapshot.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +ENVPATH=/tmp/nwBuild + if [ ! -f pkgutils.py ]; then echo "Must be called from the root folder of the source" exit 1 @@ -10,8 +12,14 @@ echo "" echo " Building Dependencies" echo "================================================================================" echo "" +if [ ! -d $ENVPATH ]; then + python3 -m venv $ENVPATH +fi +source $ENVPATH/bin/activate +pip3 install -r docs/source/requirements.txt python3 pkgutils.py clean-assets python3 pkgutils.py qtlrelease manual sample +deactivate echo "" echo " Building Linux Snapshots"