/usr/share/pyshared/z3c/autoinclude/utils.txt is in python-z3c.autoinclude 0.3.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | =================
Utility functions
=================
distributionForPackage is a function that takes a module object
and returns the setuptools distribution object that contains
the module.
It should find the correct distribution for a package whose namespace
is extended by other packages in the environment::
>>> from z3c.autoinclude.utils import distributionForPackage
>>> import base2
>>> distributionForPackage(base2)
base2 0.0 (...base2-0.0...egg)
It should also find the correct distribution for namespace packages,
even if the namespace being extended is a module defined in another
package in the environment::
>>> import base2.plug
>>> distributionForPackage(base2.plug)
base2-plug 0.0 (...base2_plug-0.0...egg)
If you have a virtual package (a namespace package that exists only
by having been extended by nested packages) it should find a package::
>>> import enolp
>>> distributionForPackage(enolp)
enolp.ppa.foo 0.1 (...enolp.ppa.foo-0.1...egg)
While we're at it, it should also find the correct distribution for
packages whose distribution name has no bearing on the name of the
package contained within it::
>>> import basepackage
>>> # Ignoring whitespace in order to make tests pass on Windows.
>>> distributionForPackage(basepackage) # doctest: +IGNORECASE
BasePackage 0.0 (...BasePackage-0.0...egg)
>>> import foo
>>> distributionForPackage(foo) # doctest: +IGNORECASE
FooPackage 0.0 (...FooPackage-0.0...egg)
>>> import F.G
>>> distributionForPackage(F.G) # doctest: +IGNORECASE
SiblingPackage 0.0 (...SiblingPackage-0.0...egg)
|