Skip to content

Commit

Permalink
Updated the patch
Browse files Browse the repository at this point in the history
  • Loading branch information
hmaarrfk committed Oct 7, 2018
1 parent d825ce1 commit 4bd7e47
Showing 1 changed file with 147 additions and 1 deletion.
148 changes: 147 additions & 1 deletion recipe/1-cpp-cython.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 6255a7eefd6662e584f595bfea178e2a405f893f Mon Sep 17 00:00:00 2001
From: Mark Harfouche <mark.harfouche@gmail.com>
Date: Sun, 7 Oct 2018 14:09:31 -0400
Subject: [PATCH] MAINT: ensure that all cpp cython code is declared to
Subject: [PATCH 1/2] MAINT: ensure that all cpp cython code is declared to
distutils.

---
Expand Down Expand Up @@ -105,3 +105,149 @@ index 574ca82..9c1bf8c 100644
cdef class VertexSource:
"""An object which supplies vertex pairs and other information to
low-level drawing routines.

From e05adb752de05ee89354e73ac4ca10dd510bc4d8 Mon Sep 17 00:00:00 2001
From: Mark Harfouche <mark.harfouche@gmail.com>
Date: Sun, 7 Oct 2018 17:20:12 -0400
Subject: [PATCH 2/2] More CPP stuff

---
celiagg/_enums.pxd | 2 ++
celiagg/_paint.pxd | 2 ++
celiagg/_transform.pxd | 1 +
celiagg/conversion.pxi | 2 ++
celiagg/enums.pxi | 2 ++
celiagg/font.pxi | 1 +
celiagg/image.pxi | 2 ++
celiagg/ndarray_canvas.pxi | 2 ++
celiagg/paint.pxi | 2 ++
celiagg/transform.pxi | 1 +
10 files changed, 17 insertions(+)

diff --git a/celiagg/_enums.pxd b/celiagg/_enums.pxd
index f090314..ce943fe 100644
--- a/celiagg/_enums.pxd
+++ b/celiagg/_enums.pxd
@@ -22,6 +22,8 @@
#
# Authors: John Wiggins

+# distutils: language=c++
+
cdef extern from "font.h" namespace "Font":
cdef enum FontCacheType:
RasterFontCache
diff --git a/celiagg/_paint.pxd b/celiagg/_paint.pxd
index af5f200..25b8793 100644
--- a/celiagg/_paint.pxd
+++ b/celiagg/_paint.pxd
@@ -22,6 +22,8 @@
#
# Authors: John Wiggins

+# distutils: language=c++
+
cimport _enums
cimport _image
cimport _transform
diff --git a/celiagg/_transform.pxd b/celiagg/_transform.pxd
index 7519f73..ec1c541 100644
--- a/celiagg/_transform.pxd
+++ b/celiagg/_transform.pxd
@@ -22,6 +22,7 @@
#
# Authors: John Wiggins

+# distutils: language=c++

cdef extern from "agg_trans_affine.h" namespace "agg":

diff --git a/celiagg/conversion.pxi b/celiagg/conversion.pxi
index 562222a..539dcf3 100644
--- a/celiagg/conversion.pxi
+++ b/celiagg/conversion.pxi
@@ -22,6 +22,8 @@
#
# Authors: John Wiggins

+# distutils: language=c++
+
cdef _get_component_indices(fmt):
order_map = {
(0, 0, 0, 0): (PixelFormat.Gray8, PixelFormat.Gray16, PixelFormat.Gray32),
diff --git a/celiagg/enums.pxi b/celiagg/enums.pxi
index 3790d0d..a1758b2 100644
--- a/celiagg/enums.pxi
+++ b/celiagg/enums.pxi
@@ -22,6 +22,8 @@
#
# Authors: John Wiggins

+# distutils: language=c++
+
cpdef enum PixelFormat:
Gray8 = _enums.k_PixelFormatGray8
Gray16 = _enums.k_PixelFormatGray16
diff --git a/celiagg/font.pxi b/celiagg/font.pxi
index 1f958fb..7dff249 100644
--- a/celiagg/font.pxi
+++ b/celiagg/font.pxi
@@ -22,6 +22,7 @@
#
# Authors: John Wiggins

+# distutils: language=c++

cpdef enum FontCacheType:
RasterFontCache = _enums.RasterFontCache
diff --git a/celiagg/image.pxi b/celiagg/image.pxi
index 9c95f2c..3c6088c 100644
--- a/celiagg/image.pxi
+++ b/celiagg/image.pxi
@@ -22,6 +22,8 @@
#
# Authors: John Wiggins

+# distutils: language=c++
+
cimport numpy as np

ctypedef _image.Image* img_ptr_t
diff --git a/celiagg/ndarray_canvas.pxi b/celiagg/ndarray_canvas.pxi
index ae4cb3b..9a469f2 100644
--- a/celiagg/ndarray_canvas.pxi
+++ b/celiagg/ndarray_canvas.pxi
@@ -22,6 +22,8 @@
#
# Authors: Erik Hvatum <ice.rikh@gmail.com>

+# distutils: language=c++
+
cimport numpy

ctypedef unsigned char _bytes_t
diff --git a/celiagg/paint.pxi b/celiagg/paint.pxi
index d7f1541..d0cdbed 100644
--- a/celiagg/paint.pxi
+++ b/celiagg/paint.pxi
@@ -22,6 +22,8 @@
#
# Authors: John Wiggins

+# distutils: language=c++
+
cpdef enum GradientSpread:
SpreadPad = _enums.k_GradientSpreadPad
SpreadReflect = _enums.k_GradientSpreadReflect
diff --git a/celiagg/transform.pxi b/celiagg/transform.pxi
index e601aa7..9221588 100644
--- a/celiagg/transform.pxi
+++ b/celiagg/transform.pxi
@@ -22,6 +22,7 @@
#
# Authors: John Wiggins

+# distutils: language=c++

cdef class Transform:
"""Transform(sx=1.0, shy=0.0, shx=0.0, sy=1.0, tx=0.0, ty=0.0)

0 comments on commit 4bd7e47

Please sign in to comment.