Ladies and Gentlemen,

I have now been playing a bit with tmda-1.1.12/contrib/tmda.spec.
Appended is a possible way to generalize the python version definitions.
This will probably need some input from a more experienced builder than
me. My question is, is this a reasonable way to go?

Thanks, AG

------------------------------------------------------------------------------
--- tmda.spec.orig 2007-07-30 15:43:13.000000000 -0400
+++ tmda.spec  2008-07-13 20:57:22.000000000 -0400
@@ -14,8 +14,8 @@
 Vendor: TMDA Cabal
 Packager: [EMAIL PROTECTED]
 Url: http://tmda.net/
-BuildRequires: /usr/bin/python2.3
-Requires: /usr/bin/python2.3
+BuildRequires: python >= 2.3
+Requires: python >= 2.3
 
 %description
 TMDA is an open source anti-spam system and local mail delivery agent.
@@ -26,7 +26,9 @@
 %build
 rm -rf %{buildroot}
 #%define pypath %(if [ `type -p python2` ]; then type -p python2; else type -p 
python; fi)
-%define pypath /usr/bin/python2.3
+%define pythonpath /usr/bin/python
+%define pythonver %(%{pythonpath} -c 'import sys; print sys.version[:3]')
+%define pypath %{pythonpath}%{pythonver}
 
 # fix shbang line in all executable files
 find . -type f -perm 0755 -print | while read i
------------------------------------------------------------------------------

-- 
 ----------------------------------------------------------------------
   Alfred Ganz                                  alfred-ganz:at:agci.com
   AG Consulting, Inc.                          (203) 624-9667
   440 Prospect Street # 11
   New Haven, CT 06511
 ----------------------------------------------------------------------
_____________________________________________
tmda-users mailing list ([email protected])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to