From f519b3e90484c7e712ddd39175a7110f97950d82 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Tue, 2 Jul 2019 17:06:56 +0200 Subject: [python] Remove use of generic python shebang, update CI Fixes #10465 Following discussion we don't allow a generic `/usr/bin/python` shebang anymore. We thus move all the scripts [but one] to python3, and add python3 to the Azure base environment. Unfortunately we still depend on python2 for the update-compat.py script, see #10491 We thus have to complement #10467 adding python2 back to Nix, until #10491 is fixed. --- azure-pipelines.yml | 2 +- default.nix | 1 + dev/tools/update-compat.py | 2 +- tools/make-both-single-timing-files.py | 2 +- tools/make-both-time-files.py | 2 +- tools/make-one-time-file.py | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c93920a884..54d6b4b7c8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,7 +19,7 @@ jobs: powershell -Command "(New-Object Net.WebClient).DownloadFile('http://www.cygwin.com/setup-x86_64.exe', 'setup-x86_64.exe')" SET CYGROOT=C:\cygwin64 SET CYGCACHE=%CYGROOT%\var\cache\setup - setup-x86_64.exe -qnNdO -R %CYGROOT% -l %CYGCACHE% -s %CYGMIRROR% -P rsync -P patch -P diffutils -P make -P unzip -P m4 -P findutils -P time -P wget -P curl -P git -P mingw64-x86_64-binutils,mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++,mingw64-x86_64-pkg-config,mingw64-x86_64-windows_default_manifest -P mingw64-x86_64-headers,mingw64-x86_64-runtime,mingw64-x86_64-pthreads,mingw64-x86_64-zlib -P python + setup-x86_64.exe -qnNdO -R %CYGROOT% -l %CYGCACHE% -s %CYGMIRROR% -P rsync -P patch -P diffutils -P make -P unzip -P m4 -P findutils -P time -P wget -P curl -P git -P mingw64-x86_64-binutils,mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++,mingw64-x86_64-pkg-config,mingw64-x86_64-windows_default_manifest -P mingw64-x86_64-headers,mingw64-x86_64-runtime,mingw64-x86_64-pthreads,mingw64-x86_64-zlib -P python2 -P python3 SET TARGET_ARCH=x86_64-w64-mingw32 SET CD_MFMT=%cd:\=/% diff --git a/default.nix b/default.nix index 10c5f6be47..2d101eed57 100644 --- a/default.nix +++ b/default.nix @@ -41,6 +41,7 @@ stdenv.mkDerivation rec { buildInputs = [ hostname + python2 # update-compat.py python3 time # coq-makefile timing tools dune ] diff --git a/dev/tools/update-compat.py b/dev/tools/update-compat.py index 0338cd42c7..c7bb36b6d3 100755 --- a/dev/tools/update-compat.py +++ b/dev/tools/update-compat.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 from __future__ import with_statement import os, re, sys, subprocess diff --git a/tools/make-both-single-timing-files.py b/tools/make-both-single-timing-files.py index 32c52c7a17..fddf75f39f 100755 --- 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/env python3 import sys from TimeFileMaker import * diff --git a/tools/make-both-time-files.py b/tools/make-both-time-files.py index f730a8d6bd..8937d63c2f 100755 --- a/tools/make-both-time-files.py +++ b/tools/make-both-time-files.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys from TimeFileMaker import * diff --git a/tools/make-one-time-file.py b/tools/make-one-time-file.py index e66136df9d..ad0a04ab07 100755 --- a/tools/make-one-time-file.py +++ b/tools/make-one-time-file.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys from TimeFileMaker import * -- cgit v1.2.3