From aac9c2780747fe05a3f8cf79961e67c6a45ff988 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 8 Feb 2010 11:51:21 +0000 Subject: [PATCH] check the python version instead of trying to import uuid. --- sfa.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 -- 2.43.0