Jackie Huang | 57fdea7 | 2020-04-23 11:29:15 +0800 | [diff] [blame] | 1 | # |
| 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 | |
| 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" |
| 21 | |
| 22 | SRC_URI = "git://github.com/openstack/python-novaclient.git;branch=stable/pike" |
| 23 | |
| 24 | SRCREV = "62bf8809c660ed0675f301c235b1d434caeaf580" |
| 25 | SRCNAME = "python-novaclient" |
| 26 | PROTOCOL = "https" |
| 27 | BRANCH = "stable/train" |
| 28 | S = "${WORKDIR}/git" |
| 29 | PV = "13.0.0+git${SRCPV}" |
| 30 | |
| 31 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}" |
| 32 | |
| 33 | inherit setuptools python-dir |
| 34 | |
| 35 | DEPENDS += " \ |
| 36 | python-pip \ |
| 37 | python-pbr-native \ |
| 38 | " |
| 39 | |
| 40 | # Satisfy setup.py 'setup_requires' |
| 41 | DEPENDS += " \ |
| 42 | python-pbr-native \ |
| 43 | " |
| 44 | |
| 45 | RDEPENDS_${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 | |
| 58 | PACKAGECONFIG ?= "bash-completion" |
| 59 | PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" |
| 60 | |
| 61 | do_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 | |
| 76 | PACKAGES =+ "${BPN}-bash-completion" |
| 77 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" |