aboutsummaryrefslogtreecommitdiffstats
path: root/c_extension.c
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2022-02-11 00:05:10 +0100
committerJonas Schmid <schmid@stettbacher.ch>2022-02-11 07:36:49 +0100
commitc6525d5bf37c5d6ddfd674d1690a8c4f2d9257d5 (patch)
tree1cd51fce8f0979d304ee34ea2f5bf127b5e63a6b /c_extension.c
parentFix arrayobject.h path on Debian based distros (diff)
downloado3000-python-binding-c6525d5bf37c5d6ddfd674d1690a8c4f2d9257d5.tar.gz
o3000-python-binding-c6525d5bf37c5d6ddfd674d1690a8c4f2d9257d5.zip
Method to find arrayobject.h path on any distro
Improved solution to the issue described in commit 1cfdf5c198f1c74c2f894067baf4670f5bca8e70 The new solution should be more OS-independent. Tested on MacOS 12.1 and Debian 10 Buster. Signed-off-by: Jonas Schmid <schmid@stettbacher.ch>
Diffstat (limited to 'c_extension.c')
-rw-r--r--c_extension.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/c_extension.c b/c_extension.c
index 6cfadba..7aebced 100644
--- a/c_extension.c
+++ b/c_extension.c
@@ -39,21 +39,10 @@ POSSIBILITY OF SUCH DAMAGE.
#include <pthread.h>
#include <o3000/o3000.h>
#include <o3000/color_pipe.h>
+#include <numpy/arrayobject.h>
#include "helpers.h"
-/* On Debian Linux and its derivatives (such as ubuntu), Python libraries
- * installed through the package manager are kept in a non-standard directory
- * 'dist-packages' instead of 'site-packages'. Why? Who knows.
- *
- * https://wiki.debian.org/Python#Deviations_from_upstream
- */
-#ifdef DEBIAN_LINUX
- #include </usr/lib/python3/dist-packages/numpy/core/include/numpy/arrayobject.h>
-#else
- #include </usr/lib64/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h>
-#endif
-
#define DEFAULT_FRAME_RATE 10 ///< default frame rate
#define MAX_FRAME_WIDTH 1280 ///< O-3000 image width in pixels