2 |
|
%define pythonv %(echo $PYTHON_VERSION | cut -f1,2 -d.) |
3 |
|
## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -f1,2 -d.`/site-packages |
4 |
|
|
5 |
< |
Source: http://labix.org/download/python-dateutil/python-dateutil-%{v}.tar.bz2 |
5 |
> |
Source: http://labix.org/download/python-dateutil/python-dateutil-%{realversion}.tar.bz2 |
6 |
|
Requires: python |
7 |
|
|
8 |
|
%prep |
9 |
< |
%setup -n python-dateutil-%{v} |
9 |
> |
%setup -n python-dateutil-%{realversion} |
10 |
|
%build |
11 |
|
%install |
12 |
|
python setup.py install --prefix=%i |
13 |
+ |
|
14 |
+ |
# following code to correctly setup dependencies environment |
15 |
+ |
rm -rf %i/etc/profile.d |
16 |
+ |
mkdir -p %i/etc/profile.d |
17 |
+ |
for x in %pkgreqs; do |
18 |
+ |
case $x in /* ) continue ;; esac |
19 |
+ |
p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/') |
20 |
+ |
echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh |
21 |
+ |
echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh |
22 |
+ |
done |
23 |
+ |
|
24 |
+ |
%post |
25 |
+ |
# The relocation below is also needed in case of dependencies |
26 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.sh |
27 |
+ |
%{relocateConfig}etc/profile.d/dependencies-setup.csh |
28 |
+ |
|