On Tue, May 11, 2004, Aaron Bostick wrote:
> Viewcvs requires the subversion swig python bindings however.  What is 
> the best approach for something like this?  Looking at the 
> subversion.spec file, I would add an option like this:
>
> %option       with_python   no
> ...
> %if "%{with_python}" == "yes"
> PreReq:       python, swig
> %endif
>
That's the correct approach for specifying conditional run time
requirements. Should the requirements be build time as well, then add a
similar line beginning with 'BuildPreReq'.

  %if "%{with_python}" == "yes"
  BuildPreReq:  python, swig
  PreReq:       python, swig
  %endif

> On a side note, when I first configured subversion to test this, it 
> picked the wrong python library (I had a system python and an openpkg 
> python installed).
>
I've seen this problem before, and the solution has been to:

  1) Learn why the program (subversion) is choosing the wrong python
  2) Patch the correct file (often configure) to correct this

Step 2 can be done either with a

  '%{l_shtool} subst -e 's;bad_str;good_str;g' filename

or a

  %prep
      %patch -p0

Since subversion has no patch already there, and uses a shtool substitution
already, I would just put another shtool substitution right under it with
your fix.

By the way, I see that the following packages may yield clues to how setting
the right python path has been done in the past:

  doclifter
  flawfinder
  rdiff-backup
  zope

-- 
[EMAIL PROTECTED]
Development Team, Operations Northern Europe
Cable & Wireless Telecommunications Services

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to