shapely 1.5.1__tar.gz → 1.5.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {Shapely-1.5.1 → Shapely-1.5.3}/CHANGES.txt +10 -0
- {Shapely-1.5.1/Shapely.egg-info → Shapely-1.5.3}/PKG-INFO +34 -4
- {Shapely-1.5.1 → Shapely-1.5.3}/README.rst +23 -3
- {Shapely-1.5.1 → Shapely-1.5.3/Shapely.egg-info}/PKG-INFO +34 -4
- {Shapely-1.5.1 → Shapely-1.5.3}/Shapely.egg-info/SOURCES.txt +1 -0
- Shapely-1.5.3/VERSION.txt +1 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/setup.py +75 -2
- Shapely-1.5.3/shapely/__init__.py +1 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geos.py +18 -11
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/ops.py +1 -1
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/speedups/_speedups.c +22 -27
- Shapely-1.5.3/shapely/vectorized/_vectorized.c +20897 -0
- Shapely-1.5.1/VERSION.txt +0 -1
- Shapely-1.5.1/shapely/__init__.py +0 -1
- {Shapely-1.5.1 → Shapely-1.5.3}/CREDITS.txt +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/LICENSE.txt +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/Shapely.egg-info/dependency_links.txt +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/Shapely.egg-info/top_level.txt +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/docs/design.rst +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/docs/index.rst +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/docs/manual.rst +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/docs/project.rst +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/setup.cfg +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/_geos.pxi +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/affinity.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/algorithms/__init__.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/algorithms/cga.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/coords.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/ctypes_declarations.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/examples/__init__.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/examples/dissolve.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/examples/geoms.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/examples/intersect.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/ftools.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/__init__.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/base.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/collection.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/geo.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/linestring.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/multilinestring.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/multipoint.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/multipolygon.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/point.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/polygon.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/geometry/proxy.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/impl.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/iterops.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/linref.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/predicates.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/prepared.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/speedups/__init__.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/strtree.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/topology.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/validation.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/vectorized/__init__.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/vectorized/_vectorized.pyx +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/wkb.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/shapely/wkt.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/__init__.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/binascii_hex.txt +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/conftest.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_affinity.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_box.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_cga.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_collection.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_coords.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_delaunay.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_delegated.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_dlls.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_doctests.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_emptiness.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_equality.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_geointerface.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_geomseq.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_getitem.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_hash.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_invalid_geometries.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_iterops.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_linear_referencing.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_linemerge.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_linestring.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_locale.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_mapping.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_multilinestring.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_multipoint.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_multipolygon.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_ndarrays.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_nearest.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_operations.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_operators.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_persist.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_pickle.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_point.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_polygon.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_polygonize.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_predicates.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_prepared.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_products_z.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_singularity.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_snap.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_strtree.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_styles.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_transform.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_union.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_validation.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_vectorized.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/test_xy.py +0 -0
- {Shapely-1.5.1 → Shapely-1.5.3}/tests/threading_test.py +0 -0
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
Changes
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
1.5.3 (2015-01-12)
|
|
5
|
+
------------------
|
|
6
|
+
- Fixed ownership and potential memory leak in polygonize (#223).
|
|
7
|
+
- Wider release of binary wheels for OS X.
|
|
8
|
+
|
|
9
|
+
1.5.2 (2015-01-04)
|
|
10
|
+
------------------
|
|
11
|
+
- Fail installation if GEOS dependency is not met, preventing update breakage
|
|
12
|
+
(#218, #219).
|
|
13
|
+
|
|
4
14
|
1.5.1 (2014-12-04)
|
|
5
15
|
------------------
|
|
6
16
|
- Restore geometry hashing (#209).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.3
|
|
4
4
|
Summary: Geometric objects, predicates, and operations
|
|
5
5
|
Home-page: https://github.com/Toblerity/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
@@ -33,10 +33,10 @@ Description: =======
|
|
|
33
33
|
Requirements
|
|
34
34
|
============
|
|
35
35
|
|
|
36
|
-
Shapely 1.5 requires
|
|
36
|
+
Shapely 1.5.x requires
|
|
37
37
|
|
|
38
38
|
* Python >=2.6 (including Python 3.x)
|
|
39
|
-
* GEOS >=3.3 (Shapely 1.2 requires only GEOS 3.1 but YMMV)
|
|
39
|
+
* GEOS >=3.3 (Shapely 1.2.x requires only GEOS 3.1 but YMMV)
|
|
40
40
|
|
|
41
41
|
Installing Shapely
|
|
42
42
|
==================
|
|
@@ -50,7 +50,27 @@ Description: =======
|
|
|
50
50
|
|
|
51
51
|
.. code-block:: console
|
|
52
52
|
|
|
53
|
-
$ pip install
|
|
53
|
+
$ pip install shapely
|
|
54
|
+
|
|
55
|
+
If you've installed GEOS to a non-standard location, you can use the
|
|
56
|
+
geos-config program to find compiler and linker options.
|
|
57
|
+
|
|
58
|
+
.. code-block:: console
|
|
59
|
+
|
|
60
|
+
$ CFLAGS=`geos-config --cflags` LDFLAGS=`geos-config --clibs` pip install shapely
|
|
61
|
+
|
|
62
|
+
If your system's GEOS version is < 3.3.0 you cannot use Shapely 1.3+ and must
|
|
63
|
+
stick to 1.2.x as shown below.
|
|
64
|
+
|
|
65
|
+
.. code-block:: console
|
|
66
|
+
|
|
67
|
+
$ pip install shapely<1.3
|
|
68
|
+
|
|
69
|
+
Or, if you're using pip 6+
|
|
70
|
+
|
|
71
|
+
.. code-block:: console
|
|
72
|
+
|
|
73
|
+
$ pip install shapely~=1.2
|
|
54
74
|
|
|
55
75
|
Shapely is also provided by popular Python distributions like Canopy (Enthought)
|
|
56
76
|
and Anaconda (Continuum Analytics).
|
|
@@ -195,6 +215,16 @@ Description: =======
|
|
|
195
215
|
Changes
|
|
196
216
|
=======
|
|
197
217
|
|
|
218
|
+
1.5.3 (2015-01-12)
|
|
219
|
+
------------------
|
|
220
|
+
- Fixed ownership and potential memory leak in polygonize (#223).
|
|
221
|
+
- Wider release of binary wheels for OS X.
|
|
222
|
+
|
|
223
|
+
1.5.2 (2015-01-04)
|
|
224
|
+
------------------
|
|
225
|
+
- Fail installation if GEOS dependency is not met, preventing update breakage
|
|
226
|
+
(#218, #219).
|
|
227
|
+
|
|
198
228
|
1.5.1 (2014-12-04)
|
|
199
229
|
------------------
|
|
200
230
|
- Restore geometry hashing (#209).
|
|
@@ -25,10 +25,10 @@ but can be readily integrated with packages that are. For more details, see:
|
|
|
25
25
|
Requirements
|
|
26
26
|
============
|
|
27
27
|
|
|
28
|
-
Shapely 1.5 requires
|
|
28
|
+
Shapely 1.5.x requires
|
|
29
29
|
|
|
30
30
|
* Python >=2.6 (including Python 3.x)
|
|
31
|
-
* GEOS >=3.3 (Shapely 1.2 requires only GEOS 3.1 but YMMV)
|
|
31
|
+
* GEOS >=3.3 (Shapely 1.2.x requires only GEOS 3.1 but YMMV)
|
|
32
32
|
|
|
33
33
|
Installing Shapely
|
|
34
34
|
==================
|
|
@@ -42,7 +42,27 @@ system library path, and install Shapely from the Python package index.
|
|
|
42
42
|
|
|
43
43
|
.. code-block:: console
|
|
44
44
|
|
|
45
|
-
$ pip install
|
|
45
|
+
$ pip install shapely
|
|
46
|
+
|
|
47
|
+
If you've installed GEOS to a non-standard location, you can use the
|
|
48
|
+
geos-config program to find compiler and linker options.
|
|
49
|
+
|
|
50
|
+
.. code-block:: console
|
|
51
|
+
|
|
52
|
+
$ CFLAGS=`geos-config --cflags` LDFLAGS=`geos-config --clibs` pip install shapely
|
|
53
|
+
|
|
54
|
+
If your system's GEOS version is < 3.3.0 you cannot use Shapely 1.3+ and must
|
|
55
|
+
stick to 1.2.x as shown below.
|
|
56
|
+
|
|
57
|
+
.. code-block:: console
|
|
58
|
+
|
|
59
|
+
$ pip install shapely<1.3
|
|
60
|
+
|
|
61
|
+
Or, if you're using pip 6+
|
|
62
|
+
|
|
63
|
+
.. code-block:: console
|
|
64
|
+
|
|
65
|
+
$ pip install shapely~=1.2
|
|
46
66
|
|
|
47
67
|
Shapely is also provided by popular Python distributions like Canopy (Enthought)
|
|
48
68
|
and Anaconda (Continuum Analytics).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: Shapely
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.3
|
|
4
4
|
Summary: Geometric objects, predicates, and operations
|
|
5
5
|
Home-page: https://github.com/Toblerity/Shapely
|
|
6
6
|
Author: Sean Gillies
|
|
@@ -33,10 +33,10 @@ Description: =======
|
|
|
33
33
|
Requirements
|
|
34
34
|
============
|
|
35
35
|
|
|
36
|
-
Shapely 1.5 requires
|
|
36
|
+
Shapely 1.5.x requires
|
|
37
37
|
|
|
38
38
|
* Python >=2.6 (including Python 3.x)
|
|
39
|
-
* GEOS >=3.3 (Shapely 1.2 requires only GEOS 3.1 but YMMV)
|
|
39
|
+
* GEOS >=3.3 (Shapely 1.2.x requires only GEOS 3.1 but YMMV)
|
|
40
40
|
|
|
41
41
|
Installing Shapely
|
|
42
42
|
==================
|
|
@@ -50,7 +50,27 @@ Description: =======
|
|
|
50
50
|
|
|
51
51
|
.. code-block:: console
|
|
52
52
|
|
|
53
|
-
$ pip install
|
|
53
|
+
$ pip install shapely
|
|
54
|
+
|
|
55
|
+
If you've installed GEOS to a non-standard location, you can use the
|
|
56
|
+
geos-config program to find compiler and linker options.
|
|
57
|
+
|
|
58
|
+
.. code-block:: console
|
|
59
|
+
|
|
60
|
+
$ CFLAGS=`geos-config --cflags` LDFLAGS=`geos-config --clibs` pip install shapely
|
|
61
|
+
|
|
62
|
+
If your system's GEOS version is < 3.3.0 you cannot use Shapely 1.3+ and must
|
|
63
|
+
stick to 1.2.x as shown below.
|
|
64
|
+
|
|
65
|
+
.. code-block:: console
|
|
66
|
+
|
|
67
|
+
$ pip install shapely<1.3
|
|
68
|
+
|
|
69
|
+
Or, if you're using pip 6+
|
|
70
|
+
|
|
71
|
+
.. code-block:: console
|
|
72
|
+
|
|
73
|
+
$ pip install shapely~=1.2
|
|
54
74
|
|
|
55
75
|
Shapely is also provided by popular Python distributions like Canopy (Enthought)
|
|
56
76
|
and Anaconda (Continuum Analytics).
|
|
@@ -195,6 +215,16 @@ Description: =======
|
|
|
195
215
|
Changes
|
|
196
216
|
=======
|
|
197
217
|
|
|
218
|
+
1.5.3 (2015-01-12)
|
|
219
|
+
------------------
|
|
220
|
+
- Fixed ownership and potential memory leak in polygonize (#223).
|
|
221
|
+
- Wider release of binary wheels for OS X.
|
|
222
|
+
|
|
223
|
+
1.5.2 (2015-01-04)
|
|
224
|
+
------------------
|
|
225
|
+
- Fail installation if GEOS dependency is not met, preventing update breakage
|
|
226
|
+
(#218, #219).
|
|
227
|
+
|
|
198
228
|
1.5.1 (2014-12-04)
|
|
199
229
|
------------------
|
|
200
230
|
- Restore geometry hashing (#209).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.5.3
|
|
@@ -2,15 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import print_function
|
|
4
4
|
|
|
5
|
+
import ctypes
|
|
6
|
+
import ctypes.util
|
|
5
7
|
try:
|
|
6
8
|
# If possible, use setuptools
|
|
7
9
|
from setuptools import setup
|
|
8
10
|
from setuptools.extension import Extension
|
|
9
11
|
from setuptools.command.build_ext import build_ext as distutils_build_ext
|
|
12
|
+
from setuptools.command.install import install
|
|
10
13
|
except ImportError:
|
|
11
14
|
from distutils.core import setup
|
|
12
15
|
from distutils.extension import Extension
|
|
13
16
|
from distutils.command.build_ext import build_ext as distutils_build_ext
|
|
17
|
+
from distutils.command.install import install
|
|
14
18
|
from distutils.cmd import Command
|
|
15
19
|
from distutils.errors import CCompilerError, DistutilsExecError, \
|
|
16
20
|
DistutilsPlatformError
|
|
@@ -19,6 +23,7 @@ import errno
|
|
|
19
23
|
import glob
|
|
20
24
|
import os
|
|
21
25
|
import platform
|
|
26
|
+
import re
|
|
22
27
|
import shutil
|
|
23
28
|
import subprocess
|
|
24
29
|
import sys
|
|
@@ -53,6 +58,74 @@ with open('CHANGES.txt', 'r', **open_kwds) as fp:
|
|
|
53
58
|
|
|
54
59
|
long_description = readme + '\n\n' + credits + '\n\n' + changes
|
|
55
60
|
|
|
61
|
+
# Fail installation if we can't find a GEOS shared library with the right
|
|
62
|
+
# version. We ship it with Shapely for Windows, so no need to check on that
|
|
63
|
+
# platform. Code below copied from shapely/geos.py.
|
|
64
|
+
class InstallCommand(install):
|
|
65
|
+
|
|
66
|
+
def run(self):
|
|
67
|
+
def load_dll(libname, fallbacks=None):
|
|
68
|
+
lib = ctypes.util.find_library(libname)
|
|
69
|
+
if lib is not None:
|
|
70
|
+
try:
|
|
71
|
+
return ctypes.CDLL(lib)
|
|
72
|
+
except OSError:
|
|
73
|
+
pass
|
|
74
|
+
if fallbacks is not None:
|
|
75
|
+
for name in fallbacks:
|
|
76
|
+
try:
|
|
77
|
+
return ctypes.CDLL(name)
|
|
78
|
+
except OSError:
|
|
79
|
+
# move on to the next fallback
|
|
80
|
+
pass
|
|
81
|
+
# No shared library was loaded. Raise OSError.
|
|
82
|
+
raise OSError(
|
|
83
|
+
"Could not find library %s or load any of its variants %s" % (
|
|
84
|
+
libname, fallbacks or []))
|
|
85
|
+
|
|
86
|
+
if sys.platform.startswith('linux'):
|
|
87
|
+
_lgeos = load_dll(
|
|
88
|
+
'geos_c', fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
|
|
89
|
+
elif sys.platform == 'darwin':
|
|
90
|
+
if hasattr(sys, 'frozen'):
|
|
91
|
+
# .app file from py2app
|
|
92
|
+
alt_paths = [os.path.join(os.environ['RESOURCEPATH'],
|
|
93
|
+
'..', 'Frameworks', 'libgeos_c.dylib')]
|
|
94
|
+
else:
|
|
95
|
+
alt_paths = [
|
|
96
|
+
# The Framework build from Kyng Chaos:
|
|
97
|
+
"/Library/Frameworks/GEOS.framework/Versions/Current/GEOS",
|
|
98
|
+
# macports
|
|
99
|
+
'/opt/local/lib/libgeos_c.dylib',
|
|
100
|
+
]
|
|
101
|
+
_lgeos = load_dll('geos_c', fallbacks=alt_paths)
|
|
102
|
+
elif sys.platform == 'sunos5':
|
|
103
|
+
_lgeos = load_dll(
|
|
104
|
+
'geos_c', fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
|
|
105
|
+
else: # other *nix systems
|
|
106
|
+
_lgeos = load_dll(
|
|
107
|
+
'geos_c', fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
|
|
108
|
+
|
|
109
|
+
GEOSversion = _lgeos.GEOSversion
|
|
110
|
+
GEOSversion.restype = ctypes.c_char_p
|
|
111
|
+
GEOSversion.argtypes = []
|
|
112
|
+
geos_version_string = GEOSversion()
|
|
113
|
+
if sys.version_info[0] >= 3:
|
|
114
|
+
geos_version_string = geos_version_string.decode('ascii')
|
|
115
|
+
res = re.findall(r'(\d+)\.(\d+)\.(\d+)', geos_version_string)
|
|
116
|
+
assert len(res) == 2, res
|
|
117
|
+
geos_version = tuple(int(x) for x in res[0])
|
|
118
|
+
shapely_version = tuple(int(x) for x in version.split('.'))
|
|
119
|
+
|
|
120
|
+
if shapely_version >= (1, 3):
|
|
121
|
+
if geos_version >= (3, 3):
|
|
122
|
+
install.run(self)
|
|
123
|
+
else:
|
|
124
|
+
print(
|
|
125
|
+
"Shapely >= 1.3 requires GEOS >= 3.3. "
|
|
126
|
+
"Install GEOS 3.3+ and reinstall Shapely.")
|
|
127
|
+
sys.exit(1)
|
|
128
|
+
|
|
56
129
|
setup_args = dict(
|
|
57
130
|
name = 'Shapely',
|
|
58
131
|
version = version,
|
|
@@ -74,7 +147,7 @@ setup_args = dict(
|
|
|
74
147
|
'shapely.speedups',
|
|
75
148
|
'shapely.vectorized',
|
|
76
149
|
],
|
|
77
|
-
cmdclass = {},
|
|
150
|
+
cmdclass = {'install': InstallCommand},
|
|
78
151
|
classifiers = [
|
|
79
152
|
'Development Status :: 5 - Production/Stable',
|
|
80
153
|
'Intended Audience :: Developers',
|
|
@@ -89,7 +162,7 @@ setup_args = dict(
|
|
|
89
162
|
data_files = [('shapely', ['shapely/_geos.pxi'])]
|
|
90
163
|
)
|
|
91
164
|
|
|
92
|
-
# Add DLLs
|
|
165
|
+
# Add DLLs to Windows packages.
|
|
93
166
|
if sys.platform == 'win32':
|
|
94
167
|
try:
|
|
95
168
|
os.mkdir('shapely/DLLs')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.5.3"
|
|
@@ -60,18 +60,25 @@ if sys.platform.startswith('linux'):
|
|
|
60
60
|
free.restype = None
|
|
61
61
|
|
|
62
62
|
elif sys.platform == 'darwin':
|
|
63
|
-
if
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
# First test to see if this is a delocated wheel with a GEOS dylib.
|
|
64
|
+
geos_whl_dylib = os.path.abspath(
|
|
65
|
+
os.path.join(os.path.dirname(__file__), '.dylibs/GEOS'))
|
|
66
|
+
if os.path.exists(geos_whl_dylib):
|
|
67
|
+
_lgeos = CDLL(geos_whl_dylib)
|
|
67
68
|
else:
|
|
68
|
-
|
|
69
|
-
#
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
if hasattr(sys, 'frozen'):
|
|
70
|
+
# .app file from py2app
|
|
71
|
+
alt_paths = [os.path.join(os.environ['RESOURCEPATH'],
|
|
72
|
+
'..', 'Frameworks', 'libgeos_c.dylib')]
|
|
73
|
+
else:
|
|
74
|
+
alt_paths = [
|
|
75
|
+
# The Framework build from Kyng Chaos
|
|
76
|
+
"/Library/Frameworks/GEOS.framework/Versions/Current/GEOS",
|
|
77
|
+
# macports
|
|
78
|
+
'/opt/local/lib/libgeos_c.dylib',
|
|
79
|
+
]
|
|
80
|
+
_lgeos = load_dll('geos_c', fallbacks=alt_paths)
|
|
81
|
+
|
|
75
82
|
free = load_dll('c').free
|
|
76
83
|
free.argtypes = [c_void_p]
|
|
77
84
|
free.restype = None
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated by Cython 0.21 */
|
|
1
|
+
/* Generated by Cython 0.21.2 */
|
|
2
2
|
|
|
3
3
|
#define PY_SSIZE_T_CLEAN
|
|
4
4
|
#ifndef CYTHON_USE_PYLONG_INTERNALS
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
|
|
20
20
|
#error Cython requires Python 2.6+ or Python 3.2+.
|
|
21
21
|
#else
|
|
22
|
-
#define CYTHON_ABI "
|
|
22
|
+
#define CYTHON_ABI "0_21_2"
|
|
23
23
|
#include <stddef.h>
|
|
24
24
|
#ifndef offsetof
|
|
25
25
|
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
|
|
@@ -73,8 +73,6 @@
|
|
|
73
73
|
#if PY_MAJOR_VERSION >= 3
|
|
74
74
|
#define Py_TPFLAGS_CHECKTYPES 0
|
|
75
75
|
#define Py_TPFLAGS_HAVE_INDEX 0
|
|
76
|
-
#endif
|
|
77
|
-
#if PY_MAJOR_VERSION >= 3
|
|
78
76
|
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
|
|
79
77
|
#endif
|
|
80
78
|
#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
|
|
@@ -101,10 +99,12 @@
|
|
|
101
99
|
#if CYTHON_COMPILING_IN_PYPY
|
|
102
100
|
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
|
|
103
101
|
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
|
|
102
|
+
#define __Pyx_PyFrozenSet_Size(s) PyObject_Size(s)
|
|
104
103
|
#else
|
|
105
104
|
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
|
|
106
105
|
#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
|
|
107
106
|
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
|
|
107
|
+
#define __Pyx_PyFrozenSet_Size(s) PySet_Size(s)
|
|
108
108
|
#endif
|
|
109
109
|
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
|
|
110
110
|
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
|
|
@@ -151,6 +151,11 @@
|
|
|
151
151
|
#if PY_MAJOR_VERSION >= 3
|
|
152
152
|
#define PyBoolObject PyLongObject
|
|
153
153
|
#endif
|
|
154
|
+
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
|
|
155
|
+
#ifndef PyUnicode_InternFromString
|
|
156
|
+
#define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
|
|
157
|
+
#endif
|
|
158
|
+
#endif
|
|
154
159
|
#if PY_VERSION_HEX < 0x030200A4
|
|
155
160
|
typedef long Py_hash_t;
|
|
156
161
|
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
|
|
@@ -160,7 +165,9 @@
|
|
|
160
165
|
#define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
|
|
161
166
|
#endif
|
|
162
167
|
#if PY_MAJOR_VERSION >= 3
|
|
163
|
-
#define
|
|
168
|
+
#define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
|
|
169
|
+
#else
|
|
170
|
+
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
|
|
164
171
|
#endif
|
|
165
172
|
#ifndef CYTHON_INLINE
|
|
166
173
|
#if defined(__GNUC__)
|
|
@@ -3206,12 +3213,10 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
3206
3213
|
*/
|
|
3207
3214
|
__pyx_t_4 = (GEOSisClosed_r(__pyx_v_handle, __pyx_v_g) != 0);
|
|
3208
3215
|
if (__pyx_t_4) {
|
|
3209
|
-
goto __pyx_L8_next_and;
|
|
3210
3216
|
} else {
|
|
3211
3217
|
__pyx_t_5 = __pyx_t_4;
|
|
3212
3218
|
goto __pyx_L7_bool_binop_done;
|
|
3213
3219
|
}
|
|
3214
|
-
__pyx_L8_next_and:;
|
|
3215
3220
|
__pyx_t_4 = ((__pyx_v_m >= 4) != 0);
|
|
3216
3221
|
__pyx_t_5 = __pyx_t_4;
|
|
3217
3222
|
__pyx_L7_bool_binop_done:;
|
|
@@ -3605,20 +3610,16 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
3605
3610
|
*/
|
|
3606
3611
|
__pyx_t_5 = (((__pyx_v_cp[0]) != (__pyx_v_cp[(__pyx_v_sm * (__pyx_v_m - 1))])) != 0);
|
|
3607
3612
|
if (!__pyx_t_5) {
|
|
3608
|
-
goto __pyx_L22_next_or;
|
|
3609
3613
|
} else {
|
|
3610
3614
|
__pyx_t_4 = __pyx_t_5;
|
|
3611
3615
|
goto __pyx_L21_bool_binop_done;
|
|
3612
3616
|
}
|
|
3613
|
-
__pyx_L22_next_or:;
|
|
3614
3617
|
__pyx_t_5 = (((__pyx_v_cp[__pyx_v_sn]) != (__pyx_v_cp[((__pyx_v_sm * (__pyx_v_m - 1)) + __pyx_v_sn)])) != 0);
|
|
3615
3618
|
if (!__pyx_t_5) {
|
|
3616
|
-
goto __pyx_L23_next_or;
|
|
3617
3619
|
} else {
|
|
3618
3620
|
__pyx_t_4 = __pyx_t_5;
|
|
3619
3621
|
goto __pyx_L21_bool_binop_done;
|
|
3620
3622
|
}
|
|
3621
|
-
__pyx_L23_next_or:;
|
|
3622
3623
|
|
|
3623
3624
|
/* "shapely/speedups/_speedups.pyx":236
|
|
3624
3625
|
* # If not, we'll have to close the ring later
|
|
@@ -3629,12 +3630,10 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
3629
3630
|
*/
|
|
3630
3631
|
__pyx_t_5 = ((__pyx_v_n == 3) != 0);
|
|
3631
3632
|
if (__pyx_t_5) {
|
|
3632
|
-
goto __pyx_L24_next_and;
|
|
3633
3633
|
} else {
|
|
3634
3634
|
__pyx_t_4 = __pyx_t_5;
|
|
3635
3635
|
goto __pyx_L21_bool_binop_done;
|
|
3636
3636
|
}
|
|
3637
|
-
__pyx_L24_next_and:;
|
|
3638
3637
|
__pyx_t_5 = (((__pyx_v_cp[(2 * __pyx_v_sn)]) != (__pyx_v_cp[((__pyx_v_sm * (__pyx_v_m - 1)) + (2 * __pyx_v_sn))])) != 0);
|
|
3639
3638
|
__pyx_t_4 = __pyx_t_5;
|
|
3640
3639
|
__pyx_L21_bool_binop_done:;
|
|
@@ -4137,12 +4136,10 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4137
4136
|
*/
|
|
4138
4137
|
__pyx_t_4 = ((__pyx_v_m == 3) != 0);
|
|
4139
4138
|
if (!__pyx_t_4) {
|
|
4140
|
-
goto __pyx_L49_next_or;
|
|
4141
4139
|
} else {
|
|
4142
4140
|
__pyx_t_5 = __pyx_t_4;
|
|
4143
4141
|
goto __pyx_L48_bool_binop_done;
|
|
4144
4142
|
}
|
|
4145
|
-
__pyx_L49_next_or:;
|
|
4146
4143
|
__pyx_t_18 = __Pyx_GetItemInt(__pyx_v_ob, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
4147
4144
|
__Pyx_GOTREF(__pyx_t_18);
|
|
4148
4145
|
__pyx_t_6 = __Pyx_GetItemInt(__pyx_t_18, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
@@ -4159,12 +4156,10 @@ static PyObject *__pyx_pf_7shapely_8speedups_9_speedups_4geos_linearring_from_py
|
|
|
4159
4156
|
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
|
|
4160
4157
|
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
|
|
4161
4158
|
if (!__pyx_t_4) {
|
|
4162
|
-
goto __pyx_L50_next_or;
|
|
4163
4159
|
} else {
|
|
4164
4160
|
__pyx_t_5 = __pyx_t_4;
|
|
4165
4161
|
goto __pyx_L48_bool_binop_done;
|
|
4166
4162
|
}
|
|
4167
|
-
__pyx_L50_next_or:;
|
|
4168
4163
|
__pyx_t_18 = __Pyx_GetItemInt(__pyx_v_ob, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
4169
4164
|
__Pyx_GOTREF(__pyx_t_18);
|
|
4170
4165
|
__pyx_t_1 = __Pyx_GetItemInt(__pyx_t_18, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;};
|
|
@@ -6136,20 +6131,16 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6136
6131
|
__Pyx_GOTREF(__pyx_t_9);
|
|
6137
6132
|
__pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_Point, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6138
6133
|
if (!__pyx_t_2) {
|
|
6139
|
-
goto __pyx_L14_next_or;
|
|
6140
6134
|
} else {
|
|
6141
6135
|
__pyx_t_29 = __pyx_t_2;
|
|
6142
6136
|
goto __pyx_L12_bool_binop_done;
|
|
6143
6137
|
}
|
|
6144
|
-
__pyx_L14_next_or:;
|
|
6145
6138
|
__pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_LineString, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6146
6139
|
if (!__pyx_t_2) {
|
|
6147
|
-
goto __pyx_L13_next_or;
|
|
6148
6140
|
} else {
|
|
6149
6141
|
__pyx_t_29 = __pyx_t_2;
|
|
6150
6142
|
goto __pyx_L12_bool_binop_done;
|
|
6151
6143
|
}
|
|
6152
|
-
__pyx_L13_next_or:;
|
|
6153
6144
|
__pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_LinearRing, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6154
6145
|
__pyx_t_29 = __pyx_t_2;
|
|
6155
6146
|
__pyx_L12_bool_binop_done:;
|
|
@@ -6470,12 +6461,10 @@ static PyObject *__pyx_f_7shapely_8speedups_9_speedups_affine_transform(PyObject
|
|
|
6470
6461
|
__pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6471
6462
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
6472
6463
|
if (!__pyx_t_29) {
|
|
6473
|
-
goto __pyx_L19_next_or;
|
|
6474
6464
|
} else {
|
|
6475
6465
|
__pyx_t_2 = __pyx_t_29;
|
|
6476
6466
|
goto __pyx_L18_bool_binop_done;
|
|
6477
6467
|
}
|
|
6478
|
-
__pyx_L19_next_or:;
|
|
6479
6468
|
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_geom, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
6480
6469
|
__Pyx_GOTREF(__pyx_t_9);
|
|
6481
6470
|
__pyx_t_29 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_n_s_GeometryCollection, Py_EQ)); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
|
|
@@ -7427,7 +7416,6 @@ PyMODINIT_FUNC PyInit__speedups(void)
|
|
|
7427
7416
|
if (__pyx_m) {
|
|
7428
7417
|
if (__pyx_d) {
|
|
7429
7418
|
__Pyx_AddTraceback("init shapely.speedups._speedups", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
7430
|
-
Py_DECREF(__pyx_d); __pyx_d = 0;
|
|
7431
7419
|
}
|
|
7432
7420
|
Py_DECREF(__pyx_m); __pyx_m = 0;
|
|
7433
7421
|
} else if (!PyErr_Occurred()) {
|
|
@@ -7980,6 +7968,13 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
|
|
|
7980
7968
|
}
|
|
7981
7969
|
PyErr_SetObject(type, value);
|
|
7982
7970
|
if (tb) {
|
|
7971
|
+
#if CYTHON_COMPILING_IN_PYPY
|
|
7972
|
+
PyObject *tmp_type, *tmp_value, *tmp_tb;
|
|
7973
|
+
PyErr_Fetch(tmp_type, tmp_value, tmp_tb);
|
|
7974
|
+
Py_INCREF(tb);
|
|
7975
|
+
PyErr_Restore(tmp_type, tmp_value, tb);
|
|
7976
|
+
Py_XDECREF(tmp_tb);
|
|
7977
|
+
#else
|
|
7983
7978
|
PyThreadState *tstate = PyThreadState_GET();
|
|
7984
7979
|
PyObject* tmp_tb = tstate->curexc_traceback;
|
|
7985
7980
|
if (tb != tmp_tb) {
|
|
@@ -7987,6 +7982,7 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
|
|
|
7987
7982
|
tstate->curexc_traceback = tb;
|
|
7988
7983
|
Py_XDECREF(tmp_tb);
|
|
7989
7984
|
}
|
|
7985
|
+
#endif
|
|
7990
7986
|
}
|
|
7991
7987
|
bad:
|
|
7992
7988
|
Py_XDECREF(owned_instance);
|
|
@@ -8512,12 +8508,11 @@ static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObj
|
|
|
8512
8508
|
if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
|
|
8513
8509
|
if (type == NULL)
|
|
8514
8510
|
type = (PyObject *)(Py_TYPE(obj));
|
|
8515
|
-
return
|
|
8516
|
-
type, (PyObject *)(Py_TYPE(type)));
|
|
8511
|
+
return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
|
|
8517
8512
|
}
|
|
8518
8513
|
if (obj == Py_None)
|
|
8519
8514
|
obj = NULL;
|
|
8520
|
-
return
|
|
8515
|
+
return __Pyx_PyMethod_New(func, obj, type);
|
|
8521
8516
|
}
|
|
8522
8517
|
static PyObject*
|
|
8523
8518
|
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
|