Skip to content

Commit

Permalink
Add add-emscripten-cpu.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
msabramo committed Aug 9, 2019
1 parent 188717e commit 6e3a5d2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/spacy/meta.yaml
@@ -1,9 +1,13 @@
package:
name: spacy
version: 2.1.8

source:
sha256: 9c510459a66703739d6ba6c958fcff2627399dd813829a020d5644b532034ab6
url: https://files.pythonhosted.org/packages/58/f2/5a23bb7251988da474eec844b692760cb0a317912291afc77b516f399cff/spacy-2.1.8.tar.gz
patches:
- patches/add-emscripten-cpu.patch

test:
imports:
- spacy
28 changes: 28 additions & 0 deletions packages/spacy/patches/add-emscripten-cpu.patch
@@ -0,0 +1,28 @@
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
index 5edd8f42e..31560eac3 100644
--- a/numpy/core/include/numpy/npy_cpu.h
+++ b/numpy/core/include/numpy/npy_cpu.h
@@ -102,6 +102,8 @@
#define NPY_CPU_ARCEB
#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
#define NPY_CPU_RISCV64
+#elif defined(__EMSCRIPTEN__)
+ #define NPY_CPU_EMSCRIPTEN
#else
#error Unknown CPU, please report this to numpy maintainers with \
information about your platform (OS, CPU and compiler)
include/numpy/npy_endian.h
diff --git a/include/numpy/npy_endian.h b/include/numpy/npy_endian.h
index 649bdb0a6..ec2f6eda5 100644
--- a/include/numpy/npy_endian.h
+++ b/include/numpy/npy_endian.h
@@ -47,7 +47,8 @@
|| defined(NPY_CPU_MIPSEL) \
|| defined(NPY_CPU_PPC64LE) \
|| defined(NPY_CPU_ARCEL) \
- || defined(NPY_CPU_RISCV64)
+ || defined(NPY_CPU_RISCV64) \
+ || defined(NPY_CPU_EMSCRIPTEN)
#define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
#elif defined(NPY_CPU_PPC) \
|| defined(NPY_CPU_SPARC) \

0 comments on commit 6e3a5d2

Please sign in to comment.