Skip to content

Commit 2754196

Browse files
committed
Fix and delegate installation instructions to documentation
1 parent e39291b commit 2754196

File tree

2 files changed

+12
-47
lines changed

2 files changed

+12
-47
lines changed

README.md

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,9 @@ on PyPI and can be installed with [`pip`]:
1111
python -m pip install basemap
1212
```
1313

14-
Otherwise, you will need to install `basemap` from its source hosted
15-
on GitHub as indicated in the following steps:
16-
17-
1. Install pre-requisite Python modules:
18-
- [cython](https://github.com/cython/cython)
19-
- [numpy](https://github.com/numpy/numpy)
20-
21-
2. Download the `basemap` source code:
22-
```sh
23-
git clone --depth 1 https://github.com/matplotlib/basemap.git
24-
```
25-
26-
3. Build the [GEOS](https://github.com/libgeos/geos) library. You may
27-
use the helper provided in `utils`, (please note that you need
28-
[`CMake`](https://cmake.org/) and a working C compiler in advance):
29-
```sh
30-
export GEOS_DIR=<your desired location>
31-
python -c "import utils; utils.GeosLibrary('3.6.5').build(installdir='${GEOS_DIR}')"
32-
```
33-
or you can link directly to the system library if it is already
34-
installed. `GEOS_DIR` must point to the GEOS installation prefix;
35-
e.g. if `libgeos_c.so` is located in `/usr/lib` and `geos_c.h` is
36-
located in `/usr/include`, then you must set `GEOS_DIR` to `/usr`.
37-
38-
4. Build and install the `basemap` binary wheel:
39-
```sh
40-
python -m pip install .
41-
```
42-
On Linux, if your Python was installed through a package management
43-
system, make sure that you have the Python header `Python.h` required
44-
to build Cython extensions (e.g. on Debian-like systems, you should
45-
have the package `python-dev` installed).
46-
47-
5. Check that the package was installed correctly by executing:
48-
```sh
49-
python -c "from mpl_toolkits.basemap import Basemap"
50-
```
14+
For specific details on how to install `basemap` through `conda` or
15+
from source, please refer to the [`basemap` installation instructions]
16+
in the documentation.
5117

5218
## Requirements
5319

@@ -118,6 +84,9 @@ https://pypi.org/project/basemap-data-hires
11884
[`OWSLib`]:
11985
https://pypi.org/project/OWSLib
12086

87+
[`basemap` installation instructions]:
88+
https://matplotlib.org/basemap/stable/users/installation.html
89+
12190
[MIT]:
12291
https://spdx.org/licenses/MIT.html
12392
[LGPL-2.1-only]:

doc/source/users/installation.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ Installation
44
Installing from PyPI
55
--------------------
66

7-
Precompiled binary wheels for Windows and GNU/Linux are available in
8-
PyPI (architectures x86 and x64, Python 2.7 and 3.5+) and can be
9-
installed with `pip`_:
7+
Precompiled binary wheels for Windows, GNU/Linux and MacOS are available
8+
on PyPI and can be installed with `pip`_:
109

1110
.. code-block:: sh
1211
1312
python -m pip install basemap
1413
15-
Installing ``basemap`` will also install ``basemap-data``, containing the
16-
minimal data assets required by ``basemap``. If you also need the
14+
Installing ``basemap`` will also install ``basemap-data``, containing
15+
the minimal data assets required by ``basemap``. If you also need the
1716
high-resolution data assets, you can install them with `pip`_ too:
1817

1918
.. code-block:: sh
@@ -24,8 +23,7 @@ Installing from conda-forge
2423
---------------------------
2524

2625
For Miniforge users, ``basemap`` packages are available through the
27-
``conda-forge`` channel for Windows and GNU/Linux (x64) as well as
28-
for MacOS (x64 and arm64):
26+
``conda-forge`` channel:
2927

3028
.. code-block:: sh
3129
@@ -49,13 +47,11 @@ on GitHub as indicated in the following steps:
4947
- `cython`_
5048
- `numpy`_
5149

52-
2. Download the ``basemap`` source code and move to the
53-
``packages/basemap`` folder:
50+
2. Download the ``basemap`` source code:
5451

5552
.. code-block:: sh
5653
5754
git clone --depth 1 https://github.com/matplotlib/basemap.git
58-
cd basemap/packages/basemap
5955
6056
3. Build the `GEOS`_ library. You may use the helper provided in the
6157
``utils`` folder (please note that you need `CMake`_ and a working

0 commit comments

Comments
 (0)