Suggestion: pylint
Toshio Kuratomi
toshio at tiki-lounge.com
Sat Jun 18 04:19:36 UTC 2005
On Fri, 2005-06-17 at 13:19 +0100, Mark McLoughlin wrote:
> Hi,
>
> On Sat, 2005-04-23 at 04:29 +0000, Michael A. Peters wrote:
>
> > I believe extras wants you to %ghost the *.pyo files in site-packages
>
> The conclusion from this thread seems to be:
>
> https://www.redhat.com/archives/fedora-devel-list/2004-December/thread.html#00849
>
> that
>
I think it was more of an impasse.
> 1) This is just about disk space; the idea is that shipping .pyo
> files don't give you an appreciable startup speed win so we
> should we shouldn't package them
>
.pyo's can also break python programs. The "optimizations" include
things like removing docstrings which programs may depend upon to
function.
> 2) That %ghost-ing .pyo files is more trouble than its worth
>
Is %{find_lang} more trouble than it's worth? It similarly is just a
space savings.
> Thoughts?
1) Current Extras packages already adhere to this standard.
2) We must include the pyo's in the %files section either as %ghost or
as normal files otherwise they won't get removed from the system once
they are created.
3) It's not that hard to implement this in a spec file. It's also not
that hard to implement a script to do it for you.
Attached is a script that takes a directory and generates a file list.
It can replace a common %files idiom such as:
%files
%{python_sitelib}/docutils
with:
%install
[..]
%{find_pyfiles} %{python_sitelib}/docutils docutils
%files -f docutils.pyfiles
[..]
There are other solutions as well (something more like
%find_lang, for instance, that scans the whole %buildroot for python
files and correctly lists those files and the directories they reside in
for instance.)
-Toshio
PS Second attachment is a patch which adds the find_pyfiles macro to
rpm/redhat/macros and adds this file to the rpm/redhat/macros/
directory.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find-pyfiles.sh
Type: application/x-shellscript
Size: 1747 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20050618/f3e3f521/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpm-find-pyfiles.patch
Type: text/x-patch
Size: 2420 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20050618/f3e3f521/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20050618/f3e3f521/attachment.sig>
More information about the fedora-extras-list
mailing list