-
Notifications
You must be signed in to change notification settings - Fork 41
Installation
Installation instructions are also described in the site.
These prerequisites are very standard packages which are often installed by default on Linux distributions. But make sure you have them anyway.
First you need to install setuptools (as root):
$ apt-get install python-setuptools # for debian
$ yum install python-setuptools.noarch # for fedora
Then you need some basics compilation stuff to compile dependencies (also as root):
$ apt-get install python-dev g++ # for debian
$ yum install python-devel gcc-c++ # for fedora
You can install it from PyPI with:
$ easy_install --user -U GeoBases
If you want the development version, clone the project from github:
$ git clone https://github.com/opentraveldata/geobases.git
Then install the package and its dependencies:
$ cd geobases
$ python setup.py install --user # for user space
A standalone script is put in ~/.local/bin
, to benefit from it, put
that in your ~/.bashrc
or ~/.zshrc
:
export PATH=$PATH:$HOME/.local/bin
export BACKGROUND_COLOR=black # or 'white', your call
There is Python 3 and Pypy (not so) experimental support, you can try it by changing branch before installation.
For Python 3, you have to install setuptools and python3-dev as prerequisites, then:
$ git checkout 3000
$ python3 setup.py install --user
For Pypy, after pypy and pypy-dev installation:
$ git checkout pypy
$ sudo pypy setup.py install
After version 4.23, the command line tool should work on Windows. You can clone the repository using GitHub for Windows, then use tools -> open a shell here to open a shell in the cloned sources.
Then you can install it like this, for example with Python 2.6:
> C:\Python26\python.exe .\setup.py install
> C:\Python26\scripts\GeoBase -h
If you have trouble compiling the dependencies, you can try switching to the pypy branch, who only has pure python dependencies.
If you use zsh and want to benefit from the autocomplete, add this to
your ~/.zshrc
:
# Add custom completion scripts
fpath=(~/.zsh/completion $fpath)
autoload -U compinit
compinit
Run the tests with:
$ python test/test_GeoBases.py -v
Now you can read the Quickstart or directly go to the [[Python examples]] and the Command line examples!