>From c17782911104845e818226c041d37e03f40d5759 Mon Sep 17 00:00:00 2001 From: Knut Petersen Date: Fri, 8 Feb 2019 00:30:10 +0100 Subject: [PATCH] Use /usr/bin/env and python2, provide wrappers --- bin/build-architecture | 2 +- bin/build-platform | 2 +- bin/cygwin-packager | 2 +- bin/gib | 2 +- bin/gpkg | 2 +- bin/gub | 2 +- bin/gub-tester | 2 +- bin/gupdate | 2 +- gub/distcc.py | 2 +- gub/runner.py | 2 +- gub/specs/lilypond-doc.py | 2 +- gub/specs/lilypond.py | 4 ++-- gub/versiondb.py | 2 +- gub/with-lock.py | 2 +- test-lily/cron-builder.py | 2 +- test-lily/dist-check.py | 2 +- test-lily/rsync-lily-doc.py | 2 +- test-lily/rsync-test.py | 2 +- test-lily/test-binary.py | 2 +- test-lily/upload.py | 2 +- wrappers/python | 2 ++ wrappers/python-config | 2 ++ 22 files changed, 25 insertions(+), 21 deletions(-) create mode 100755 wrappers/python create mode 100755 wrappers/python-config diff --git a/bin/build-architecture b/bin/build-architecture index 7ea764ee..e68a4f6b 100755 --- a/bin/build-architecture +++ b/bin/build-architecture @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 """ Copyright (c) 2005--2008 diff --git a/bin/build-platform b/bin/build-platform index bd7ddc8f..fcd950fe 100755 --- a/bin/build-platform +++ b/bin/build-platform @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 """ Copyright (c) 2005--2008 diff --git a/bin/cygwin-packager b/bin/cygwin-packager index dbfd5c12..9099448a 100755 --- a/bin/cygwin-packager +++ b/bin/cygwin-packager @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 """ diff --git a/bin/gib b/bin/gib index 91d98b64..a7811f49 100755 --- a/bin/gib +++ b/bin/gib @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 """ Copyright (c) 2005--2008 diff --git a/bin/gpkg b/bin/gpkg index bd3aab82..1d9892b2 100755 --- a/bin/gpkg +++ b/bin/gpkg @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 """ gpkg - GUB package manager diff --git a/bin/gub b/bin/gub index 261e7f90..011eee18 100755 --- a/bin/gub +++ b/bin/gub @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 """ Copyright (c) 2005--2008 diff --git a/bin/gub-tester b/bin/gub-tester index 603fae12..2d0f070e 100755 --- a/bin/gub-tester +++ b/bin/gub-tester @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 def argv0_relocation (): import os, sys diff --git a/bin/gupdate b/bin/gupdate index 08e6170d..1bb9a466 100755 --- a/bin/gupdate +++ b/bin/gupdate @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 """ Copyright (c) 2005--2009 diff --git a/gub/distcc.py b/gub/distcc.py index d39451f7..a8b05942 100644 --- a/gub/distcc.py +++ b/gub/distcc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os import re diff --git a/gub/runner.py b/gub/runner.py index 9399f352..7d426eec 100644 --- a/gub/runner.py +++ b/gub/runner.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 """ Copyright (c) 2005--2007 diff --git a/gub/specs/lilypond-doc.py b/gub/specs/lilypond-doc.py index 4123130c..1e98af0a 100644 --- a/gub/specs/lilypond-doc.py +++ b/gub/specs/lilypond-doc.py @@ -47,7 +47,7 @@ class LilyPond_doc (lilypond.LilyPond_base): CROSS=no DOCUMENTATION=yes WEB_TARGETS="offline online" -TARGET_PYTHON=/usr/bin/python +TARGET_PYTHON="/usr/bin/env python2" CPU_COUNT=%(cpu_count)s MISSING_OPTIONAL=dblatex ''') diff --git a/gub/specs/lilypond.py b/gub/specs/lilypond.py index 72117d70..e4778ed4 100644 --- a/gub/specs/lilypond.py +++ b/gub/specs/lilypond.py @@ -69,7 +69,7 @@ sheet music from a high-level description file.''' + ' --with-texgyre-dir=%(tools_prefix)s/share/fonts/opentype/texgyre' + ' --with-urwotf-dir=%(tools_prefix)s/share/fonts/opentype/urw-core35' ) - make_flags = ' TARGET_PYTHON=/usr/bin/python' + make_flags = ' TARGET_PYTHON="/usr/bin/env python2"' if 'stat' in misc.librestrict (): home = os.environ['HOME'] @@ -245,7 +245,7 @@ class LilyPond__darwin (LilyPond): ]) configure_flags = (LilyPond.configure_flags .replace ('--enable-rpath', '--disable-rpath')) - make_flags = ' TARGET_PYTHON="/usr/bin/env python"' + make_flags = ' TARGET_PYTHON="/usr/bin/env python2"' class LilyPond__darwin__ppc (LilyPond__darwin): def configure (self): diff --git a/gub/versiondb.py b/gub/versiondb.py index 4c3acf41..084cf468 100644 --- a/gub/versiondb.py +++ b/gub/versiondb.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ Copyright (c) 2005--2007 diff --git a/gub/with-lock.py b/gub/with-lock.py index 5e0646ce..2df95431 100644 --- a/gub/with-lock.py +++ b/gub/with-lock.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 """ diff --git a/test-lily/cron-builder.py b/test-lily/cron-builder.py index ca37914c..332a4be9 100755 --- a/test-lily/cron-builder.py +++ b/test-lily/cron-builder.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # FIXME: replace `lilypond' with $package to make generic tester diff --git a/test-lily/dist-check.py b/test-lily/dist-check.py index 982e3d14..d6345241 100644 --- a/test-lily/dist-check.py +++ b/test-lily/dist-check.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 def argv0_relocation (): import os, sys diff --git a/test-lily/rsync-lily-doc.py b/test-lily/rsync-lily-doc.py index 68058e98..62200bea 100644 --- a/test-lily/rsync-lily-doc.py +++ b/test-lily/rsync-lily-doc.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 def argv0_relocation (): import os, sys diff --git a/test-lily/rsync-test.py b/test-lily/rsync-test.py index 25dc0a0e..3f780e9e 100644 --- a/test-lily/rsync-test.py +++ b/test-lily/rsync-test.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 import os import re diff --git a/test-lily/test-binary.py b/test-lily/test-binary.py index 7bd1b456..b4da2919 100755 --- a/test-lily/test-binary.py +++ b/test-lily/test-binary.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 import sys import os diff --git a/test-lily/upload.py b/test-lily/upload.py index f8b8437c..e0cdc418 100644 --- a/test-lily/upload.py +++ b/test-lily/upload.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 maintainer = "graham" maintainer_git_username = "philholmes" diff --git a/wrappers/python b/wrappers/python new file mode 100755 index 00000000..7ca14634 --- /dev/null +++ b/wrappers/python @@ -0,0 +1,2 @@ +#!/bin/sh +python2 "$@" diff --git a/wrappers/python-config b/wrappers/python-config new file mode 100755 index 00000000..4d9dc6de --- /dev/null +++ b/wrappers/python-config @@ -0,0 +1,2 @@ +#!/bin/sh +python2-config "$@" -- 2.20.1