@@ -85,60 +85,8 @@ function pip_install_gr_extras {
8585 pip_install $clean_name [$extras ]
8686}
8787
88- # python3_enabled_for() assumes the service(s) specified as arguments are
89- # enabled for python 3 unless explicitly disabled. See python3_disabled_for().
90- #
91- # Multiple services specified as arguments are ``OR``'ed together; the test
92- # is a short-circuit boolean, i.e it returns on the first match.
93- #
94- # python3_enabled_for dir [dir ...]
95- function python3_enabled_for {
96- local xtrace
97- xtrace=$( set +o | grep xtrace)
98- set +o xtrace
99-
100- local enabled=1
101- local dirs=$@
102- local dir
103- for dir in ${dirs} ; do
104- if ! python3_disabled_for " ${dir} " ; then
105- enabled=0
106- fi
107- done
108-
109- $xtrace
110- return $enabled
111- }
112-
113- # python3_disabled_for() checks if the service(s) specified as arguments are
114- # disabled by the user in ``DISABLED_PYTHON3_PACKAGES``.
115- #
116- # Multiple services specified as arguments are ``OR``'ed together; the test
117- # is a short-circuit boolean, i.e it returns on the first match.
118- #
119- # Uses global ``DISABLED_PYTHON3_PACKAGES``
120- # python3_disabled_for dir [dir ...]
121- function python3_disabled_for {
122- local xtrace
123- xtrace=$( set +o | grep xtrace)
124- set +o xtrace
125-
126- local enabled=1
127- local dirs=$@
128- local dir
129- for dir in ${dirs} ; do
130- [[ ,${DISABLED_PYTHON3_PACKAGES} , =~ ,${dir} , ]] && enabled=0
131- done
132-
133- $xtrace
134- return $enabled
135- }
136-
13788# enable_python3_package() -- no-op for backwards compatibility
13889#
139- # For example:
140- # enable_python3_package nova
141- #
14290# enable_python3_package dir [dir ...]
14391function enable_python3_package {
14492 local xtrace
@@ -150,25 +98,15 @@ function enable_python3_package {
15098 $xtrace
15199}
152100
153- # disable_python3_package() adds the services passed as argument to
154- # the ``DISABLED_PYTHON3_PACKAGES`` list.
155- #
156- # For example:
157- # disable_python3_package swift
101+ # disable_python3_package() -- no-op for backwards compatibility
158102#
159- # Uses global ``DISABLED_PYTHON3_PACKAGES``
160103# disable_python3_package dir [dir ...]
161104function disable_python3_package {
162105 local xtrace
163106 xtrace=$( set +o | grep xtrace)
164107 set +o xtrace
165108
166- local disabled_svcs=" ${DISABLED_PYTHON3_PACKAGES} "
167- local dir
168- for dir in $@ ; do
169- disabled_svcs+=" ,$dir "
170- done
171- DISABLED_PYTHON3_PACKAGES=$( _cleanup_service_list " $disabled_svcs " )
109+ echo " It is no longer possible to call disable_python3_package()."
172110
173111 $xtrace
174112}
@@ -231,17 +169,9 @@ function pip_install {
231169 # support for python3 in progress, but don't claim support
232170 # in their classifier
233171 echo " Check python version for : $package_dir "
234- if python3_disabled_for ${package_dir##*/ } ; then
235- echo " Explicitly using $PYTHON2_VERSION version to install $package_dir based on DISABLED_PYTHON3_PACKAGES"
236- else
237- # For everything that is not explicitly blacklisted with
238- # DISABLED_PYTHON3_PACKAGES, assume it supports python3
239- # and we will let pip sort out the install, regardless of
240- # the package being local or remote.
241- echo " Using $PYTHON3_VERSION version to install $package_dir based on default behavior"
242- sudo_pip=" $sudo_pip LC_ALL=en_US.UTF-8"
243- cmd_pip=$( get_pip_command $PYTHON3_VERSION )
244- fi
172+ echo " Using $PYTHON3_VERSION version to install $package_dir based on default behavior"
173+ sudo_pip=" $sudo_pip LC_ALL=en_US.UTF-8"
174+ cmd_pip=$( get_pip_command $PYTHON3_VERSION )
245175 fi
246176 fi
247177
0 commit comments