summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/0008-avoid-usr-bin-env.patch32
-rw-r--r--debian/patches/0009-python-scripts-libraries.patch20
-rw-r--r--debian/patches/series2
3 files changed, 54 insertions, 0 deletions
diff --git a/debian/patches/0008-avoid-usr-bin-env.patch b/debian/patches/0008-avoid-usr-bin-env.patch
new file mode 100644
index 00000000..132ed7aa
--- /dev/null
+++ b/debian/patches/0008-avoid-usr-bin-env.patch
@@ -0,0 +1,32 @@
+From: Benjamin Barenblat <bbaren@debian.org>
+Subject: Avoid invoking /usr/bin/env
+Forwarded: not-needed
+
+Per Debian Python policy [1], use `/usr/bin/python3` rather than
+`/usr/bin/env python` to refer to the system Python (3) interpreter.
+
+[1] https://www.debian.org/doc/packaging-manuals/python-policy/python.html#interpreter_loc
+--- a/tools/make-both-single-timing-files.py
++++ b/tools/make-both-single-timing-files.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ import sys
+ from TimeFileMaker import *
+
+--- a/tools/make-both-time-files.py
++++ b/tools/make-both-time-files.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ import sys
+ from TimeFileMaker import *
+
+--- a/tools/make-one-time-file.py
++++ b/tools/make-one-time-file.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ import sys
+ from TimeFileMaker import *
+
diff --git a/debian/patches/0009-python-scripts-libraries.patch b/debian/patches/0009-python-scripts-libraries.patch
new file mode 100644
index 00000000..66a4a9e9
--- /dev/null
+++ b/debian/patches/0009-python-scripts-libraries.patch
@@ -0,0 +1,20 @@
+From: Benjamin Barenblat <bbaren@debian.org>
+Subject: Differentiate between Python scripts and libraries
+Forwarded: not-needed
+
+Eliminate the .py extension from executable Python scripts.
+--- a/tools/CoqMakefile.in
++++ b/tools/CoqMakefile.in
+@@ -91,9 +91,9 @@
+ COQMKFILE ?= "$(COQBIN)coq_makefile"
+
+ # Timing scripts
+-COQMAKE_ONE_TIME_FILE ?= "$(COQLIB)/tools/make-one-time-file.py"
+-COQMAKE_BOTH_TIME_FILES ?= "$(COQLIB)/tools/make-both-time-files.py"
+-COQMAKE_BOTH_SINGLE_TIMING_FILES ?= "$(COQLIB)/tools/make-both-single-timing-files.py"
++COQMAKE_ONE_TIME_FILE ?= "$(COQLIB)/tools/make-one-time-file"
++COQMAKE_BOTH_TIME_FILES ?= "$(COQLIB)/tools/make-both-time-files"
++COQMAKE_BOTH_SINGLE_TIMING_FILES ?= "$(COQLIB)/tools/make-both-single-timing-files"
+ BEFORE ?=
+ AFTER ?=
+
diff --git a/debian/patches/series b/debian/patches/series
index b098f303..16ae3a4d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,5 @@
0005-remove-ssrmatching.patch
0006-remove-tests-that-need-coqlib.patch
0007-spelling.patch
+0008-avoid-usr-bin-env.patch
+0009-python-scripts-libraries.patch