From 720a9835fd48c786c9351c1c370d648221e0779a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=BCtt?= Date: Mon, 25 May 2020 17:34:12 +0200 Subject: [PATCH] Move to Python3 - Part 2 --- INSTALL.md | 4 ++-- Makefile | 2 +- tools/docker/Dockerfile.build_mingw64 | 2 +- tools/docker/scripts/install_formatting.sh | 1 - tools/docker/scripts/install_python.sh | 3 +-- tools/docker/scripts/install_scaling.sh | 2 +- tools/toolchain/Dockerfile.ubuntu_nompi | 1 + 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index e7484858dd..99bc9e1458 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -37,10 +37,10 @@ Sub-points here discuss prerequisites needed to build CP2K. Copies of the recomm ### 2a. GNU make (required, build system) -GNU make should be on your system (gmake or make on linux) and used for the build, go to https://www.gnu.org/software/make/make.html download from https://ftp.gnu.org/pub/gnu/make/ also Python (2.x) is required for building. +GNU make should be on your system (gmake or make on linux) and used for the build, go to https://www.gnu.org/software/make/make.html download from https://ftp.gnu.org/pub/gnu/make/ ### 2b. Python (required, build system) -Python 2.7 or 3.5+ is needed to run the dependency generator. On most system Python is already installed. For more information visit: https://www.python.org/ +Python 3.5+ is needed to run the dependency generator. On most system Python is already installed. For more information visit: https://www.python.org/ ### 2c. Fortran and C Compiler (required, build system) A Fortran 2008 compiler and matching C99 compiler should be installed on your system. We have good experience with gcc/gfortran (gcc >=4.6 works, later version recommended). Be aware that some compilers have bugs that might cause them to fail (internal compiler errors, segfaults) or, worse, yield a mis-compiled CP2K. Report bugs to compiler vendors; they (and we) have an interest in fixing them. A list of tested compiler can be found [here](https://www.cp2k.org/dev:compiler_support). Always run a `make -j test` (See point 5.) after compilation to identify these problems. diff --git a/Makefile b/Makefile index 515599106a..d82e6eceb7 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ EXTSDIR := exts EXTSHOME := $(CP2KHOME)/$(EXTSDIR) EXTSPACKAGES := $(shell cd $(EXTSHOME) ; find * -maxdepth 0 -type d ) -PYTHON := /usr/bin/env python +PYTHON := /usr/bin/env python3 # Common Targets ============================================================ default_target: all diff --git a/tools/docker/Dockerfile.build_mingw64 b/tools/docker/Dockerfile.build_mingw64 index 7495ebe9fb..b4112bfe8e 100644 --- a/tools/docker/Dockerfile.build_mingw64 +++ b/tools/docker/Dockerfile.build_mingw64 @@ -4,7 +4,7 @@ RUN dnf -y upgrade && \ dnf -y install \ @development-tools \ hostname \ - python \ + python3 \ mingw64-gcc-gfortran \ mingw64-gcc-c++ \ mingw64-winpthreads-static \ diff --git a/tools/docker/scripts/install_formatting.sh b/tools/docker/scripts/install_formatting.sh index 9ec1859a44..2e8a9882de 100755 --- a/tools/docker/scripts/install_formatting.sh +++ b/tools/docker/scripts/install_formatting.sh @@ -9,7 +9,6 @@ apt-get install -qq --no-install-recommends \ build-essential \ make \ perl \ - python \ python3-{pip,setuptools,wheel,dev} rm -rf /var/lib/apt/lists/* diff --git a/tools/docker/scripts/install_python.sh b/tools/docker/scripts/install_python.sh index 39175a1770..e04ac90e4f 100755 --- a/tools/docker/scripts/install_python.sh +++ b/tools/docker/scripts/install_python.sh @@ -5,9 +5,8 @@ # install Ubuntu packages apt-get update -qq apt-get install -qq --no-install-recommends \ - python \ - python3 \ libpython3-stdlib \ + python3 \ python3-pip \ python3-wheel \ python3-setuptools \ diff --git a/tools/docker/scripts/install_scaling.sh b/tools/docker/scripts/install_scaling.sh index 89174aa286..2474475d27 100755 --- a/tools/docker/scripts/install_scaling.sh +++ b/tools/docker/scripts/install_scaling.sh @@ -4,7 +4,7 @@ # install numpy apt-get update -qq -apt-get install -qq --no-install-recommends python-numpy +apt-get install -qq --no-install-recommends python3-numpy rm -rf /var/lib/apt/lists/* # setup arch files diff --git a/tools/toolchain/Dockerfile.ubuntu_nompi b/tools/toolchain/Dockerfile.ubuntu_nompi index bbd2a3815e..6773a28cfc 100644 --- a/tools/toolchain/Dockerfile.ubuntu_nompi +++ b/tools/toolchain/Dockerfile.ubuntu_nompi @@ -23,6 +23,7 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \ nano \ pkg-config \ python \ + python3 \ unzip \ wget \ zlib1g-dev \