From 446b2f15b0b06a288021633294e8188ca8684474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6fferlein?= Date: Sun, 1 Dec 2019 23:55:53 +0100 Subject: [PATCH] #434 fixed, properly including Ruby gems and providing NumPy+SciPy with Python installation (this not in git but happens through the build process) --- scripts/deploy-win-mingw.sh | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/scripts/deploy-win-mingw.sh b/scripts/deploy-win-mingw.sh index ffcc6081b..919be881e 100644 --- a/scripts/deploy-win-mingw.sh +++ b/scripts/deploy-win-mingw.sh @@ -147,6 +147,8 @@ done # ---------------------------------------------------------- # Ruby dependencies +rubys=$($ruby -e 'puts $:' | sort) + rm -rf $target/.ruby-paths.txt echo '# Builds the Ruby paths.' >$target/.ruby-paths.txt echo '# KLayout will load the paths listed in this file into $0' >>$target/.ruby-paths.txt @@ -154,16 +156,17 @@ echo '# Use KLayout EXPRESSIONS syntax to specify a list of file paths.' >>$targ echo '[' >>$target/.ruby-paths.txt first=1 -rubys=$($ruby -e 'puts $:' | sort) for p in $rubys; do p=$(cygpath $p) if [[ $p == "$mingw_inst"* ]] && [ -e "$p" ]; then rp=${p/"$mingw_inst/"} - if [ $first == "0" ]; then - echo "," >>$target/.ruby-paths.txt - fi - first=0 - echo -n " combine(inst_path, '$rp')" >>$target/.ruby-paths.txt + # Apparently adding the paths to the interpreter isn't required - + # Ruby can figure out it's own paths + # if [ $first == "0" ]; then + # echo "," >>$target/.ruby-paths.txt + # fi + # first=0 + # echo -n " combine(inst_path, '$rp')" >>$target/.ruby-paths.txt echo "Copying Ruby installation partial $p -> $target/$rp .." rm -rf $target/$rp mkdir -p $target/$rp @@ -176,9 +179,24 @@ done echo '' >>$target/.ruby-paths.txt echo ']' >>$target/.ruby-paths.txt +# don't forget the gem directory (specifications and gems) +p=$(ruby -e 'puts Gem::dir') +p=$(cygpath $p) +if [[ $p == "$mingw_inst"* ]] && [ -e "$p" ]; then + rp=${p/"$mingw_inst/"} + echo "Copying Ruby gems $p -> $target/$rp .." + rm -rf $target/$rp + mkdir -p $target/$rp + rmdir $target/$rp + cp -vR $p $target/$rp | sed -u 's/.*/echo -n ./' | sh + echo "" +fi + # ---------------------------------------------------------- # Python dependencies +pythons=$($python -c "import sys; print('\n'.join(sys.path))" | sort) + rm -rf $target/.python-paths.txt echo '# Builds the Python paths.' >$target/.python-paths.txt echo '# KLayout will load the paths listed in this file into sys.path' >>$target/.python-paths.txt @@ -187,7 +205,6 @@ echo '# Use KLayout EXPRESSIONS syntax to specify a list of file paths.' >>$targ echo '[' >>$target/.python-paths.txt first=1 -pythons=$($python -c "import sys; print('\n'.join(sys.path))" | sort) for p in $pythons; do p=$(cygpath $p) rp=""