forked from AcademySoftwareFoundation/rez
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.sh
More file actions
executable file
·694 lines (618 loc) · 22.9 KB
/
configure.sh
File metadata and controls
executable file
·694 lines (618 loc) · 22.9 KB
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
#!/bin/bash
#
# Configuration script for rez.
#
# You need to run this before install.sh. It will attempt to find rez's dependencies, if
# it fails then you need to point it to the right binaries, directories etc.
#
# Once configuration succeeds, relevant info is written to ./rez.configured. You can then
# run install.sh
#
#
# Configuration settings. Either set them by hand here, or set the relevant REZCONFIG_XXX
# environment variables (see the following section) before invoking this script.
###---------------------------------------------------------------------------------------
### BEGIN EDITING HERE >>>
###---------------------------------------------------------------------------------------
# Path where you want to centrally deploy packages to (ie, a central location that all
# users can see). For example, /someserver/rez/packages
packages_path=
# Path to where you want to locally install packages to. Note the single quotes, which are
# needed to stop early substitution of $HOME.
local_packages_path='$HOME/packages'
# The system shell that rez expects to be running in. If left blank rez will identify
# Eg: bash, csh, tcsh
rezshell=
# The operating system. If left blank rez will identify. Eg: linux, windows, osx
osname=
# The operating system distribution. If left blank rez will identify
# Eg: Ubuntu-11.10
distro=
distro_version=
# The system architecture. If left blank rez will identify
# Eg: x86_64
sysarch=
# Binaries that rez needs, if left blank rez will try to find them
cmake_binary=
cpp_compiler_binary=
python_binary=
# Path to python modules, if left blank rez will try to find them. A common mistake is to
# include the trailing subdir (eg /.../.../yaml), that's one dir too many
pyyaml_path=
pydot_path=
pyparsing_path=
pymemcached_path=
pysvn_path=
gitpython_path=
# Your preferred text editor for writing package release notes. You can change this at any
# time by setting $REZ_RELEASE_EDITOR appropriately.
rez_release_editor=
# Your preferred image viewer, for viewing resolve graphs. You can change this at any time
# by setting $REZ_DOT_IMAGE_VIEWER appropriately.
rez_dot_image_viewer=
###---------------------------------------------------------------------------------------
### <<< END EDITING HERE
### DO NOT CHANGE ANYTHING PAST THIS LINE
###---------------------------------------------------------------------------------------
if [ "$packages_path" == "" ]; then
packages_path=$REZCONFIG_PACKAGES_PATH
fi
if [ "$local_packages_path" == "" ]; then
local_packages_path=$REZCONFIG_LOCAL_PACKAGES_PATH
fi
if [ "$rezshell" == "" ]; then
rezshell=$REZCONFIG_SHELL
fi
if [ "$osname" == "" ]; then
osname=$REZCONFIG_PLATFORM
fi
if [ "$distro" == "" ]; then
distro=$REZCONFIG_DISTRO
fi
if [ "$distro_version" == "" ]; then
distro_version=$REZCONFIG_DISTRO_VERSION
fi
if [ "$sysarch" == "" ]; then
sysarch=$REZCONFIG_ARCH
fi
if [ "$cmake_binary" == "" ]; then
cmake_binary=$REZCONFIG_CMAKE_BINARY
fi
if [ "$cpp_compiler_binary" == "" ]; then
cpp_compiler_binary=$REZCONFIG_CPP_COMPILER_BINARY
fi
if [ "$python_binary" == "" ]; then
python_binary=$REZCONFIG_PYTHON_BINARY
fi
if [ "$pyyaml_path" == "" ]; then
pyyaml_path=$REZCONFIG_PYYAML_PATH
fi
if [ "$pydot_path" == "" ]; then
pydot_path=$REZCONFIG_PYDOT_PATH
fi
if [ "$pyparsing_path" == "" ]; then
pyparsing_path=$REZCONFIG_PYPARSING_PATH
fi
if [ "$pymemcached_path" == "" ]; then
pymemcached_path=$REZCONFIG_PYMEMCACHED_PATH
fi
if [ "$pysvn_path" == "" ]; then
pysvn_path=$REZCONFIG_PYSVN_PATH
fi
if [ "$gitpython_path" == "" ]; then
gitpython_path=$REZCONFIG_GITPYTHON_PATH
fi
if [ "$rez_release_editor" == "" ]; then
rez_release_editor=$REZCONFIG_RELEASE_EDITOR
fi
if [ "$rez_dot_image_viewer" == "" ]; then
rez_dot_image_viewer=$REZCONFIG_DOT_IMAGE_VIEWER
fi
# cd into same dir as this script
absfpath=`[[ $0 == /* ]] && echo "$0" || echo "${PWD}/${0#./}"`
cwd=`dirname $absfpath`
cd $cwd
# usage
#-----------------------------------------------------------------------------------------
if [ "$1" == "--help" -o "$1" == "--h" -o "$1" == "-h" -o "$1" == "-?" -o "$1" == "--?" -o "$1" == "-help" ]; then
echo "You need to open configure.sh and edit the section where you are shown to do so." 1>&2
echo "Then run configure.sh with no arguments." 1>&2
exit 0
fi
# functions
#-----------------------------------------------------------------------------------------
_find_program(){
for prog in $*
do
path=`which $prog 2> /dev/null`
if [ $? -eq 0 ]; then
echo $path
return
fi
done
}
# packages path
#-----------------------------------------------------------------------------------------
if [ "$packages_path" == "" ]; then
echo "You need to set the packages path directory in configure.sh, or set "'$'"REZCONFIG_PACKAGES_PATH" 1>&2
echo "This is where your rez packages will be centrally deployed to." 1>&2
exit 1
fi
if [ "`echo $packages_path | grep '^\.'`" != "" ]; then
echo "Packages path must be an absolute path, not $packages_path" 1>&2
exit 1
fi
# local packages path
#-----------------------------------------------------------------------------------------
if [ "$local_packages_path" == "" ]; then
echo "You need to set the local packages path directory in configure.sh, or set "'$'"REZCONFIG_LOCAL_PACKAGES_PATH" 1>&2
echo "This is where your rez packages will be locally installed to." 1>&2
exit 1
fi
if [ "`echo $local_packages_path | grep '^\.'`" != "" ]; then
echo "Local packages path must be an absolute path, not $local_packages_path" 1>&2
exit 1
fi
if [ "$packages_path" == "$local_packages_path" ]; then
echo "The local and central package paths must be different." 1>&2
exit 1
fi
or_set="either specify manually in configure.sh, or set "'$'
nissues=0
echoerr=
echoreset=
# os
#-----------------------------------------------------------------------------------------
if [ "$osname" == "" ]; then
echo
echo "Detecting operating system..."
osname=`uname`
if [ $? -ne 0 ]; then
echo "Could not identify operating system - $or_set""REZCONFIG_PLATFORM" 1>&2
exit 1
fi
if [ "$osname" == "Linux" ]; then
echoerr=$(tput bold)$(tput setaf 1)
echoreset=$(tput sgr0)
fi
echo "Operating system is: "$osname
fi
# shell
#-----------------------------------------------------------------------------------------
if [ "$rezshell" == "" ]; then
echo
echo "detecting shell..."
rezshell=`basename $SHELL`
if [ $? -ne 0 ]; then
echo $echoerr"Could not identify shell - $or_set""REZCONFIG_PLATFORM" 1>&2
echo "Assuming bash!"$echoreset 1>&2
rezshell=bash
nissues=$(( $nissues + 1 ))
fi
case "$rezshell" in
"bash") ;;
"csh") ;;
"tcsh") ;;
*) echo $echoerr"Unknown shell '"$rezshell"' - $or_set""REZCONFIG_SHELL" 1>&2
echo "Assuming bash!"$echoreset 1>&2
rezshell=bash
nissues=$(( $nissues + 1 ))
;;
esac
echo "Shell is: "$rezshell
fi
# distro
#-----------------------------------------------------------------------------------------
# todo generate the distro package
if [ "$distro" == "" ]; then
echo
echo 'detecting OS distribution...'
if [ "$osname" == "Linux" ]; then
distro=`lsb_release -i | awk '{print $NF}'`
if [ $? -ne 0 ]; then distro=; fi
fi
if [ "$distro" == "" ]; then
echo $echoerr"Could not identify OS distribution - $or_set""REZCONFIG_DISTRO" 1>&2
echo "Setting to DISTRO_UNKNOWN-0!"$echoreset 1>&2
distro=DISTRO_UNKNOWN
distro_version=0
nissues=$(( $nissues + 1 ))
else
echo "OS distribution is: "$distro
fi
fi
if [ "$distro_version" == "" ]; then
echo
echo 'detecting OS distribution version...'
if [ "$osname" == "Linux" ]; then
distro_version=`lsb_release -r | awk '{print $NF}'`
if [ $? -ne 0 ]; then distro_version=; fi
fi
if [ "$distro_version" == "" ]; then
echo $echoerr"Could not identify OS distribution version - $or_set""REZCONFIG_DISTRO_VERSION" 1>&2
echo "Setting to 0!"$echoreset 1>&2
distro_version=0
nissues=$(( $nissues + 1 ))
else
echo "OS distribution version is: "$distro_version
fi
fi
orset='edit configure.sh, or set $'
# make
#-----------------------------------------------------------------------------------------
which make > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo
echo "Cannot find make!" 1>&2
exit 1
fi
# cmake
#-----------------------------------------------------------------------------------------
echo
echo 'detecting cmake...'
if [ "$cmake_binary" == "" ]; then cmake_binary=cmake; fi
which $cmake_binary > /dev/null 2>&1
if [ $? -eq 0 ]; then
cmake_binary=`which $cmake_binary`
else
echo "rez.configure: $cmake_binary could not be located - $orset""REZCONFIG_CMAKE_BINARY" 1>&2
exit 1
fi
echo "found cmake binary: "$cmake_binary
cmakever=`( $cmake_binary --version 2>&1 ) | tr ' ' '\n' | sed -n '/^[0-9]/p' | head -n 1`
versplit=`echo $cmakever | tr '.' ' ' | tr '-' ' '`
cmake_major_ver=`echo $versplit | awk '{print $1}'`
cmake_minor_ver=`echo $versplit | awk '{print $2}'`
if (( (cmake_major_ver * 100) + cmake_minor_ver < 208 )); then
echo "cmake version "$cmakever" is too old, you need 2.8 or greater." 1>&2
echo "You need to $orset""REZCONFIG_CMAKE_BINARY" 1>&2
exit 1
fi
# runtime 3rd-party tools
#-----------------------------------------------------------------------------------------
if [ "$rez_release_editor" == "" ]; then
rez_release_editor=`_find_program kedit gedit nedit kwrite kate vim vi`
fi
if [ "$rez_dot_image_viewer" == "" ]; then
rez_dot_image_viewer=`_find_program eog kde-open kview xnview gthumb feh gqview geeqie firefox`
fi
# detect cpp compiler
#-----------------------------------------------------------------------------------------
echo
echo 'detecting cpp compiler...'
# attempt to find compiler via cmake
tmpf=./rez.cppcompiler
echo 'include(CMakeDetermineCXXCompiler)' > $tmpf
echo 'MESSAGE("REZCXX "${CMAKE_CXX_COMPILER})' >> $tmpf
echo 'MESSAGE("REZID "${CMAKE_CXX_COMPILER_ID})' >> $tmpf
cppcompiler=`export CXX=$cpp_compiler_binary ; $cmake_binary -P $tmpf 2>&1 | grep '^REZCXX' | grep -v 'NOTFOUND' | awk '{print $NF}'`
if [ $? -ne 0 ]; then
cppcompiler=''
fi
cppcompiler_id=`export CXX=$cpp_compiler_binary ; $cmake_binary -P $tmpf 2>&1 | grep '^REZID' | grep -v 'NOTFOUND' | awk '{print $NF}'`
if [ $? -ne 0 ]; then
cppcompiler_id=''
fi
# couldn't find cpp compiler via cmake, let's just look for the binary directly
if [ "$cppcompiler" == "" ]; then
echo $echoerr"couldn't find cpp compiler via cmake!"$echoreset 1>&2
nissues=$(( $nissues + 1 ))
if [ "$cpp_compiler_binary" == "" ]; then
cpp_compiler_binary=gcc
fi
echo "looking for $cpp_compiler_binary""..." 1>&2
cppcompiler=`which $cpp_compiler_binary`
if [ $? -ne 0 ]; then
echo $echoerr"$cpp_compiler_binary not found."$echoreset 1>&2
nissues=$(( $nissues + 1 ))
cppcompiler=''
else
echo "found $cpp_compiler_binary at $cppcompiler."
fi
fi
if [ "$cppcompiler" == "" ]; then
echo "Couldn't find cpp compiler." 1>&2
echo "You need to $orset""REZCONFIG_CPP_COMPILER_BINARY" 1>&2
exit 1
fi
cppcomp_name=`basename $cppcompiler | tr '+' 'p'`
# massage compiler name in some cases
if [ "$cppcompiler_id" == "GNU" ]; then
if [ "$cppcomp_name" == "cpp" -o "$cppcomp_name" == "gpp" ]; then
cppcomp_name="gcc"
fi
# account for distributions that install various flavours of
# gcc, each with a different version string appended.
if [[ "$cppcomp_name" == gcc-* ]]; then
cppcomp_name="gcc"
fi
fi
if [ "cppcomp_name" == "gcc" ]; then
tmp=${cppcompiler/gcc/g++}
if [ -e $tmp ]; then
cppcompiler=$tmp
fi
fi
echo "found cpp compiler: "$cppcompiler", id: "$cppcompiler_id
# detect cpp compiler version
cppcompiler_ver=''
if [ "$cppcompiler_id" == "GNU" ]; then
ver=`$cppcompiler -dumpversion`
if [ $? -eq 0 ]; then
cppcompiler_ver=$ver
fi
fi
if [ "$cppcompiler_ver" == "" ]; then
echo $echoerr"Couldn't detect compiler version, assuming 1.0.1..."$echoreset 1>&2
cppcompiler_ver='1.0.1'
nissues=$(( $nissues + 1 ))
fi
echo "cpp compiler version: "$cppcompiler_ver
# python
#-----------------------------------------------------------------------------------------
echo
echo 'detecting python...'
if [ "$python_binary" == "" ]; then python_binary=python; fi
which $python_binary > /dev/null 2>&1
if [ $? -eq 0 ]; then
python_binary=`which $python_binary`
else
echo "rez.configure: $python_binary could not be located." 1>&2
echo "You need to $orset""REZCONFIG_PYTHON_BINARY" 1>&2
exit 1
fi
echo "found python binary: "$python_binary
pyver=`( $python_binary -V 2>&1 | sed 's/\+//' ) | awk '{print $NF}'`
pynum=`echo $pyver | sed 's/\.[^\.]*$//' | sed 's/\.//'`
if (( pynum < 25 )); then
echo "python version "$pyver" is too old, you need 2.5 or greater." 1>&2
echo "You need to $orset""REZCONFIG_PYTHON_BINARY" 1>&2
exit 1
fi
echo "python version: "$pyver
# pyyaml
#-----------------------------------------------------------------------------------------
echo
echo 'detecting pyyaml...'
if [ "$pyyaml_path" == "" ]; then
$python_binary -c "import yaml" > /dev/null 2>&1
if [ $? -eq 0 ]; then
pyyaml_path=`$python_binary -c \
"import os.path ; \
import yaml ; \
s = yaml.__file__.replace('/__init__.pyc','') ; \
s = yaml.__file__.replace('/__init__.pyo','') ; \
s = s.replace('/__init__.py','') ; \
print os.path.dirname(s)"`
if [ $? -ne 0 ]; then
pyyaml_path=""
fi
fi
fi
if [ "$pyyaml_path" == "" ]; then
echo "couldn't find yaml python module - $orset""REZCONFIG_PYYAML_PATH" 1>&2
exit 1
else
bash -c "export PYTHONPATH=$pyyaml_path ; $python_binary -c 'import yaml' > /dev/null 2>&1"
if [ $? -ne 0 ]; then
echo "yaml python module not found at "$pyyaml_path 1>&2
exit 1
fi
fi
echo "found pyyaml at "$pyyaml_path
# pydot
#-----------------------------------------------------------------------------------------
echo
echo 'detecting pydot...'
if [ "$pydot_path" == "" ]; then
$python_binary -c "import pydot" > /dev/null 2>&1
if [ $? -eq 0 ]; then
pydot_path=`$python_binary -c \
"import os.path ; \
import pydot ; \
s = pydot.__file__.replace('/__init__.pyc','') ; \
s = pydot.__file__.replace('/__init__.pyo','') ; \
s = s.replace('/__init__.py','') ; \
print os.path.dirname(s)"`
if [ $? -ne 0 ]; then
pydot_path=""
fi
fi
fi
if [ "$pydot_path" == "" ]; then
echo "couldn't find pydot python module - $orset""REZCONFIG_PYDOT_PATH" 1>&2
exit 1
else
bash -c "export PYTHONPATH=$pydot_path ; $python_binary -c 'import pydot' > /dev/null 2>&1"
if [ $? -ne 0 ]; then
echo "pydot python module not found at "$pydot_path 1>&2
exit 1
fi
fi
echo "found pydot at "$pydot_path
# pyparsing
#-----------------------------------------------------------------------------------------
echo
echo 'detecting pyparsing...'
if [ "$pyparsing_path" == "" ]; then
$python_binary -c "import pyparsing" > /dev/null 2>&1
if [ $? -eq 0 ]; then
pyparsing_path=`$python_binary -c \
"import os.path ; \
import pyparsing ; \
s = pyparsing.__file__.replace('/__init__.pyc','') ; \
s = pyparsing.__file__.replace('/__init__.pyo','') ; \
s = s.replace('/__init__.py','') ; \
print os.path.dirname(s)"`
if [ $? -ne 0 ]; then
pyparsing_path=""
fi
fi
fi
if [ "$pyparsing_path" == "" ]; then
echo "couldn't find pyparsing python module - $orset""REZCONFIG_PYPARSING_PATH" 1>&2
exit 1
else
bash -c "export PYTHONPATH=$pyparsing_path ; $python_binary -c 'import pyparsing' > /dev/null 2>&1"
if [ $? -ne 0 ]; then
echo "pyparsing python module not found at "$pyparsing_path 1>&2
exit 1
fi
fi
echo "found pyparsing at "$pyparsing_path
if [ "$_REZ_ISDEMO" != "1" ]; then
# pymemcached
#-----------------------------------------------------------------------------------------
echo
echo 'detecting pymemcached...'
if [ "$pymemcached_path" == "" ]; then
$python_binary -c "import memcache" > /dev/null 2>&1
if [ $? -eq 0 ]; then
pymemcached_path=`$python_binary -c \
"import os.path ; \
import memcache ; \
s = memcache.__file__.replace('/__init__.pyc','') ; \
s = memcache.__file__.replace('/__init__.pyo','') ; \
s = s.replace('/__init__.py','') ; \
print os.path.dirname(s)"`
if [ $? -ne 0 ]; then
pymemcached_path=""
fi
fi
fi
if [ "$pymemcached_path" == "" ]; then
echo $echoerr"couldn't find memcache python module - $orset""REZCONFIG_PYMEMCACHED_PATH"$echoreset 1>&2
else
bash -c "export PYTHONPATH=$pymemcached_path ; $python_binary -c 'import memcache' > /dev/null 2>&1"
if [ $? -ne 0 ]; then
echo $echoerr"memcache python module not found at "${pymemcached_path}$echoreset 1>&2
pymemcached_path=""
fi
fi
if [ "$pymemcached_path" == "" ]; then
echo "Installation can continue, but caching will not be available." 1>&2
echo "To enable later, just add the python-memcached python path where it is missing in (rez-install-path)/bin/_set-rez-env" 1>&2
nissues=$(( $nissues + 1 ))
else
echo "found python-memcached at "$pymemcached_path
fi
# pysvn
#-----------------------------------------------------------------------------------------
echo
echo 'detecting pysvn...'
if [ "$pysvn_path" == "" ]; then
$python_binary -c "import pysvn" > /dev/null 2>&1
if [ $? -eq 0 ]; then
pysvn_path=`$python_binary -c \
"import os.path ; \
import pysvn ; \
s = pysvn.__file__.replace('/__init__.pyc','') ; \
s = pysvn.__file__.replace('/__init__.pyo','') ; \
s = s.replace('/__init__.py','') ; \
print os.path.dirname(s)"`
if [ $? -ne 0 ]; then
pysvn_path=""
fi
fi
fi
if [ "$pysvn_path" == "" ]; then
echo $echoerr"couldn't find pysvn python module - $orset""REZCONFIG_PYSVN_PATH"$echoreset 1>&2
else
bash -c "export PYTHONPATH=$pysvn_path ; $python_binary -c 'import pysvn' > /dev/null 2>&1"
if [ $? -ne 0 ]; then
echo $echoerr"pysvn python module not found at "${pysvn_path}$echoreset 1>&2
pysvn_path=""
fi
fi
if [ "$pysvn_path" == "" ]; then
echo "Installation can continue, but rez-release for svn will not be available." 1>&2
echo "To enable later, just add the svn python path where it is missing in (rez-install-path)/bin/_set-rez-env" 1>&2
nissues=$(( $nissues + 1 ))
else
echo "found pysvn at "$pysvn_path
fi
# gitpython
#-----------------------------------------------------------------------------------------
echo
echo 'detecting gitpython...'
if [ "$gitpython_path" == "" ]; then
$python_binary -c "import git" > /dev/null 2>&1
if [ $? -eq 0 ]; then
gitpython_path=`$python_binary -c \
"import os.path ; \
import git ; \
s = git.__file__.replace('/__init__.pyc','') ; \
s = git.__file__.replace('/__init__.pyo','') ; \
s = s.replace('/__init__.py','') ; \
print os.path.dirname(s)"`
if [ $? -ne 0 ]; then
gitpython_path=""
fi
fi
fi
if [ "$gitpython_path" == "" ]; then
echo $echoerr"couldn't find gitpython python module - $orset""REZCONFIG_GITPYTHON_PATH"$echoreset 1>&2
else
bash -c "export PYTHONPATH=$gitpython_path ; $python_binary -c 'import git' > /dev/null 2>&1"
if [ $? -ne 0 ]; then
echo $echoerr"gitpython python module not found at "${gitpython_path}$echoreset 1>&2
gitpython_path=""
fi
fi
if [ "$gitpython_path" == "" ]; then
echo "Installation can continue, but rez-release for git will not be available." 1>&2
echo "To enable later, just add the git python path where it is missing in (rez-install-path)/bin/_set-rez-env" 1>&2
nissues=$(( $nissues + 1 ))
else
echo "found gitpython at "$gitpython_path
fi
fi
# write configuration info
#-----------------------------------------------------------------------------------------
echo "# generated by configure.sh" > ./rez.configured
echo "export _REZ_PACKAGES_PATH='"$packages_path"'" >> ./rez.configured
echo "export _REZ_LOCAL_PACKAGES_PATH='"$local_packages_path"'" >> ./rez.configured
echo "export _REZ_SHELL='"$rezshell"'" >> ./rez.configured
echo "export _REZ_PLATFORM='"$osname"'" >> ./rez.configured
echo "export _REZ_DISTRO='"$distro"'" >> ./rez.configured
echo "export _REZ_DISTRO_VER='"$distro_version"'" >> ./rez.configured
echo "export _REZ_CMAKE_BINARY='"$cmake_binary"'" >> ./rez.configured
echo "export _REZ_CPP_COMPILER='"$cppcompiler"'" >> ./rez.configured
echo "export _REZ_CPP_COMPILER_NAME='"$cppcomp_name"'" >> ./rez.configured
echo "export _REZ_CPP_COMPILER_ID='"$cppcompiler_id"'" >> ./rez.configured
echo "export _REZ_CPP_COMPILER_VER='"$cppcompiler_ver"'" >> ./rez.configured
echo "export _REZ_PYTHON_BINARY='"$python_binary"'" >> ./rez.configured
echo "export _REZ_PYTHON_VER='"$pyver"'" >> ./rez.configured
echo "export _REZ_PYYAML_PATH='"$pyyaml_path"'" >> ./rez.configured
echo "export _REZ_PYDOT_PATH='"$pydot_path"'" >> ./rez.configured
echo "export _REZ_PYPARSING_PATH='"$pyparsing_path"'" >> ./rez.configured
echo "export _REZ_PYMEMCACHED_PATH='"$pymemcached_path"'" >> ./rez.configured
echo "export _REZ_PYSVN_PATH='"$pysvn_path"'" >> ./rez.configured
echo "export _REZ_GITPYTHON_PATH='"$gitpython_path"'" >> ./rez.configured
echo "export _REZ_RELEASE_EDITOR='"$rez_release_editor"'" >> ./rez.configured
echo "export _REZ_DOT_IMAGE_VIEWER='"$rez_dot_image_viewer"'" >> ./rez.configured
echo
if [ $nissues -ne 0 ]; then
echo $echoerr"There were $nissues issues, please review above. Note that installation has still succeeded."$echoreset
fi
echo "rez.configured written."
echo "Now run ./install.sh"
echo
# Copyright 2012 BlackGinger Pty Ltd (Cape Town, South Africa)
#
# Copyright 2008-2012 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios)
#
# This file is part of Rez.
#
# Rez is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Rez is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Rez. If not, see <http://www.gnu.org/licenses/>.