Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-devtools / python / python-pynacl_git.bb
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 FILESEXTRAPATHS_prepend := "${THISDIR}/files/python-pynacl:"
17 DESCRIPTION = "Python binding to libsodiom"
18
19 HOMEPAGE = "https://pypi.org/project/PyNaCl/"
20 SECTION = "devel/python"
21 LICENSE = "Apache-2.0"
22 LIC_FILES_CHKSUM = "file://LICENSE;md5=8cc789b082b3d97e1ccc5261f8594d3f"
23
24 SRCREV = "4881c878c9a33f4684337f650355bdf7f031d77d"
25 PROTOCOL = "https"
26 BRANCH = "master"
27 S = "${WORKDIR}/git"
28
29 SRC_URI = " \
30         git://github.com/pyca/pynacl.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH} \
31         file://${PN}/0001-Enable-cross-compile.patch \
32         "
33
34
35 inherit setuptools distutils
36
37 DEPENDS += " libsodium python-cffi-native libsodium-native"
38 RDEPENDS_${PN} = " libsodium"
39
40 do_compile_prepend() {
41         export PYNACL_CROSS_BUILD="--build=${BUILD_SYS}"
42         export PYNACL_CROSS_HOST="--host=${HOST_SYS}"
43         export PYNACL_CROSS_TARGET="--target=${TARGET_SYS}"
44         export SODIUM_INSTALL="system"
45 }
46
47 do_install_prepend() {
48         export SODIUM_INSTALL="system"
49 }