summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/cruft/cruft-python/build-spec/pre-build
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/cruft/cruft-python/build-spec/pre-build')
-rwxr-xr-xt/recipes/checks/cruft/cruft-python/build-spec/pre-build31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/recipes/checks/cruft/cruft-python/build-spec/pre-build b/t/recipes/checks/cruft/cruft-python/build-spec/pre-build
new file mode 100755
index 0000000..a5ee0a0
--- /dev/null
+++ b/t/recipes/checks/cruft/cruft-python/build-spec/pre-build
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Create all the various junk that shouldn't exist in the diff so that we can
+# trigger all the tags.
+
+set -e
+dir="$1"
+fake="$dir/debian/missing-sources/fake.py"
+
+cp "$fake" "$dir"
+echo 'import fake' > "${dir}/main.py"
+unset PYTHONDONTWRITEBYTECODE
+PYTHONPATH="${dir}" python "${dir}/main.py" > /dev/null
+PYTHONPATH="${dir}" python -O "${dir}/main.py" > /dev/null
+# now remove source
+rm -f "${dir}"/main.py
+rm -f "${dir}"/fake.py
+
+cp "$fake" "$dir/fake2.py"
+echo 'import fake2' > "${dir}/main.py"
+unset PYTHONDONTWRITEBYTECODE
+PYTHONPATH="${dir}" python "${dir}/main.py" > /dev/null
+PYTHONPATH="${dir}" python -O "${dir}/main.py" > /dev/null
+# now remove source
+rm -f "${dir}"/main.py
+rm -f "${dir}"/fake2.py
+
+
+
+
+