default python spec template: python_sitelib vs python_sitearch

Ville Skyttä ville.skytta at iki.fi
Mon Jan 9 20:52:30 UTC 2006


On Mon, 2006-01-09 at 14:30 -0500, Konstantin Ryabitsev wrote:
> On Mon, 2006-09-01 at 22:44 +0330, Roozbeh Pournader wrote:
> > > Yes. Hmm, wait, does this generate "duplicate entries" warning?
> > 
> > Yes, it does. Should I ignore the warning or is there a recommended way
> > to avoid it? (I can only think of a conditional to compare the two
> > python_site* macros and only define the second %dir if they were
> > different.)
> 
> I don't really know. Best is to leave things as simple as possible.
> Where do setuptools install the non-arch-specific files on an x86_64
> machine?

Depends.  As said, if the set of files to be installed contain _any_
arch specific files, all of them, including non-arch-specific ones in
the set, are according to my experience installed to sitearch
(%{_libdir}/pythonX.X/site-packages nowadays).  If there are no
arch-specific files in the set, everything is installed to sitelib
(/usr/lib/pythonX.X/site-packages nowadays, note: not %{_libdir}!).

The spec template should be safe to use like: "if noarch package, use
only %{python_sitelib}, if not noarch, use only %{python_sitearch}".
It's the same as with %{perl_vendorlib} and %{perl_vendorarch}.  And it
should also work without specfile changes in the (somewhat unlikely, but
thinkable) case where non-arch-specific python stuff would some day be
moved to eg. %{_datadir}/pythonX.X/site-packages.

Oh, and a FYI, %{python_sitearch} and %{python_sitelib} are defined the
same way as in the current python spec template in rpm >=
4.4.3's /usr/lib/rpm/macros.




More information about the fedora-extras-list mailing list