python: fix headers search for modules.

* remove 3.2 recipe
* pip and easy_install are downloaded during the build, this should
be disabled.
This commit is contained in:
Jerome Duval
2015-06-06 17:53:44 +00:00
parent 8aeb2cfbf9
commit cd2b661c1a
3 changed files with 30 additions and 65 deletions

View File

@@ -1,4 +1,4 @@
From 1c89acb4a76d78fb3df72d3c74647cffe340bfbd Mon Sep 17 00:00:00 2001
From 40e14d16905c97a6793dabe45ec7b2fd228f03b7 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 10 Apr 2014 16:03:33 +0000
Subject: initial Haiku patch
@@ -194,7 +194,7 @@ index 6cbc78f..3c2390a 100644
#ifdef SCHED_BATCH
if (PyModule_AddIntMacro(m, SCHED_BATCH)) return -1;
diff --git a/Modules/resource.c b/Modules/resource.c
index 3a1cf09..7a834b1 100644
index 3a1cf09..bb56e30 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -83,6 +83,7 @@ resource_getrusage(PyObject *self, PyObject *args)
@@ -211,20 +211,20 @@ index 3a1cf09..7a834b1 100644
PyStructSequence_SET_ITEM(result, 15, PyLong_FromLong(ru.ru_nivcsw));
-
+#else
+ PyStructSequence_SET_ITEM(result, 2, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 3, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 4, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 5, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 6, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 7, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 8, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 9, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 10, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 11, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 12, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 13, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 14, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 15, PyInt_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 3, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 5, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 6, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 7, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 8, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 9, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 10, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 11, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 12, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 13, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 14, PyLong_FromLong(0));
+ PyStructSequence_SET_ITEM(result, 15, PyLong_FromLong(0));
+#endif
if (PyErr_Occurred()) {
Py_DECREF(result);
@@ -453,21 +453,23 @@ index 25e1dc8..8b4b4cc 100644
esac
AC_MSG_CHECKING(for --with-libm=STRING)
diff --git a/setup.py b/setup.py
index 8269e1c..68d2333 100644
index 8269e1c..2ee9731 100644
--- a/setup.py
+++ b/setup.py
@@ -517,6 +517,10 @@ class PyBuildExt(build_ext):
@@ -517,6 +517,12 @@ class PyBuildExt(build_ext):
config_h_vars = sysconfig.parse_config_h(file)
srcdir = sysconfig.get_config_var('srcdir')
+
+ # Haiku-specific library locations
+ if host_platform == 'haiku1':
+ inc_dirs += ['/boot/develop/headers/posix',
+ '/boot/system/develop/headers']
+ lib_dirs += ['/boot/system/develop/lib']
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
if host_platform in ['osf1', 'unixware7', 'openunix8']:
@@ -544,9 +548,9 @@ class PyBuildExt(build_ext):
@@ -544,9 +550,9 @@ class PyBuildExt(build_ext):
if item.startswith('-L'):
lib_dirs.append(item[2:])
@@ -479,7 +481,7 @@ index 8269e1c..68d2333 100644
math_libs = []
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -754,15 +758,22 @@ class PyBuildExt(build_ext):
@@ -754,15 +760,22 @@ class PyBuildExt(build_ext):
'/usr/local/ssl/include',
'/usr/contrib/ssl/include/'
]
@@ -505,7 +507,7 @@ index 8269e1c..68d2333 100644
['/usr/local/ssl/lib',
'/usr/contrib/ssl/lib/'
] )
@@ -770,8 +781,8 @@ class PyBuildExt(build_ext):
@@ -770,8 +783,8 @@ class PyBuildExt(build_ext):
if (ssl_incs is not None and
ssl_libs is not None):
exts.append( Extension('_ssl', ['_ssl.c'],
@@ -516,7 +518,7 @@ index 8269e1c..68d2333 100644
libraries = ['ssl', 'crypto'],
depends = ['socketmodule.h']), )
else:
@@ -811,8 +822,8 @@ class PyBuildExt(build_ext):
@@ -811,8 +824,8 @@ class PyBuildExt(build_ext):
# of hash functions from the OpenSSL library.
exts.append( Extension('_hashlib', ['_hashopenssl.c'],
depends = ['hashlib.h'],
@@ -527,7 +529,7 @@ index 8269e1c..68d2333 100644
libraries = ['ssl', 'crypto']) )
else:
print("warning: openssl 0x%08x is too old for _hashlib" %
@@ -1236,7 +1247,7 @@ class PyBuildExt(build_ext):
@@ -1236,7 +1249,7 @@ class PyBuildExt(build_ext):
exts.append( Extension('resource', ['resource.c']) )
# Sun yellow pages. Some systems have the functions in libc.