Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-devtools / python / python-novaclient_git.bb
1
2 DESCRIPTION = "Client library for OpenStack Compute API"
3 HOMEPAGE = "https://github.com/openstack/python-novaclient"
4 SECTION = "devel/python"
5 LICENSE = "Apache-2.0"
6 LIC_FILES_CHKSUM = "file://LICENSE;md5=7cdb54622cacc9bc9b2883091e6dd669"
7
8 SRC_URI = "git://github.com/openstack/python-novaclient.git;branch=stable/pike"
9
10 SRCREV = "cd396b8b61ed7496f4166a2237b27aa0a138f6e5"
11 SRCNAME = "python-novaclient"
12 PROTOCOL = "https"
13 BRANCH = "stable/train"
14 S = "${WORKDIR}/git"
15 PV = "15.1.0+git${SRCPV}"
16
17 SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
18
19 inherit setuptools python-dir
20
21 DEPENDS += " \
22         python-pip \
23         python-pbr-native \
24         "
25
26 # Satisfy setup.py 'setup_requires'
27 DEPENDS += " \
28         python-pbr-native \
29         "
30
31 RDEPENDS_${PN} += " \
32         python-pbr \
33         python-keystoneauth1 \
34         python-iso8601 \
35         python-oslo.i18n \
36         python-oslo.serialization \
37         python-oslo.utils \
38         python-prettytable \
39         python-simplejson \
40         python-six \
41         python-babel \
42         "
43
44 PACKAGECONFIG ?= "bash-completion"
45 PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion"
46
47 do_install_append() {
48         install -d ${D}/${sysconfdir}/bash_completion.d
49         install -m 664 ${S}/tools/nova.bash_completion ${D}/${sysconfdir}/bash_completion.d
50
51         mv ${D}/${bindir}/nova ${D}/${bindir}/nova-${PYTHON_BASEVERSION}
52         ln -s ./nova-${PYTHON_BASEVERSION}  ${D}/${bindir}/nova-2
53         ln -s ./nova-2  ${D}/${bindir}/nova
54
55         if [ -e "${D}/${PYTHON_SITEPACKAGES_DIR}/novaclient/tests/v1_1/test_servers.py" ]; then
56                 sed -e "s:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g" \
57                     -i ${D}/${PYTHON_SITEPACKAGES_DIR}/novaclient/tests/v1_1/test_servers.py
58         fi
59
60 }
61
62 PACKAGES =+ "${BPN}-bash-completion"
63 FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"