From: Barış Metin Date: Mon, 8 Feb 2010 11:51:21 +0000 (+0000) Subject: check the python version instead of trying to import uuid. X-Git-Tag: sfa-0.9-11~144 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=aac9c2780747fe05a3f8cf79961e67c6a45ff988;p=sfa.git check the python version instead of trying to import uuid. --- diff --git a/sfa.spec b/sfa.spec index a2ee70a3..f84ab9e3 100644 --- a/sfa.spec +++ b/sfa.spec @@ -33,10 +33,13 @@ Requires: m2crypto Requires: libxslt-python Requires: python-ZSI -# python 2.5 has uuid module added, for python 2.4 we still need it -%define has_uuid %(`python -c "import uuid" 2> /dev/null; echo $?`) -%if has_uuid -%else +# python 2.5 has uuid module added, for python 2.4 we still need it. +# we can't really check for if we can load uuid as a python module, +# it'll be installed by "devel.pkgs". we have the epel repository so +# python-uuid will be provided. but we can test for the python +# version. +%define has_py24 %(`python -c "import sys;sys.exit(sys.version_info[0:2] == (2,4))" 2> /dev/null; echo $?`) +%if has_py24 Requires: python-uuid %endif