openbsd-ports/math/lpsolve/python/patches/patch-setup_py
edd 695cd59509 Add Python bindings for lpsolve-5.5.20, move all common stuff into a
Makefile.inc, remove dependency upon libcompat with patching.

OK jasper@
2012-05-11 23:29:30 +00:00

31 lines
1.2 KiB
Plaintext

$OpenBSD: patch-setup_py,v 1.1 2012/05/11 23:29:30 edd Exp $
--- setup.py.orig Mon Feb 1 20:57:56 2010
+++ setup.py Fri May 11 15:02:36 2012
@@ -3,15 +3,8 @@ from os import getenv
import sys
import os
p = sys.prefix
-NUMPYPATH = '.'
-if os.path.isdir(p + '/include/numpy'):
- NUMPY = 'NUMPY'
-elif os.path.isdir(p + '/Lib/site-packages/numpy/core/include/numpy'):
- NUMPY = 'NUMPY'
- NUMPYPATH = p + '/Lib/site-packages/numpy/core/include'
-else:
- NUMPY = 'NONUMPY'
-print 'numpy: ' + NUMPY
+NUMPYPATH = '${NUMPY_PATH}'
+NUMPY='NUMPY'
windir = getenv('windir')
if windir == None:
WIN32 = 'NOWIN32'
@@ -29,7 +22,7 @@ setup (name = "lpsolve55",
ext_modules = [Extension("lpsolve55",
["lpsolve.c", "hash.c", "pythonmod.c"],
define_macros=[('PYTHON', '1'), (WIN32, '1'), ('NODEBUG', '1'), ('DINLINE', 'static'), (NUMPY, '1'), ('_CRT_SECURE_NO_WARNINGS', '1')],
- include_dirs=['../..', NUMPYPATH],
+ include_dirs=['../..', NUMPYPATH, '${LOCALBASE}/include/lpsolve'],
library_dirs=[LPSOLVE55],
libraries = ["lpsolve55"])
]