Re: Using file system links to unbundle python packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 








2014-06-09 12:44 GMT+02:00 Bohuslav Kabrda <bkabrda@xxxxxxxxxx>:
Another viable approach could be (not tested) replacing contents of astropy.extern.six with single line "from six import *". That'd unbundle six and wouldn't break depending libraries.


No, it doesn't work, python-2.x does relative imports in preference to absolute imports, see the last point here

http://fedoraproject.org/wiki/User:Toshio/Unbundling_Python_Modules

in fact, the directory approach doesn't work for me either with six.py, import six tries to import itself
Right. You could try using imp module to import "six" from each of "site.getsitepackages" (although you'd have to do this by importlib for python3, where "imp" is deprecated). After having the module object imported, you could bind its variables to globals of astropy.extern.six.

Slavek

--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging



--
Regards,
Bohuslav "Slavek" Kabrda.
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux