rpm and distutils

Andres Baravalle andres.baravalle at gmail.com
Mon Oct 11 21:08:44 EDT 2004


Hi,
I have a simple setup.py that allows me to build my basic source and
binary distributions.

Now I would like to be able to include a few commands to add the
desktop entry for my applications.

In a spec file the commands would be, for installing:

mkdir -p $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps
desktop-file-install --vendor fedora \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
	--add-category X-Fedora \
	--add-category Application \
	%{SOURCE1}

and then I have the related lines in the files section:

%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/%{name}.png

how can I add that to my setup.py file?

Thanks in advance,
   Andres

PS: I have already a working spec file that does the job, but I would
like to do all from python instead of relying on the rpm spec file.



More information about the Python-list mailing list