[apparmor] [patch] utils: fix python install for rule/ subdirectory

Steve Beattie steve at nxnw.org
Tue Jan 13 20:15:41 UTC 2015


On Tue, Jan 13, 2015 at 01:43:33PM -0600, Tyler Hicks wrote:
> On 2015-01-13 11:33:10, Steve Beattie wrote:
> > utils: fix python install for rule/ subdirectory
> > 
> > For reasons that are unclear to me, python's setuptools doesn't
> > install recursively from a directory, meaning that on make install,
> > the new Rules/Ruleset classes were not being installed. This patch
> > causes the rule subdirectory to be included.
> > 
> > Bug: https://bugs.launchpad.net/bugs/1407437
> > 
> > Signed-off-by: Steve Beattie <steve at nxnw.org>
> 
> I don't have much experience here but I see that setuptools provides
> find_packages() which may be a little more future proof than manually
> adding new packages to the list.
> 
>   https://pythonhosted.org/setuptools/setuptools.html#using-find-packages
> 
> However, I think what you have here is perfectly acceptable and gets my
> ack.

Ah right, I wrote imprecisely in my patch header; we're actually using
python's included distutils and not setuptools, which is a separate
project, so don't have access to find_packages().

I'd meant to offer converting to setuptools as another alternative (as I
think there's some simplification we could do to the setup script if we
did), but am unclear as to setuptools availability in non-debian derived
distributions.

> Acked-by: Tyler Hicks <tyhicks at canonical.com>

Thanks.

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150113/8951684d/attachment.pgp>


More information about the AppArmor mailing list