-
Notifications
You must be signed in to change notification settings - Fork 39
/
install_dd_buddy.sh
executable file
·62 lines (58 loc) · 1.33 KB
/
install_dd_buddy.sh
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
#!/usr/bin/env bash
#
# Install `dd`, including the module
# `dd.buddy`, which is written in Cython.
#
# To run this script, enter in
# a command-line environment:
#
# ./install_dd_buddy.sh
set -v
set -e
# Fetch and build BuDDy
BUDDY_INSTALL_PREFIX=`pwd`
BUDDY_ARCHIVE=buddy-2.4.tar.gz
BUDDY_URL=https://sourceforge.net/projects/buddy/\
files/buddy/BuDDy%202.4/buddy-2.4.tar.gz/download
curl -L $BUDDY_URL -o $BUDDY_ARCHIVE
tar -xzf $BUDDY_ARCHIVE
pushd buddy-*/
./configure \
--prefix=$BUDDY_INSTALL_PREFIX
# as described in
# the README file of BuDDy
make
make install
# by default installs to:
# `/usr/local/include/` and
# `/usr/local/lib/`
#
# The installation location can
# be changed with
# `./configure --prefix=/where/to/install`
export CFLAGS="-I$BUDDY_INSTALL_PREFIX/include"
export LDFLAGS="-L$BUDDY_INSTALL_PREFIX/lib"
export LD_LIBRARY_PATH=\
$BUDDY_INSTALL_PREFIX/lib:$LD_LIBRARY_PATH
echo $CFLAGS
echo $LDFLAGS
echo $LD_LIBRARY_PATH
popd
# Fetch and install `dd`
pip install cython
export DD_BUDDY=1
pip install dd \
-vvv \
--use-pep517 \
--no-build-isolation
# passes `-lbdd` to the C compiler
#
# fetch `dd` source
pip download \
--no-deps dd \
--no-binary dd
tar -xzf dd-*.tar.gz
# confirm that `dd.buddy` did get installed
pushd dd-*/tests/
python -c 'import dd.buddy'
popd