-
Notifications
You must be signed in to change notification settings - Fork 0
/
hg.build
22 lines (22 loc) · 914 Bytes
/
hg.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@LSST UPS@ &&
curl -L \
http://mercurial.selenic.com/release/mercurial-@VERSION@.tar.gz \
> @PRODUCT@-@VERSION@.tar.gz &&
gunzip < @PRODUCT@-@VERSION@.tar.gz | tar -xf - &&
cd mercurial-@VERSION@ &&
product_dir=$(eups path 0)/$(eups flavor)/@PRODUCT@/@VERSION@ &&
python_version=$(python -c "import distutils.sysconfig as ds; print ds.get_python_version()") &&
if [ ! -d $product_dir ]; then
mkdir -p $product_dir
mkdir -p $product_dir/lib/python$python_version/site-packages
fi &&
python setup.py install --prefix=$product_dir &&
if [ ! -d $product_dir/lib/python ]; then
mkdir -p $product_dir/lib/python
fi &&
ln -fs $product_dir/lib/python$python_version/site-packages $product_dir/lib/python &&
if [ $(eups flavor) = Linux64 -a -d $product_dir/lib64 ]; then
rm -rf $product_dir/lib
mv $product_dir/lib64 $product_dir/lib
fi &&
lsst_ups @PRODUCT@ @VERSION@ $product_dir