summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2017-07-18 02:09:12 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2017-07-24 18:58:52 +0200
commitb344ce38db1f434b93bb981d3e4fc39144492ef1 (patch)
tree50a0ec4cd82c518b16524d5ca432a10528757876 /meta-python/recipes-devtools/python
parente81db0521ad7270846c1d0507caa4e4c0071e517 (diff)
downloadmeta-openembedded-b344ce38db1f434b93bb981d3e4fc39144492ef1.tar.gz
python3-prctl: add recipe 1.6.1
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python')
-rw-r--r--meta-python/recipes-devtools/python/python3-prctl/0001-support-cross-complication.patch61
-rw-r--r--meta-python/recipes-devtools/python/python3-prctl_1.6.1.bb22
2 files changed, 83 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-prctl/0001-support-cross-complication.patch b/meta-python/recipes-devtools/python/python3-prctl/0001-support-cross-complication.patch
new file mode 100644
index 000000000..775ae1b2e
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-prctl/0001-support-cross-complication.patch
@@ -0,0 +1,61 @@
1From 9a16800738547d117284354bbcad7dd77d9d0344 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 21 Apr 2016 03:05:57 -0400
4Subject: [PATCH] support cross-complication
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9---
10 setup.py | 35 -----------------------------------
11 1 file changed, 35 deletions(-)
12
13diff --git a/setup.py b/setup.py
14index 658d1a5..e8be7eb 100755
15--- a/setup.py
16+++ b/setup.py
17@@ -13,41 +13,6 @@ import sys
18 # - Need gcc
19 # - Need C headers
20 # - Need libcap headers
21-if not sys.platform.startswith('linux'):
22- sys.stderr.write("This module only works on linux\n")
23- sys.exit(1)
24-
25-kvers = os.uname()[2]
26-if kvers < '2.6.18' and not os.environ.get("PRCTL_SKIP_KERNEL_CHECK",False):
27- sys.stderr.write("This module requires linux 2.6.18 or newer\n")
28- sys.exit(1)
29-
30-if sys.version_info[:2] < (2,4):
31- sys.stderr.write("This module requires python 2.4 or newer\n")
32- sys.exit(1)
33-
34-exit = False
35-try:
36- subprocess.call(['gcc','-v'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
37-except:
38- sys.stderr.write("You need to install gcc to build this module\n")
39- sys.exit(1)
40-
41-sp = subprocess.Popen(['cpp'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
42-sp.communicate('#include <sys/prctl.h>\n'.encode())
43-if sp.returncode:
44- sys.stderr.write("You need to install libc development headers to build this module\n")
45- exit = True
46-
47-sp = subprocess.Popen(['cpp'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
48-sp.communicate('#include <sys/capability.h>\n'.encode())
49-if sp.returncode:
50- sys.stderr.write("You need to install libcap development headers to build this module\n")
51- exit = True
52-
53-if exit:
54- sys.exit(1)
55-
56 _prctl = Extension("_prctl",
57 sources = ['_prctlmodule.c'],
58 depends = ['securebits.h'],
59--
602.8.1
61
diff --git a/meta-python/recipes-devtools/python/python3-prctl_1.6.1.bb b/meta-python/recipes-devtools/python/python3-prctl_1.6.1.bb
new file mode 100644
index 000000000..5de83ce48
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-prctl_1.6.1.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Control process attributes through prctl"
2DESCRIPTION = "The linux prctl function allows you to control specific characteristics of a \
3process' behaviour. Usage of the function is fairly messy though, due to \
4limitations in C and linux. This module provides a nice non-messy python(ic) \
5interface."
6SECTION = "devel/python"
7LICENSE = "GPLv3"
8LIC_FILES_CHKSUM = "file://COPYING;md5=5eb2f4bcd60326f83e5deb542372d52f"
9
10S = "${WORKDIR}/git"
11B = "${S}"
12
13SRCREV = "1107d0be7bec4b28c85c62c454882d16844c930a"
14PV = "1.6.1+git${SRCPV}"
15
16SRC_URI = "git://github.com/seveas/python-prctl;branch=master \
17 file://0001-support-cross-complication.patch \
18"
19inherit setuptools3 python3native
20
21DEPENDS += "libcap"
22