Skip to content

Commit

Permalink
Merge 8700d7a into 263e283
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed Feb 10, 2019
2 parents 263e283 + 8700d7a commit 35acb9c
Show file tree
Hide file tree
Showing 293 changed files with 11,116 additions and 99,707 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
@@ -1,2 +1,2 @@
src/* linguist-vendored
proj.4/src/* linguist-vendored
nad2bin.c linguist-vendored
21 changes: 6 additions & 15 deletions .gitignore
Expand Up @@ -4,20 +4,11 @@ nad2bin*
*.o
*.pyc
*.so
_proj.c
*.c*
.coverage
dist/
lib/pyproj.egg-info/
lib/pyproj/data/FL
lib/pyproj/data/MD
lib/pyproj/data/TN
lib/pyproj/data/WI
lib/pyproj/data/WO
lib/pyproj/data/alaska
lib/pyproj/data/conus
lib/pyproj/data/hawaii
lib/pyproj/data/null
lib/pyproj/data/prvi
lib/pyproj/data/stgeorge
lib/pyproj/data/stlrnc
lib/pyproj/data/stpaul
venv/
pyproj.egg-info/
pyproj/proj_dir/
pyproj/datadir.py.save
.idea/
63 changes: 43 additions & 20 deletions .travis.yml
Expand Up @@ -7,46 +7,69 @@ cache: pip
env:
global:
- PROJSOURCE=builtin

# External version of PROJ.4 installed:
# * 4.9.2 is installed due to it having easy binary install on
# Ubuntu Linux 16.04 Long Term Support (LTS) (April 2016).
# * git repository test for future compatibility changes to PROJ.4 may
# be caught early.
- CYTHON_COVERAGE=True
matrix:
include:
- language: cpp
os: osx
env:
- PYTHON=3.6
- PROJSOURCE=git
- python: 2.7
env:
- PROJSOURCE=git
- python: 3.4
env:
- PROJSOURCE=4.9.2
env:
- PROJSOURCE=git
- python: 3.5
env:
- PROJSOURCE=git
- python: 3.6
env:
- PROJSOURCE=git
- python: 3.7
dist: xenial
sudo: true
env:
- PROJSOURCE=git
- python: "nightly"
env:
env:
- PROJSOURCE=git

allow_failures:
- python: "nightly"

- env: PROJSOURCE=git

before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install sqlite3 wget openssl readline
# from https://pythonhosted.org/CodeChat/.travis.yml.html
brew outdated pyenv || brew upgrade pyenv
# virtualenv doesn't work without pyenv knowledge. venv in Python 3.3
# doesn't provide Pip by default. So, use `pyenv-virtualenv <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_.
brew install pyenv-virtualenv
pyenv install $PYTHON
# I would expect something like ``pyenv init; pyenv local $PYTHON`` or
# ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to
# modify the Bash environment. ??? So, I hand-set the variables instead.
export PYENV_VERSION=$PYTHON
export PATH="/Users/travis/.pyenv/shims:${PATH}"
pyenv-virtualenv venv
source venv/bin/activate
# A manual check that the correct version of Python is running.
python --version
else
sudo apt-get install -qq sqlite3 libsqlite3-dev
fi
- pip install -r requirements-dev.txt

- echo "PROJSOURCE is $PROJSOURCE"
- pwd
# Download external PROJ.4 version and compile
- |
if [[ $PROJSOURCE == "git" || $PROJSOURCE =~ "4."* ]]; then
ci/travis/proj-dl-and-compile "$PROJSOURCE"
export PROJ_DIR="/tmp/proj_dl_install"
fi
- export PROJ_DIR=/tmp/proj_dl_install
- ci/travis/proj-dl-and-compile "$PROJSOURCE"
- export PROJ_DATA=$PROJ_DIR/share/proj

# add line to the top of _proj.pyx enabling coverage for Cython code
- ./ci/travis/add_line_proj_pyx.sh

install:
# coverage report requires a local install
- PYPROJ_FULL_COVERAGE=YES pip install -e .
Expand Down
2 changes: 1 addition & 1 deletion Changelog
Expand Up @@ -41,7 +41,7 @@
* allow 'EPSG' init (as well as 'epsg'). This only worked on case-insensitive
filesystems previously. Fixes issue 6.
* added inverse to Hammer projection.
* updated src/pj_mutex.c from proj4 svn to fix a threading issue on windows
* 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).
Expand Down
16 changes: 6 additions & 10 deletions MANIFEST.in
@@ -1,18 +1,11 @@
include README.md
include MANIFEST.in
include LICENSE_proj4
include LICENSE
include Changelog
include create_docs.sh
include _proj.pyx
include _proj.c
include nad2bin.c
include src/*.c
include src/*.h
include src/*diff
include lib/pyproj/*py
include lib/pyproj/data/*
include datumgrid/*.lla
include pyproj/*.pyd
include pyproj/*.pyx
include pyproj/*.pxi
include test/test.py
include test/test2.py
include test/sample.out
Expand All @@ -22,3 +15,6 @@ include test/geodtest.py
include test/test_datum.py
recursive-include docs *
recursive-include unittest *
prune proj.4/*
prune pyproj/proj_dir
prune */__pycache__/
31 changes: 19 additions & 12 deletions README.md
Expand Up @@ -3,20 +3,32 @@ pyproj

Installation
------------

* clone github repo or download source release at http://python.org/pypi/pyproj.
* If you clone the github repo, [Cython](http://cython.org/) is a dependency.
* python setup.py build
* python setup.py install (with sudo if necessary).
* [Cython](http://cython.org/) is required for the installation.

#### Setup PROJ.4

To use proj4 lib (and data files) that are already installed on the system,
set PROJ_DIR environment variable to point to location of proj4 installation
before running setup.py. If PROJ_DIR is not set, the bundled proj4
source code and data files are used.
Follow installation instructions at: https://github.com/OSGeo/proj.4

Next, set the PROJ_DIR environment variable to point to location of proj4 installation before running setup.py if it is not already on the PATH.

Examples of how to set the PROJ_DIR environment variable:

* Windows - `C:\...> set PROJ_DIR=C:\OSGeo4W\`
* Linux/OS X on most shells- `$ export PROJ_DIR=/lib/`


#### Setup pyproj

From github:
* python setup.py build
* python setup.py install (with sudo if necessary).

From pypi:
* pip install pyproj


Testing
-------
[nose2](https://github.com/nose-devs/nose2) is required to run some tests.
Expand Down Expand Up @@ -52,11 +64,6 @@ Travis-CI should be set up to measure this automatically.
pip install -r requirements-dev.txt
```

* Add this line to top of _proj.pyx
```
# cython: linetrace=True
```

* Set the environment variable PYPROJ_FULL_COVERAGE to any value. This
is only needed for installation. Most platforms `$ export PYPROJ_FULL_COVERGAGE=1`.
Windows: `C:...> set PYPROJ_FULL_COVERGAGE=1`,
Expand Down

0 comments on commit 35acb9c

Please sign in to comment.