[PATCH 11 of 22] buildrpm: introduce --withpython for building rpms that includes Python 2.7

Mads Kiilerich mads at kiilerich.com
Tue May 20 13:38:15 CDT 2014


On 05/20/2014 07:04 PM, Olle wrote:
>
> @@ -71,10 +149,15 @@ rm -rf $RPM_BUILD_ROOT
>
>      %dir %{_sysconfdir}/mercurial
>      %dir %{_sysconfdir}/mercurial/hgrc.d
>      %config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/mergetools.rc
>     +%if "%{?withpython}"
>     +%{_bindir}/%{pythonhg}
>     +%{hgpyprefix}
>     +%else
>      %if "%{?pythonver}" != "2.4"
>      %{_libdir}/python%{pythonver}/site-packages/mercurial-*-py%{pythonver}.egg-info
>      %endif
>      %{_libdir}/python%{pythonver}/site-packages/mercurial
>      %{_libdir}/python%{pythonver}/site-packages/hgext
>     +%endif
>
>      %changelog
>
>
> If you use the --with/--without flag to rpmbuild and use the 
> corresponding %bcond_with/%bcond_without macros, this would be 
> cleaner, you would also not need the initial sed.

Yes, it could be done in many different ways. This is an extension of 
the existing way of doing it.

One advantage of doing it this way is that the srpm just can be rebuild 
and will do what it is intended to do. We also don't want to include 
Python in srpms where it isn't needed and can't build with Python if it 
isn't included.

We also "have" to modify the spec in order to set the version and add a 
changelog.

/Mads
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20140520/7b2271b6/attachment.html>


More information about the Mercurial-devel mailing list