diff --git a/build-helpers/loopy.spec b/build-helpers/loopy.spec index 7650624932eb4b6aa95e888410e8a0aa1a6d518a..3fcff944671291c652621afaa9cd82080605d73c 100644 --- a/build-helpers/loopy.spec +++ b/build-helpers/loopy.spec @@ -1,7 +1,13 @@ # -*- mode: python -*- +from os.path import basename, dirname, join +from glob import glob + single_file = True +# This makes the executable spew debug info. +debug = False + from os.path import expanduser a = Analysis(['bin/loopy'], @@ -11,6 +17,19 @@ a = Analysis(['bin/loopy'], runtime_hooks=None, excludes=["hedge", "meshpy", "pyopencl", "PIL"] ) + +import ply.lex +import ply.yacc + + +a.datas += [ + (join("py-src", "ply", "lex", basename(fn)), fn, "DATA") + for fn in glob(join(dirname(ply.lex.__file__), "*.py")) + ] + [ + (join("py-src", "ply", "yacc", basename(fn)), fn, "DATA") + for fn in glob(join(dirname(ply.yacc.__file__), "*.py")) + ] + pyz = PYZ(a.pure) if single_file: @@ -20,7 +39,7 @@ if single_file: a.zipfiles, a.datas, name='loopy', - debug=False, + debug=debug, strip=None, upx=True, console=True) @@ -29,7 +48,7 @@ else: a.scripts, exclude_binaries=True, name='loopy', - debug=False, + debug=debug, strip=None, upx=True, console=True) diff --git a/build-helpers/make-linux-build-docker.sh b/build-helpers/make-linux-build-docker.sh index 2deb2935e429a7d4281d3c09e884fb5df92125fc..90684a267e98f1976a31fd3036b824d2c2cdc1d8 100755 --- a/build-helpers/make-linux-build-docker.sh +++ b/build-helpers/make-linux-build-docker.sh @@ -1,5 +1,7 @@ #! /bin/bash +# should be run in this directory (build-helpers) + set -e set -x