1 |
On Sun, Apr 03, 2011 at 07:38:17PM +0200, Arfrever Frehtes Taifersar Arahesis wrote: |
2 |
> I would like to add python-namespaces.eclass. This eclass will be used by a small number of |
3 |
> special packages, which will provide Python namespaces. These packages will be used as |
4 |
> dependencies of other packages already present in the tree. |
5 |
> |
6 |
> Ebuilds using this eclass must set PYTHON_NAMESPACES variable before inheriting this eclass. |
7 |
> Example (from net-zope/namespaces-zope): |
8 |
|
9 |
namespaces-zope's invocation of the mod_optimize/cleanup crap isn't |
10 |
needed since it's EAPI>=3; EAPI3 preserves mtime. |
11 |
|
12 |
What other consumers are expected for this beyond namespaces-zope? |
13 |
|
14 |
|
15 |
> PYTHON_NAMESPACES="Products Shared Shared.DC five +zope zope.app" |
16 |
> |
17 |
> This eclass provides 3 public functions: |
18 |
> python-namespaces_src_install() |
19 |
> python-namespaces_pkg_postinst() |
20 |
> python-namespaces_pkg_postrm() |
21 |
> |
22 |
> -- |
23 |
> Arfrever Frehtes Taifersar Arahesis |
24 |
> |
25 |
> # Copyright 1999-2011 Gentoo Foundation |
26 |
> # Distributed under the terms of the GNU General Public License v2 |
27 |
> # $Header: $ |
28 |
> |
29 |
> # @ECLASS: python-namespaces.eclass |
30 |
> # @MAINTAINER: |
31 |
> # Gentoo Python Project <python@g.o> |
32 |
> # @BLURB: Eclass for packages installing Python namespaces |
33 |
> # @DESCRIPTION: |
34 |
> # The python-namespaces eclass defines phase functions for packages installing Python namespaces. |
35 |
|
36 |
^^^ This isn't a useful description. What is it doing to the phase |
37 |
functions? What's the purpose for someone who isn't intimately |
38 |
familiar w/ python setuptools/namespaces? Etc. |
39 |
|
40 |
Seriously, I just spent a good 10 minutes digging through this crap |
41 |
trying to figure out what you were up to- that is *exactly* what the |
42 |
description should convey. |
43 |
|
44 |
Same goes for the code; this needs to be peppered with |
45 |
clear/descriptive comments. The description for PYTHON_NAMESPACES for |
46 |
example on it's own doesn't make clear that it screws with |
47 |
REQUIRED_USE (let alone exactly it's intent). |
48 |
|
49 |
General commentary: If you want to do magic like this, it needs to be |
50 |
documented clearly so everyone else can figure out wtf it is exactly |
51 |
intending on doing (including what it actually is doing)- if it can't |
52 |
be documented to that level it doesn't belong in the tree, only in |
53 |
your personal overlay. |
54 |
|
55 |
As mentioned by others, if you're going to use [[ ]] stop doing |
56 |
unnecessarily quoting w/ that construct- fix your editor if it |
57 |
doesn't color it correctly. |
58 |
|
59 |
~harring |