From 4360f75994050e7fa8e50f4b70616f51a3955674 Mon Sep 17 00:00:00 2001 From: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com> Date: Jun 05 2018 15:06:33 +0000 Subject: always use python3 --- diff --git a/singularity-Python3.patch b/singularity-Python3.patch new file mode 100644 index 0000000..15e04e5 --- /dev/null +++ b/singularity-Python3.patch @@ -0,0 +1,140 @@ +--- configure.ac.O 2018-04-17 16:47:42.375962089 -0500 ++++ configure.ac 2018-04-17 16:48:51.506625728 -0500 +@@ -257,20 +257,20 @@ + # PYTHON + # --------------------------------------------------------------------- + +-AC_CHECK_PROG(PYTHON_CHECK,python,yes) ++AC_CHECK_PROG(PYTHON_CHECK,python3,yes) + if test x"$PYTHON_CHECK" != x"yes" ; then +- AC_MSG_ERROR([Please install python before installing.]) ++ AC_MSG_ERROR([Please install python3 before installing.]) + else + + PYTHON_MODULES="base64 datetime glob hashlib io itertools json math multiprocessing pickle pwd re shutil signal subprocess stat sys tarfile tempfile time" + for PYTHON_MODULE in $PYTHON_MODULES; do +- AC_MSG_CHECKING([for the $PYTHON_MODULE python module]) +- python_module_result=`python -c "import $PYTHON_MODULE" 2>&1` ++ AC_MSG_CHECKING([for the $PYTHON_MODULE python3 module]) ++ python_module_result=`python3 -c "import $PYTHON_MODULE" 2>&1` + if test -z "$python_module_result"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +- AC_MSG_ERROR([cannot import Python module $PYTHON_MODULE. ++ AC_MSG_ERROR([cannot import python3 module $PYTHON_MODULE. + Please check your Python installation. The error was: + $python_module_result]) + fi +--- etc/configure_transform.py.O 2018-04-17 16:47:42.161011845 -0500 ++++ etc/configure_transform.py 2018-04-17 16:48:51.521743111 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + Copyright (c) 2017, SingularityWare, LLC. All rights reserved. +--- libexec/helpers/checks/1-docker.py.O 2018-04-17 16:47:42.179078716 -0500 ++++ libexec/helpers/checks/1-docker.py 2018-04-17 16:48:51.544859706 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # + # Copyright (c) 2017-2018, SyLabs, Inc. All rights reserved. + # Copyright (c) 2017, SingularityWare, LLC. All rights reserved. +--- libexec/helpers/checks/3-cve.py.O 2018-04-17 16:47:42.192137857 -0500 ++++ libexec/helpers/checks/3-cve.py 2018-04-17 16:48:51.561921134 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # + # Copyright (c) 2017-2018, SyLabs, Inc. All rights reserved. + # Copyright (c) 2017, SingularityWare, LLC. All rights reserved. +--- libexec/helpers/checks/1-cache-content.py.O 2018-04-17 16:47:42.206190368 -0500 ++++ libexec/helpers/checks/1-cache-content.py 2018-04-17 16:48:51.587019498 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # + # Copyright (c) 2017-2018, SyLabs, Inc. All rights reserved. + # Copyright (c) 2017, SingularityWare, LLC. All rights reserved. +--- libexec/helpers/checks/1-bash-hiddens.py.O 2018-04-17 16:47:42.227282721 -0500 ++++ libexec/helpers/checks/1-bash-hiddens.py 2018-04-17 16:48:51.602089849 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # + # Copyright (c) 2017-2018, SyLabs, Inc. All rights reserved. + # Copyright (c) 2017, SingularityWare, LLC. All rights reserved. +--- libexec/python/helpers/json/get.py.O 2018-04-17 16:47:42.243365600 -0500 ++++ libexec/python/helpers/json/get.py 2018-04-17 16:48:51.618164727 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + +--- libexec/python/helpers/json/dump.py.O 2018-04-17 16:47:42.256413341 -0500 ++++ libexec/python/helpers/json/dump.py 2018-04-17 16:48:51.635238419 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + +--- libexec/python/helpers/json/add.py.O 2018-04-17 16:47:42.275495268 -0500 ++++ libexec/python/helpers/json/add.py 2018-04-17 16:48:51.658672447 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + +--- libexec/python/helpers/json/inspect.py.O 2018-04-17 16:47:42.289553184 -0500 ++++ libexec/python/helpers/json/inspect.py 2018-04-17 16:48:51.675753922 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + +--- libexec/python/helpers/json/delete.py.O 2018-04-17 16:47:42.303611361 -0500 ++++ libexec/python/helpers/json/delete.py 2018-04-17 16:48:51.691822098 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + +--- libexec/python/shub/api.py.O 2018-04-17 16:47:42.318667098 -0500 ++++ libexec/python/shub/api.py 2018-04-17 16:48:51.717933618 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + +--- libexec/python/import.py.O 2018-04-17 16:47:42.333763864 -0500 ++++ libexec/python/import.py 2018-04-17 16:48:51.734011184 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + +--- libexec/python/size.py.O 2018-04-17 16:47:42.348839275 -0500 ++++ libexec/python/size.py 2018-04-17 16:48:51.749094286 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + +--- libexec/python/pull.py.O 2018-04-17 16:47:42.361890148 -0500 ++++ libexec/python/pull.py 2018-04-17 16:48:51.764173593 -0500 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ''' + diff --git a/singularity.spec b/singularity.spec index f33faf0..220570b 100644 --- a/singularity.spec +++ b/singularity.spec @@ -34,9 +34,10 @@ License: BSD and LBNL BSD Group: System Environment/Base URL: http://singularity.lbl.gov/ Source: https://github.com/singularityware/singularity/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch1: singularity-Python3.patch ExclusiveOS: linux BuildRoot: %{?_tmppath}%{!?_tmppath:/var/tmp}/%{name}-%{version}-%{release}-root -BuildRequires: python +BuildRequires: /usr/bin/python3 BuildRequires: automake libtool %if "%{_target_vendor}" == "suse" Requires: squashfs @@ -67,6 +68,7 @@ by the %{name} package. %prep %setup -q +%patch1 -p0 %build