-
Notifications
You must be signed in to change notification settings - Fork 12
/
INSTALL.txt
134 lines (87 loc) · 2.84 KB
/
INSTALL.txt
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Requirements (libndtypes)
=========================
Unless libndtypes has already been installed in the system directories,
it is recommended to clone libndtypes into the xnd directory.
Get ndtypes
-----------
git clone https://github.com/plures/ndtypes.git
For building libxnd only
------------------------
cd ndtypes
./configure
make
cd ..
For building the xnd Python module
----------------------------------
# This also builds libndtypes and copies the ndtypes Python package into
# the python directory next to the xnd package.
cd ndtypes
python3 setup.py install --local=../python
cd ..
Unix: libxnd build instructions
===============================
# Build
./configure
make
# Test
make check
# Install
make install
# Clean
make clean
# Distclean
make distclean
Windows: libxnd build instructions
==================================
See vcbuild/INSTALL.txt.
Unix/Windows: Python module build instructions
==============================================
To avoid shared library mismatches, the Python module builds with an rpath
and ships the library inside the package.
Unless you are a distributor with tight control over the system library
versions, it is not recommended to install the library for the Python
module.
Build all
---------
# Build libxnd and the module (libxnd is copied into the package)
python3 setup.py build
# Test
python3 setup.py test
# Doctest (optional, relies on Sphinx)
python3 setup.py doctest
# Install
python3 setup.py install
# Clean libxnd and the module
python3 setup.py distclean
Build the module only (for developing)
--------------------------------------
First, build libxnd as above. This also copies the shared library into
the package. Then, to avoid rebuilding the library repeatedly, use:
# Build the module
python3 setup.py module
# Clean the module
python3 setup.py clean
Alternative install (for developing)
------------------------------------
# Install the package into a local directory. This is mainly useful for
# developing gufuncs:
python3 setup.py install --local="$PWD/../python"
# Windows:
python.exe setup.py install --local="%cd%\..\python"
Alternative install with conda (for developing)
-----------------------------------------------
# Install the xnd package into a local directory.
# Create and activate a new conda environment:
conda create --name xnd python=3.7
conda activate xnd
# Use conda to install ndtypes (if you also want to work on ndtypes, please
# check the project repository https://github.com/plures/ndtypes):
conda install -c xnd/label/dev ndtypes
# Use conda to install numpy (optional, some tests require the library):
conda install numpy
# Use conda to build libxnd and xnd:
conda build .conda/libxnd -c xnd/label/dev
conda build .conda/xnd -c xnd/label/dev
# Use conda to install the local version of the library and the
# Python module:
conda install --use-local xnd