blob: b9fa77499274dd550c6c6baed537754c18101d1d [file] [log] [blame]
Jackie Huang57fdea72020-04-23 11:29:15 +08001#
2## Copyright (C) 2019 Wind River Systems, Inc.
3#
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
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
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.
15
16DESCRIPTION = "Client library for OpenStack Compute API"
17HOMEPAGE = "https://github.com/openstack/python-novaclient"
18SECTION = "devel/python"
19LICENSE = "Apache-2.0"
20LIC_FILES_CHKSUM = "file://LICENSE;md5=7cdb54622cacc9bc9b2883091e6dd669"
21
22SRC_URI = "git://github.com/openstack/python-novaclient.git;branch=stable/pike"
23
24SRCREV = "62bf8809c660ed0675f301c235b1d434caeaf580"
25SRCNAME = "python-novaclient"
26PROTOCOL = "https"
27BRANCH = "stable/train"
28S = "${WORKDIR}/git"
29PV = "13.0.0+git${SRCPV}"
30
31SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
32
33inherit setuptools python-dir
34
35DEPENDS += " \
36 python-pip \
37 python-pbr-native \
38 "
39
40# Satisfy setup.py 'setup_requires'
41DEPENDS += " \
42 python-pbr-native \
43 "
44
45RDEPENDS_${PN} += " \
46 python-pbr \
47 python-keystoneauth1 \
48 python-iso8601 \
49 python-oslo.i18n \
50 python-oslo.serialization \
51 python-oslo.utils \
52 python-prettytable \
53 python-simplejson \
54 python-six \
55 python-babel \
56 "
57
58PACKAGECONFIG ?= "bash-completion"
59PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion"
60
61do_install_append() {
62 install -d ${D}/${sysconfdir}/bash_completion.d
63 install -m 664 ${S}/tools/nova.bash_completion ${D}/${sysconfdir}/bash_completion.d
64
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
68
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
72 fi
73
74}
75
76PACKAGES =+ "${BPN}-bash-completion"
77FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"