forked from SciTools/cf-units
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
73 lines (47 loc) · 2.25 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
You can either install cf-units using the conda package manager or from source.
Installing using conda
----------------------
cf-units is available using conda for the following platforms:
* Linux 32-bit and 64-bit,
* Mac OSX 64-bit, and
* Windows 32-bit and 64-bit.
To install cf-units using conda, you must first download and install conda,
for example from https://conda.io/miniconda.html.
Once conda is installed, you can install cf-units using conda on any platform with
the following command::
conda install -c conda-forge cf-units
Further documentation on using conda and the features it provides can be found
at https://conda.io/docs/.
Installing from source
----------------------
The latest cf-units source release is available from
https://github.com/SciTools/cf-units/releases.
Build and runtime requirements
==============================
See the ``requirements/`` directory for the external packages you will need to
have installed before installing and running cf-units.
The recommended way to provision requirements is using Conda::
conda env create -f requirements/cf-units.yml
All requirements except ``udunits2`` are also available individually via PyPI::
pip install numpy
Many of the packages are also available in Linux package managers
such as aptitude and yum. For example, it may be possible to install
Numpy using::
apt-get install python-numpy
Installing cf-units
===================
Once you have satisfied the requirements detailed above, extract the cf-units
source package, change to the new directory, and enter::
pip install .
For non-standard locations, additional build lib & include paths
can be provided as per-usual at ``build_ext`` phase::
pip install --global-option=build_ext --global-option="-I/path/to/include2 --global-option="-L/path/to/lib" .
Custom site configuration
=========================
The default site configuration values can be overridden by creating the file
``cf_units/etc/site.cfg``. For example, the following snippet can be used to
specify a non-standard location for your udunits xml database::
[System]
udunits2_xml_path = /path/to/udunits2.xml
An example configuration file is available in ``cf_units/etc/site.cfg.template``.
See :py:func:`cf_units.config` for further configuration options.