Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Cython 0.22 #373

Merged
merged 2 commits into from
May 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions rasterio/_features.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ cdef class GeomBuilder:


cdef class OGRGeomBuilder:
cdef void * _createOgrGeometry(self, int geom_type)
cdef void * _createOgrGeometry(self, int geom_type) except NULL
cdef _addPointToGeometry(self, void *cogr_geometry, object coordinate)
cdef void * _buildPoint(self, object coordinates)
cdef void * _buildLineString(self, object coordinates)
cdef void * _buildLinearRing(self, object coordinates)
cdef void * _buildPolygon(self, object coordinates)
cdef void * _buildMultiPoint(self, object coordinates)
cdef void * _buildMultiLineString(self, object coordinates)
cdef void * _buildMultiPolygon(self, object coordinates)
cdef void * _buildGeometryCollection(self, object coordinates)
cdef void * build(self, object geom)
cdef void * _buildPoint(self, object coordinates) except NULL
cdef void * _buildLineString(self, object coordinates) except NULL
cdef void * _buildLinearRing(self, object coordinates) except NULL
cdef void * _buildPolygon(self, object coordinates) except NULL
cdef void * _buildMultiPoint(self, object coordinates) except NULL
cdef void * _buildMultiLineString(self, object coordinates) except NULL
cdef void * _buildMultiPolygon(self, object coordinates) except NULL
cdef void * _buildGeometryCollection(self, object coordinates) except NULL
cdef void * build(self, object geom) except NULL
11 changes: 10 additions & 1 deletion rasterio/_io.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,16 @@ log.addHandler(NullHandler())
cdef bint in_dtype_range(value, dtype):
"""Returns True if value is in the range of dtype, else False."""
infos = {
'c': np.finfo, 'f': np.finfo, 'i': np.iinfo, 'u': np.iinfo}
'c': np.finfo,
'f': np.finfo,
'i': np.iinfo,
'u': np.iinfo,
# Cython 0.22 returns dtype.kind as an int and will not cast to a char
99: np.finfo,
102: np.finfo,
105: np.iinfo,
117: np.iinfo
}
rng = infos[np.dtype(dtype).kind](dtype)
return rng.min <= value <= rng.max

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
affine
cligj
coveralls>=0.4
cython==0.21.2
cython>=0.21.2
delocate
enum34
numpy>=1.8.0
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def copy_data_tree(datadir, destdir):
copy_data_tree(projdatadir, 'rasterio/proj_data')

ext_options = dict(
extra_compile_args=['-Wno-unused-parameter', '-Wno-unused-function'],
include_dirs=include_dirs,
library_dirs=library_dirs,
libraries=libraries,
Expand Down