From 96e17e73608333c1d23e8950f7daf59d6e290248 Mon Sep 17 00:00:00 2001 From: Kaleb S. KEITHLEY Date: Thu, 29 Oct 2020 14:37:47 +0800 Subject: [PATCH] cpeh-remove-python3 https://src.fedoraproject.org/rpms/ceph/c/96e17e73608333c1d23e8950f7daf59d6e290248 Signed-off-by: Kaleb S. KEITHLEY --- src/CMakeLists.txt | 3 --- src/brag/client/ceph-brag | 2 +- src/ceph-create-keys | 2 +- src/ceph-detect-init/ceph_detect_init/main.py | 2 +- src/ceph-disk/ceph_disk/main.py | 2 +- src/ceph-rest-api | 2 +- src/ceph-volume/bin/ceph-volume | 2 +- src/ceph-volume/bin/ceph-volume-systemd | 2 +- src/ceph.in | 2 +- src/mount.fuse.ceph | 2 +- src/pybind/CMakeLists.txt | 3 +-- src/tools/setup-virtualenv.sh | 4 +++- 12 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 80d4b351..7ca500b1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -244,9 +244,6 @@ if(WITH_CEPHFS_JAVA) endif() # Python stuff -find_package(PythonInterp 2 REQUIRED) -find_package(PythonLibs 2 REQUIRED) - option(WITH_PYTHON3 "build python3 bindings" "CHECK") if(WITH_PYTHON3 MATCHES "check|CHECK") find_package(Python3Interp 3 QUIET) diff --git a/src/brag/client/ceph-brag b/src/brag/client/ceph-brag index 7df51674..69bbba20 100755 --- a/src/brag/client/ceph-brag +++ b/src/brag/client/ceph-brag @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from __future__ import print_function diff --git a/src/ceph-create-keys b/src/ceph-create-keys index c14c02f2..7e80aab6 100755 --- a/src/ceph-create-keys +++ b/src/ceph-create-keys @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 import argparse import errno import json diff --git a/src/ceph-detect-init/ceph_detect_init/main.py b/src/ceph-detect-init/ceph_detect_init/main.py index 320ae170..c18ce74c 100644 --- a/src/ceph-detect-init/ceph_detect_init/main.py +++ b/src/ceph-detect-init/ceph_detect_init/main.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # Copyright (C) 2015 # Copyright (C) 2015 SUSE LINUX GmbH diff --git a/src/ceph-disk/ceph_disk/main.py b/src/ceph-disk/ceph_disk/main.py index 0058f1ac..0bdbcba3 100644 --- a/src/ceph-disk/ceph_disk/main.py +++ b/src/ceph-disk/ceph_disk/main.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # # Copyright (C) 2015, 2016, 2017 Red Hat # Copyright (C) 2014 Inktank diff --git a/src/ceph-rest-api b/src/ceph-rest-api index d185a804..2761dcc7 100755 --- a/src/ceph-rest-api +++ b/src/ceph-rest-api @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 # vim: ts=4 sw=4 smarttab expandtab import argparse diff --git a/src/ceph-volume/bin/ceph-volume b/src/ceph-volume/bin/ceph-volume index 5905cfcc..a4f62b4a 100755 --- a/src/ceph-volume/bin/ceph-volume +++ b/src/ceph-volume/bin/ceph-volume @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from ceph_volume import main diff --git a/src/ceph-volume/bin/ceph-volume-systemd b/src/ceph-volume/bin/ceph-volume-systemd index 7da8ec6b..f6c751cf 100755 --- a/src/ceph-volume/bin/ceph-volume-systemd +++ b/src/ceph-volume/bin/ceph-volume-systemd @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from ceph_volume.systemd import main diff --git a/src/ceph.in b/src/ceph.in index 7c1eda2c..5e0471cb 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -1,4 +1,4 @@ -#!@PYTHON_EXECUTABLE@ +#!@PYTHON3_EXECUTABLE@ # -*- mode:python -*- # vim: ts=4 sw=4 smarttab expandtab # diff --git a/src/mount.fuse.ceph b/src/mount.fuse.ceph index 5c65ddca..4c0addf5 100755 --- a/src/mount.fuse.ceph +++ b/src/mount.fuse.ceph @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 ''' Helper to mount ceph-fuse from /etc/fstab. To use, add an entry like: diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt index dbdb23f1..1a14df97 100644 --- a/src/pybind/CMakeLists.txt +++ b/src/pybind/CMakeLists.txt @@ -6,7 +6,6 @@ set(CYTHON_MODULE_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cython_modules) if(WITH_PYTHON3) set(py_vers 3) endif() -list(APPEND py_vers 2) foreach(python_version ${py_vers}) if(${python_version} EQUAL 2) @@ -58,7 +57,7 @@ endforeach() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ceph_rest_api.py - DESTINATION ${PYTHON_INSTDIR}) + DESTINATION ${PYTHON${PYTHON_VERSION}_INSTDIR}) if(WITH_MGR) # Location needs to match default setting for mgr_module_path, currently: diff --git a/src/tools/setup-virtualenv.sh b/src/tools/setup-virtualenv.sh index d249d49f..51763ac6 100755 --- a/src/tools/setup-virtualenv.sh +++ b/src/tools/setup-virtualenv.sh @@ -15,10 +15,12 @@ # GNU Library Public License for more details. # +echo ====================== setup-virtualenv $DIR ================ + DIR=$1 rm -fr $DIR mkdir -p $DIR -virtualenv --python python2.7 $DIR +virtualenv --python python3 $DIR . $DIR/bin/activate if pip --help | grep -q disable-pip-version-check; then -- 2.27.0