[Fedora-packaging] Using file system links to unbundle python packages

Michael Schwendt mschwendt at gmail.com
Mon Jun 9 12:07:33 UTC 2014


On Mon, 9 Jun 2014 13:43:53 +0200, Sergio Pascual wrote:

> So, do you mean changing things like:
> 
> from ...extern.six.moves.http_client import HTTPSConnection
> 
> to
> 
> try:
>     from six.moves.http_client import HTTPSConnection
> except ImportError:
>     from ...extern.six.moves.http_client import HTTPSConnection
> 
> everywhere in the code? Surely upstream is not going to to accept it.

Well, you've mentioned already that the "extern" module path is considered
part of the API, so changing the import statements would need to happen
within those files.
It depends a bit on how exactly the bundling is done, i.e. whether entire
Python module directory trees are copied without modifications. If upstream
needed to adjust the copied modules everytime a new version is needed,
that could get tiresome (without using helper scripts).

> What they could accept is a mechanism in  extern.six to load the system
> package when is available and the bundled package when it is not. The same
> for the other packages (ply, pytest, etc). But that's what I'm trying to
> avoid by linking.

For every symlink you would be missing a strict dependency on the target file,
unless you would add them as RPM Requires on file paths. If the structure
of the system Python module changed, that would break the symlinks. And if
a bundled module is newer/older than its corresponding system module,
there could be new/old files with no target to link with.


More information about the packaging mailing list