Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 1 | From 5f3911737c63a098caf73f1365320fe1b3a7638b Mon Sep 17 00:00:00 2001 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Thu, 21 Apr 2016 03:05:57 -0400 |
| 4 | Subject: [PATCH] support cross-complication |
| 5 | |
| 6 | Upstream-Status: Inappropriate [oe specific] |
| 7 | |
| 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 9 | Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | --- |
| 11 | setup.py | 35 ----------------------------------- |
| 12 | 1 file changed, 35 deletions(-) |
| 13 | |
| 14 | diff --git a/setup.py b/setup.py |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 15 | index eb83cfe..3f9567b 100755 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 16 | --- a/setup.py |
| 17 | +++ b/setup.py |
| 18 | @@ -13,41 +13,6 @@ import sys |
| 19 | # - Need gcc |
| 20 | # - Need C headers |
| 21 | # - Need libcap headers |
| 22 | -if not sys.platform.startswith('linux'): |
| 23 | - sys.stderr.write("This module only works on linux\n") |
| 24 | - sys.exit(1) |
| 25 | - |
| 26 | -kvers = os.uname()[2] |
| 27 | -if kvers < '2.6.18' and not os.environ.get("PRCTL_SKIP_KERNEL_CHECK",False): |
| 28 | - sys.stderr.write("This module requires linux 2.6.18 or newer\n") |
| 29 | - sys.exit(1) |
| 30 | - |
| 31 | -if sys.version_info[:2] < (2,4): |
| 32 | - sys.stderr.write("This module requires python 2.4 or newer\n") |
| 33 | - sys.exit(1) |
| 34 | - |
| 35 | -exit = False |
| 36 | -try: |
| 37 | - subprocess.call(['gcc','-v'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 38 | -except: |
| 39 | - sys.stderr.write("You need to install gcc to build this module\n") |
| 40 | - sys.exit(1) |
| 41 | - |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 42 | -sp = subprocess.Popen(['cpp'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=os.environ) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 43 | -sp.communicate('#include <sys/prctl.h>\n'.encode()) |
| 44 | -if sp.returncode: |
| 45 | - sys.stderr.write("You need to install libc development headers to build this module\n") |
| 46 | - exit = True |
| 47 | - |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 48 | -sp = subprocess.Popen(['cpp'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=os.environ) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 49 | -sp.communicate('#include <sys/capability.h>\n'.encode()) |
| 50 | -if sp.returncode: |
| 51 | - sys.stderr.write("You need to install libcap development headers to build this module\n") |
| 52 | - exit = True |
| 53 | - |
| 54 | -if exit: |
| 55 | - sys.exit(1) |
| 56 | - |
| 57 | _prctl = Extension("_prctl", |
| 58 | sources = ['_prctlmodule.c'], |
| 59 | depends = ['securebits.h'], |
| 60 | -- |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 61 | 2.17.1 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 62 | |