Skip to content

Commit

Permalink
Preserve CRLFs in patch files
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsmith committed Dec 18, 2023
1 parent 1ab5ecd commit 772c3cc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
2 changes: 2 additions & 0 deletions server/pypi/packages/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Preserve CRLFs in patch files, otherwise they won't apply. For example, see jpegio.
*/patches/** -text
36 changes: 18 additions & 18 deletions server/pypi/packages/jpegio/patches/chaquopy.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
--- src-original/setup.py 2021-10-15 14:26:07.000000000 +0000
+++ src/setup.py 2023-01-30 15:30:10.166631599 +0000
@@ -11,6 +11,10 @@
import platform
import glob

+# Chaquopy
+import builtins
+builtins.__NUMPY_SETUP__ = True # Prevent the compiled parts from being imported.
+
import numpy

incs = ["."]
import platform
import glob

+# Chaquopy
+import builtins
+builtins.__NUMPY_SETUP__ = True # Prevent the compiled parts from being imported.
+
import numpy

incs = ["."]
@@ -40,7 +44,7 @@
largs.append('-stdlib=libc++')
largs.append('-mmacosx-version-min=10.9')

-if arch == 'x64':
+if False and arch == 'x64': # Chaquopy: let the compiler use its default number of bits.
cargs.append('-m64')

DIR_LIBJPEG_HEADER = pjoin(DIR_ROOT,"jpegio", "libjpeg", "include")
largs.append('-stdlib=libc++')
largs.append('-mmacosx-version-min=10.9')

-if arch == 'x64':
+if False and arch == 'x64': # Chaquopy: let the compiler use its default number of bits.
cargs.append('-m64')

DIR_LIBJPEG_HEADER = pjoin(DIR_ROOT,"jpegio", "libjpeg", "include")

0 comments on commit 772c3cc

Please sign in to comment.