File: python.in

package info (click to toggle)
e-antic 2.0.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,256 kB
  • sloc: cpp: 17,613; ansic: 5,999; python: 974; makefile: 457; sh: 35; javascript: 5
file content (22 lines) | stat: -rw-r--r-- 1,092 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# Run Python 3 with environment variables set so that local headers and
# libraries in this repository are used when running tests.

# Usually, one would do this setup as part of test-env.sh, i.e.,
# AM_TESTS_ENVIRONMENT. However, macOS drops DYLD_LIBRARY_PATH whenever a
# shebang is followed, so we actually need to execute the Python binary
# directly and pass a script to it as a parameter to keep DYLD_LIBRARY_PATH
# alive.

# Resolve #include <e-antic/*.h> relative to libeantic in the source tree and
# resolve #include "local.h" relative to e-antic/e-antic in the build tree.
export EXTRA_CLING_ARGS="-I@abs_srcdir@/../.. -I@abs_builddir@/../../e-antic -std=c++17 -Wno-unused-comparison $EXTRA_CLING_ARGS"

# Load libeantic.so and libeanticxx.so from our build tree.
export LD_LIBRARY_PATH="@abs_builddir@/../../src/.libs/:@abs_builddir@/../../srcxx/.libs/:$LD_LIBRARY_PATH"

# Load libeantic.dylib and libeanticxx.dylib from our build tree.
export DYLD_LIBRARY_PATH="@abs_builddir@/../../src/.libs/:@abs_builddir@/../../srcxx/.libs/:$DYLD_LIBRARY_PATH"

exec python3 "$@"