[Git][debian-gis-team/python-pyproj][upstream] New upstream version 2.0.1+ds

Bas Couwenberg gitlab at salsa.debian.org
Sun Mar 10 17:04:53 GMT 2019


Bas Couwenberg pushed to branch upstream at Debian GIS Project / python-pyproj


Commits:
7ab0fc66 by Bas Couwenberg at 2019-03-10T16:54:18Z
New upstream version 2.0.1+ds
- - - - -


9 changed files:

- .travis.yml
- − Changelog
- MANIFEST.in
- − build-wheels.sh
- pyproj/__init__.py
- pyproj/_proj.pyx
- requirements-dev.txt
- setup.py
- sphinx/history.rst


Changes:

=====================================
.travis.yml
=====================================
@@ -76,19 +76,21 @@ install:
   - pip install "pip>=10.0.1"
   - PYPROJ_FULL_COVERAGE=YES pip install -e .
   - pip install -r requirements-dev.txt
+  - pip install coveralls
 
 script:
   - python -c "import pyproj; pyproj.Proj(init='epsg:4269')"
-  - nose2 -v
+  - nose2 -v --coverage pyproj --coverage-report xml
 
 after_success:
-# Build manylinux wheels & upload to Rackspace container
-- |
-  if [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$TRAVIS_TAG" == "$TRAVIS_BRANCH" ]; then
-    docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/build-wheels.sh ${PROJSOURCE} ${TRAVIS_PYTHON_VERSION}
-    pip install wheelhouse-uploader
-    python -m wheelhouse_uploader upload --local-folder ${TRAVIS_BUILD_DIR}/wheelhouse/ --no-update-index wheels
-  fi
+- coveralls
+## Build manylinux wheels & upload to Rackspace container
+#- |
+#  if [ "$TRAVIS_OS_NAME" != "osx" ] && [ "$TRAVIS_TAG" == "$TRAVIS_BRANCH" ]; then
+#    docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/build-wheels.sh ${PROJSOURCE} ${TRAVIS_PYTHON_VERSION}
+#    pip install wheelhouse-uploader
+#    python -m wheelhouse_uploader upload --local-folder ${TRAVIS_BUILD_DIR}/wheelhouse/ --no-update-index wheels
+#  fi
 
 notifications:
   email: false


=====================================
Changelog deleted
=====================================
@@ -1,109 +0,0 @@
-2.0.0
-* Update to PROJ.4 version 6.0.0 & removed support for older PROJ.4 versions.
-* Added pyproj.CRS class.
-* Updated pyproj.Proj & pyproj.transform to accept any input from CRS.from_user_input.
-* Removed internal PROJ.4 source code.
-* Changed default for preserve_units to be True in pyproj.Proj class initialization.
-* Modified logic for searching for the PROJ.4 data directory to not conflict with older versions of PROJ.4.
-* Added pyproject.toml.
-1.9.6
-* fix segfault when inverse projection not defined (issue #43, pull request
-  #44).
-* supports python 3.7
-1.9.5.1
-* fix for issue #42 (compilation error with microsoft visual studio).
-1.9.5
-* update proj4 source to latest github master (commit
-953cc00fd87425395cabe37641cda905c4b587c1).
-* port of basemap fix for input arrays in fortran order 
-* restore inverse Hammer patch that was lost when proj4 source code was updated.
-1.9.4 (git tag v1.9.4rel)
- * migrate to github from googlecode.
- * update proj4 source code from svn r2595 (version 4.9.0RC2).
- * include runtime_library_dirs in setup-proj.py.
- * added to_latlong method (issue 51).
- * fix back azimuth when lon1 and lon2 are identical.
-1.9.3 (svn revision 327)
- * Geod now uses C code adapted from geographiclib now included in proj4 source,
-   instead of pure python code directly from geographiclib.
- * make radians=True work with Geod.npts (issue 47).
- * allow PROJ_DIR env var to control location of proj data (issue 40).
-1.9.2 (svn revision 301)
- * updated proj4 src to 4.8.0 - includes two new map projections (natearth and
-   isea).
-1.9.1 (svn revision 285)
- * restore compatibility with python 2.4/2.5, which was broken by the addition
-   of the geographiclib geodesic module (issue 36).
-1.9.0 (svn revision 282)
- * use pure python geographiclib for geodesic computation codes instead of
- proj4.
- * don't use global variable pj_errno for return codes, use pj_ctx_get_errno
-   instead.
- * use new projCtx structure for thread safety in proj lib.
- * update C source and data from proj4 svn (r2140).
- * add pj_list and pj_ellps module level variables (a dict mapping short
-   names to longer descriptions, e.g. 
-   pyproj.pj_list['aea'] = 'Albers Equal Area').
-1.8.9 (svn revision 222)
- * Python 3 now supported.
- * allow 'EPSG' init (as well as 'epsg'). This only worked on case-insensitive
-   filesystems previously. Fixes issue 6.
- * added inverse to Hammer projection.
- * updated proj.4/src/pj_mutex.c from proj4 svn to fix a threading issue on windows
-   (issue 25). Windows binary installers updated (version 1.8.8-1), courtesy
-   Christoph Gohlke.
- * if inputs are NaNs, return huge number (1.e30).
-1.8.8 (svn revision 196)
- * add extra datum shift files, added test/test_datum.py (fixes issue 22).
-   datum shifts now work correctly in transform function.
-1.8.7 (svn revision 175)
- * reverted pj_init.c to old version (from proj4 4.6.1) because version in
-   4.7.0 includes caching code that can cause segfaults in pyproj (issue 19).
- * added 'preserve_units' keyword to Proj.__init__ to suppress conversion
-   to meters.
-1.8.6 (svn revision 169)
- * now works with ms vs2008, vs2003 (fixed missing isnan).
- * updated to proj 4.7.0 (fixes a problem coexisting with pyqt).
- * allow Geod instance to be initialized using a proj4 string 
-1.8.5 (svn revision 155)
- * allow Proj instance to be initialized using a proj4 string 
-   (instead of just a dict or kwargs).
-1.8.4 (svn revision 151)
- * updated proj4 sources to version 4.6.0
-1.8.3 (svn revision 146):
- * fixed bug in Geod class that caused erroneous error message
-   "undefined inverse geodesic (may be an antipodal point)".
- * fix __reduce__ method of Geod class so instances can be pickled.
- * make sure points outside projection limb are set to 1.e30 on inverse
-   transform (if errcheck=False).
- * fixed small setup.py bug.
- * generate C source with Cython 0.9.6.6 (pycompat.h no longer needed).
-1.8.2:
- * added 'srs' (spatial reference system) instance variable to Proj.
- * instead of returning HUGE_VAL (usually 'inf') when projection not defined
-   and errcheck=False, return 1.e30.
- * added Geod class for geodesic (i.e. Great Circle) computations.
-   Includes doctests (which can be run with pyproj.test()).
- * proj.4 source code now included, thus removing proj.4 lib
-   dependency. Version 4.5.0 is included, with a patch to
-   create an API for geodesic computations.
- * python 2.4 compatibility patch (suggested by Andrew Straw) 
-   from M. v. Loewis:
-   http://mail.python.org/pipermail/python-dev/2006-March/062561.html 
-1.8.1: 
- * if given tuples, returns tuples (instead of lists).
- * test for numpy arrays first.
- * Fixed error in docstring example.
- * README.html contains html docstrings generated by pydoc.
- * Renamed pyproj.so to _pyproj.so, created a new python module
-   called pyproj.py.  Moved as code as possible from _pyproj.so to
-   pyproj.py.
- * docstring examples now executed by doctest when 'pyproj.test()' is run.
- * added test to _pyproj.c which defines Py_ssize_t for python < 2.5. 
-   This is necessary when pyrex 0.9.5 is used.
-1.8.0: 
- * Better error handling Proj.__init__.
- * Added optional keyword 'errcheck' to __call__ method. 
- * If True, an exception is raised if the transformation is invalid.
-1.7.3: 
- * python 2.5 support.


=====================================
MANIFEST.in
=====================================
@@ -2,7 +2,6 @@ include README.md
 include MANIFEST.in
 include pyproject.toml
 include LICENSE
-include Changelog
 include create_docs.sh
 include pyproj/*.pyd
 include pyproj/*.pyx


=====================================
build-wheels.sh deleted
=====================================
@@ -1,30 +0,0 @@
-#!/bin/bash
-# Run this command to build the wheels:
-# docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/build-wheels.sh 6.0.0 36
-set -e -x
-
-# install updated auditwheel
-/opt/python/cp36-cp36m/bin/pip install git+https://github.com/daa/auditwheel.git@c4b6339 
-
-# Install PROJ.4
-yum install -y sqlite sqlite-devel zlib-devel
-export PROJ_DIR=/io/pyproj/proj_dir
-/io/ci/travis/proj-dl-and-compile $1
-
-# Compile wheels
-export PROJ_WHEEL=true
-for PYBIN in /opt/python/cp${2//\./}*/bin; do
-    "${PYBIN}/pip" install -r /io/requirements-dev.txt
-    "${PYBIN}/pip" wheel /io/ -w wheelhouse/
-done
-
-# Bundle external shared libraries into the wheels
-for whl in wheelhouse/*.whl; do
-    auditwheel repair "$whl" -w /io/wheelhouse/
-done
-
-# Install packages and test
-for PYBIN in /opt/python/cp${2//\./}*/bin/; do
-    "${PYBIN}/pip" install pyproj --no-index -f /io/wheelhouse
-    (cd "$HOME"; "${PYBIN}/python" -c "import pyproj; pyproj.Proj(init='epsg:4269')" )
-done


=====================================
pyproj/__init__.py
=====================================
@@ -47,7 +47,7 @@ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """
-__version__ = "2.0.0"
+__version__ = "2.0.1"
 __all__ = ["Proj", "Geod", "CRS", "transform", "itransform", "pj_ellps", "pj_list"]
 
 import re


=====================================
pyproj/_proj.pyx
=====================================
@@ -261,6 +261,12 @@ cdef class TransProj:
         self.projctx = NULL
 
     def __init__(self, p1, p2):
+        # set up the context
+        self.projctx = proj_context_create()
+        py_data_dir = cstrencode(get_data_dir())
+        cdef const char* data_dir = py_data_dir
+        proj_context_set_search_paths(self.projctx, 1, &data_dir)
+
         self.projpj = proj_create_crs_to_crs(
             self.projctx,
             TransProj.definition_from_object(p1),


=====================================
requirements-dev.txt
=====================================
@@ -1,6 +1,6 @@
 cython>=0.28.4
 mock
-nose2
+nose2[coverage_plugin]>=0.6.5
 pytest
 cov-core
 coverage>=4.0


=====================================
setup.py
=====================================
@@ -10,13 +10,14 @@ from glob import glob
 from setuptools import Extension, setup
 
 # Use Cython if available.
-try:
-    from Cython.Build import cythonize
-except ImportError:
-    sys.exit(
-        "ERROR: Cython.Build.cythonize not found. "
-        "Cython is required to build from a repo."
-    )
+if "clean" not in sys.argv:
+    try:
+        from Cython.Build import cythonize
+    except ImportError:
+        sys.exit(
+            "ERROR: Cython.Build.cythonize not found. "
+            "Cython is required to build from a repo."
+        )
 
 
 PROJ_MIN_VERSION = (6, 0, 0)
@@ -57,86 +58,89 @@ if os.environ.get("PROJ_WHEEL") is not None and os.path.exists(INTERNAL_PROJ_DIR
         os.path.join(BASE_INTERNAL_PROJ_DIR, "share", "proj", "*")
     )
 
-if proj_dir is None and os.path.exists(INTERNAL_PROJ_DIR):
-    proj_dir = INTERNAL_PROJ_DIR
-    print("Internally compiled directory being used {}.".format(INTERNAL_PROJ_DIR))
-elif proj_dir is None and not os.path.exists(INTERNAL_PROJ_DIR):
-    proj = find_executable("proj")
-    if proj is None:
-        sys.exit("Proj executable not found. Please set PROJ_DIR variable.")
-    proj_dir = os.path.dirname(os.path.dirname(proj))
-elif proj_dir is not None and os.path.exists(proj_dir):
-    print("PROJ_DIR is set, using existing proj4 installation..\n")
-else:
-    sys.exit("ERROR: Invalid path for PROJ_DIR {}".format(proj_dir))
+if "clean" not in sys.argv:
+    if proj_dir is None and os.path.exists(INTERNAL_PROJ_DIR):
+        proj_dir = INTERNAL_PROJ_DIR
+        print("Internally compiled directory being used {}.".format(INTERNAL_PROJ_DIR))
+    elif proj_dir is None and not os.path.exists(INTERNAL_PROJ_DIR):
+        proj = find_executable("proj")
+        if proj is None:
+            sys.exit("Proj executable not found. Please set PROJ_DIR variable.")
+        proj_dir = os.path.dirname(os.path.dirname(proj))
+    elif proj_dir is not None and os.path.exists(proj_dir):
+        print("PROJ_DIR is set, using existing proj4 installation..\n")
+    else:
+        sys.exit("ERROR: Invalid path for PROJ_DIR {}".format(proj_dir))
 
-# check_proj_version
-check_proj_version(proj_dir)
+    # check_proj_version
+    check_proj_version(proj_dir)
 
-# Configure optional Cython coverage.
-cythonize_options = {"language_level": sys.version_info[0]}
-if os.environ.get("PYPROJ_FULL_COVERAGE"):
-    cythonize_options["compiler_directives"] = {"linetrace": True}
-    cythonize_options["annotate"] = True
+    # Configure optional Cython coverage.
+    cythonize_options = {"language_level": sys.version_info[0]}
+    if os.environ.get("PYPROJ_FULL_COVERAGE"):
+        cythonize_options["compiler_directives"] = {"linetrace": True}
+        cythonize_options["annotate"] = True
 
 
-proj_libdir = os.environ.get("PROJ_LIBDIR")
-libdirs = []
-if proj_libdir is None:
-    libdir_search_paths = (
-        os.path.join(proj_dir, "lib"),
-        os.path.join(proj_dir, "lib64"),
-    )
-    for libdir_search_path in libdir_search_paths:
-        if os.path.exists(libdir_search_path):
-            libdirs.append(libdir_search_path)
-    if not libdirs:
-        sys.exit("ERROR: PROJ_LIBDIR dir not found. Please set PROJ_LIBDIR.")
-else:
-    libdirs.append(proj_libdir)
+    proj_libdir = os.environ.get("PROJ_LIBDIR")
+    libdirs = []
+    if proj_libdir is None:
+        libdir_search_paths = (
+            os.path.join(proj_dir, "lib"),
+            os.path.join(proj_dir, "lib64"),
+        )
+        for libdir_search_path in libdir_search_paths:
+            if os.path.exists(libdir_search_path):
+                libdirs.append(libdir_search_path)
+        if not libdirs:
+            sys.exit("ERROR: PROJ_LIBDIR dir not found. Please set PROJ_LIBDIR.")
+    else:
+        libdirs.append(proj_libdir)
 
-if os.environ.get("PROJ_WHEEL") is not None and os.path.exists(
-    os.path.join(BASE_INTERNAL_PROJ_DIR, "lib")
-):
-    package_data["pyproj"].append(os.path.join(BASE_INTERNAL_PROJ_DIR, "lib", "*"))
+    if os.environ.get("PROJ_WHEEL") is not None and os.path.exists(
+        os.path.join(BASE_INTERNAL_PROJ_DIR, "lib")
+    ):
+        package_data["pyproj"].append(os.path.join(BASE_INTERNAL_PROJ_DIR, "lib", "*"))
 
 
-proj_incdir = os.environ.get("PROJ_INCDIR")
-incdirs = []
-if proj_incdir is None:
-    if os.path.exists(os.path.join(proj_dir, "include")):
-        incdirs.append(os.path.join(proj_dir, "include"))
+    proj_incdir = os.environ.get("PROJ_INCDIR")
+    incdirs = []
+    if proj_incdir is None:
+        if os.path.exists(os.path.join(proj_dir, "include")):
+            incdirs.append(os.path.join(proj_dir, "include"))
+        else:
+            sys.exit("ERROR: PROJ_INCDIR dir not found. Please set PROJ_INCDIR.")
     else:
-        sys.exit("ERROR: PROJ_INCDIR dir not found. Please set PROJ_INCDIR.")
+        incdirs.append(proj_incdir)
+
+    libraries = ["proj"]
+    if os.name == "nt":
+        for libdir in libdirs:
+            projlib = glob(os.path.join(libdir, "proj*.lib"))
+            if projlib:
+                libraries = [os.path.basename(projlib[0]).split(".lib")[0]]
+                break
+
+    ext_options = dict(
+        include_dirs=incdirs,
+        library_dirs=libdirs,
+        runtime_library_dirs=libdirs if os.name != "nt" else None,
+        libraries=libraries,
+    )
+    if os.name != "nt":
+        ext_options["embedsignature"] = True
+
+    ext_modules = cythonize(
+        [
+            Extension("pyproj._proj", ["pyproj/_proj.pyx"], **ext_options),
+            Extension("pyproj._geod", ["pyproj/_geod.pyx"], **ext_options),
+            Extension("pyproj._crs", ["pyproj/_crs.pyx"], **ext_options),
+        ],
+        quiet=True,
+        **cythonize_options
+    )
 else:
-    incdirs.append(proj_incdir)
-
-libraries = ["proj"]
-if os.name == "nt":
-    for libdir in libdirs:
-        projlib = glob(os.path.join(libdir, "proj*.lib"))
-        if projlib:
-            libraries = [os.path.basename(projlib[0]).split(".lib")[0]]
-            break
-
-ext_options = dict(
-    include_dirs=incdirs,
-    library_dirs=libdirs,
-    runtime_library_dirs=libdirs if os.name != "nt" else None,
-    libraries=libraries,
-)
-if os.name != "nt":
-    ext_options["embedsignature"] = True
-
-ext_modules = cythonize(
-    [
-        Extension("pyproj._proj", ["pyproj/_proj.pyx"], **ext_options),
-        Extension("pyproj._geod", ["pyproj/_geod.pyx"], **ext_options),
-        Extension("pyproj._crs", ["pyproj/_crs.pyx"], **ext_options),
-    ],
-    quiet=True,
-    **cythonize_options
-)
+    ext_modules = []
 
 # retreive pyproj version information (stored in _proj.pyx) in version variable
 # (taken from Fiona)


=====================================
sphinx/history.rst
=====================================
@@ -1,5 +1,9 @@
 Change Log
 ==========
+2.0.1
+~~~~~
+* Ensure data path set properly for TransProj (pull request #179, addressed
+  issue #176).
 
 2.0.0
 ~~~~~



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/commit/7ab0fc66e5f804a33ae6d668dc79ef759cd73396

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/commit/7ab0fc66e5f804a33ae6d668dc79ef759cd73396
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190310/2be4ede7/attachment-0001.html>


More information about the Pkg-grass-devel mailing list