2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 DESCRIPTION = "Client library for OpenStack Compute API"
17 HOMEPAGE = "https://github.com/openstack/python-novaclient"
18 SECTION = "devel/python"
19 LICENSE = "Apache-2.0"
20 LIC_FILES_CHKSUM = "file://LICENSE;md5=7cdb54622cacc9bc9b2883091e6dd669"
22 SRC_URI = "git://github.com/openstack/python-novaclient.git;branch=stable/pike"
24 SRCREV = "62bf8809c660ed0675f301c235b1d434caeaf580"
25 SRCNAME = "python-novaclient"
27 BRANCH = "stable/train"
29 PV = "13.0.0+git${SRCPV}"
31 SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
33 inherit setuptools python-dir
40 # Satisfy setup.py 'setup_requires'
47 python-keystoneauth1 \
50 python-oslo.serialization \
58 PACKAGECONFIG ?= "bash-completion"
59 PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion"
62 install -d ${D}/${sysconfdir}/bash_completion.d
63 install -m 664 ${S}/tools/nova.bash_completion ${D}/${sysconfdir}/bash_completion.d
65 mv ${D}/${bindir}/nova ${D}/${bindir}/nova-${PYTHON_BASEVERSION}
66 ln -s ./nova-${PYTHON_BASEVERSION} ${D}/${bindir}/nova-2
67 ln -s ./nova-2 ${D}/${bindir}/nova
69 if [ -e "${D}/${PYTHON_SITEPACKAGES_DIR}/novaclient/tests/v1_1/test_servers.py" ]; then
70 sed -e "s:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g" \
71 -i ${D}/${PYTHON_SITEPACKAGES_DIR}/novaclient/tests/v1_1/test_servers.py
76 PACKAGES =+ "${BPN}-bash-completion"
77 FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"