Skip to content
Commits on Source (12)
......@@ -23,22 +23,6 @@ matrix:
- os: linux
compiler: gcc
env: USE_PYTHON_VERSION=3
- os: osx
osx_image: xcode6.4
compiler: clang
env: USE_PYTHON_VERSION=2 PYTHON_SUFFIX=2 BOOST_PYTHON_OPTION=
- os: osx
osx_image: xcode6.4
compiler: clang
env: USE_PYTHON_VERSION=3 PYTHON_SUFFIX=3 BOOST_PYTHON_OPTION="--with-python3 --without-python"
- os: osx
osx_image: xcode7
compiler: clang
env: USE_PYTHON_VERSION=2 PYTHON_SUFFIX= BOOST_PYTHON_OPTION=
- os: osx
osx_image: xcode7
compiler: clang
env: USE_PYTHON_VERSION=3 PYTHON_SUFFIX=3 BOOST_PYTHON_OPTION="--with-python3 --without-python"
# http://docs.travis-ci.com/user/apt/
addons:
......@@ -61,7 +45,9 @@ addons:
install:
- git clone --quiet --depth 1 https://github.com/osmcode/libosmium.git ../libosmium
- git clone --quiet --depth 1 https://github.com/mapbox/protozero.git ../protozero
- if [ "$TRAVIS_OS_NAME" = 'osx' ]; then
brew update;
brew install python$PYTHON_SUFFIX google-sparsehash;
brew install boost-python $BOOST_PYTHON_OPTION;
pip$PYTHON_SUFFIX install -q nose mock;
......
......@@ -12,6 +12,18 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
## [2.14.0] - 2018-03-31
### Added
### Changed
- use current libosmium
- install protozero separately from libosmium
- installation documentation updated
### Fixed
## [2.13.0] - 2017-08-31
### Added
......
......@@ -7,28 +7,55 @@ manner.
[![Travis Build Status](https://api.travis-ci.org/osmcode/pyosmium.svg)](http://travis-ci.org/osmcode/pyosmium)
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/osmcode/pyosmium?svg=true)](https://ci.appveyor.com/project/Mapbox/pyosmium)
## Dependencies
Python >= 2.7 is supported but a version >= 3.3 is strongly recommended.
You'll need Python setuptools. On Debian/Ubuntu install `python-setuptools`.
pyosmium uses [Boost.Python](http://www.boost.org/doc/libs/1_56_0/libs/python/doc/index.html)
to create the bindings. On Debian/Ubuntu install `libboost-python-dev`. OS X run
`brew install boost-python` or `brew install boost-python --with-python3`
depending on which python version you want to use. You can also (re)install
both.
Other requirements are:
Other dependencies are expat, libz, libbz2 and Boost iterator.
See [Libosmium dependencies](http://osmcode.org/libosmium/manual.html#dependencies)
for required packages for various distributions.
* Python setuptools
* [Boost.Python](http://www.boost.org/doc/libs/1_56_0/libs/python/doc/index.html)
* protozero, expat, libz, libbz2 and Boost iterator
(see also [Libosmium dependencies](http://osmcode.org/libosmium/manual.html#dependencies))
* a recent C++ compiler (Clang 3.4+, GCC 4.8+)
You have to compile with the same compiler version python is compiled with on
You have to compile with the same compiler version that Python is compiled with on
your system, otherwise it might not work.
### Debian/Ubuntu
On Debian/Ubuntu systems all required dependencies can be installed with:
sudo apt-get install build-essential libboost-python-dev \
libexpat1-dev zlib1g-dev libbz2-dev
### Homebrew (OS X)
On OS x Boost.Python needs to be installed with
`brew install boost-python` or `brew install boost-python3`
depending on which Python version you want to use. You can also (re)install
both.
## Installation
### Using Pip
The recommended way to install pyosmium is via pip:
pip install osmium
There are also experimental binary wheels for Windows available.
### Compiling from Source
When compiling from source, you need to get the latest libosmium version
first. It is recommended to put it next to the pyosmium source. The setup
script uses per default either a globally installed libosmium or
looks for the source in `../libosmium`. You can set a custom location with
`LIBOSMIUM_PREFIX`.
To use a custom boost installation, set `BOOST_PREFIX`.
To compile the bindings, run
python setup.py build
......@@ -43,11 +70,6 @@ to install only for your user, or
to install globally.
The setup script uses per default either a globally installed libosmium or
looks for the source in `../libosmium`. You can set a custom location with
`LIBOSMIUM_PREFIX`.
To use a custom boost installation, set `BOOST_PREFIX`.
## Examples
......
......@@ -20,6 +20,7 @@ install:
- python --version
- cd c:\dev
- git clone --depth 10 https://github.com/osmcode/libosmium.git
- git clone --depth 10 https://github.com/mapbox/protozero.git
- dir c:\dev
- IF NOT EXIST pyosmium_libs_Release.7z ECHO downloading dependencies pack... && powershell Invoke-WebRequest https://github.com/alex85k/pyosmium_libs/releases/download/0.3/%DEVPACK% -OutFile %DEVPACK%
- cd c:\
......
pyosmium (2.14.0-1~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports.
* Revert pybuild build directory path for stretch builds.
-- Bas Couwenberg <sebastic@debian.org> Fri, 06 Apr 2018 07:33:23 +0200
pyosmium (2.14.0-1) unstable; urgency=medium
* New upstream release.
* Update copyright-format URL to use HTTPS.
* Update Vcs-* URLs for Salsa.
* Bump Standards-Version to 4.1.3, no changes.
* Bump minimum required libosmium2-dev to 2.14.0.
* Update pybuild build directory path.
-- Bas Couwenberg <sebastic@debian.org> Sat, 31 Mar 2018 21:54:05 +0200
pyosmium (2.13.0-1~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports.
......
......@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 9),
libexpat1-dev,
libgdal-dev,
libgeos++-dev,
libosmium2-dev (>= 2.13.1),
libosmium2-dev (>= 2.14.0),
libsparsehash-dev,
python-all-dev,
python-setuptools,
......@@ -23,9 +23,9 @@ Build-Depends: debhelper (>= 9),
python3-nose,
python3-sphinx,
python3-sphinxcontrib.autoprogram
Standards-Version: 4.0.0
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/pyosmium.git/
Vcs-Git: https://anonscm.debian.org/git/pkg-grass/pyosmium.git -b stretch-backports
Standards-Version: 4.1.3
Vcs-Browser: https://salsa.debian.org/debian-gis-team/pyosmium/
Vcs-Git: https://salsa.debian.org/debian-gis-team/pyosmium.git -b stretch-backports
Homepage: http://osmcode.org/pyosmium/
Package: pyosmium
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: PyOsmium
Upstream-Contact: Osmium Developers (http://osmcode.org/contact)
Source: https://github.com/osmcode/pyosmium
......
......@@ -18,6 +18,10 @@ class My_sdist(orig_sdist):
tarball = 'https://github.com/osmcode/libosmium/archive/v%s.tar.gz' % libosmium_version
print("Downloading and adding libosmium sources from", tarball)
call('cd %s && wget -O - -q %s | tar xz' % (base_dir, tarball), shell=True)
# checkout protozero in the required version
tarball = 'https://github.com/mapbox/protozero/archive/v%s.tar.gz' % protozero_version
print("Downloading and adding protozero sources from", tarball)
call('cd %s && wget -O - -q %s | tar xz' % (base_dir, tarball), shell=True)
def get_versions():
""" Read the version file.
......@@ -31,9 +35,9 @@ def get_versions():
# Execute the code in version.py.
exec(compile(version_file.read(), version_py, 'exec'), v)
return v['pyosmium_release'], v['libosmium_version']
return v['pyosmium_release'], v['libosmium_version'], v['protozero_version']
pyosmium_release, libosmium_version = get_versions()
pyosmium_release, libosmium_version, protozero_version = get_versions()
## boost dependencies
boost_prefix = os.environ.get('BOOST_PREFIX',
......@@ -110,6 +114,12 @@ else:
else:
print("Using global libosmium.")
### protozero dependencies
for prefix in [ 'protozero-' + protozero_version, '../protozero' ]:
if os.path.isfile(os.path.join(prefix, 'include/protozero/version.hpp')):
print("protozero found in '%s'" % prefix)
includes.insert(0, os.path.join(prefix, 'include'))
if osplatform == "win32" :
osmium_libs = ('expat', 'zlib', 'bzip2', 'ws2_32')
extra_compile_args = [ '-DWIN32_LEAN_AND_MEAN', '-D_CRT_SECURE_NO_WARNINGS', '-DNOMINMAX', '/wd4996', '/EHsc' ]
......
......@@ -3,9 +3,11 @@ Version information.
"""
# the major version
pyosmium_major = '2.13'
pyosmium_major = '2.14'
# current release (Pip version)
pyosmium_release = '2.13.0'
pyosmium_release = '2.14.0'
# libosmium version shipped with the Pip release
libosmium_version = '2.13.1'
libosmium_version = '2.14.0'
# protozero version shipped with the Pip release
protozero_version = '1.6.2'