Skip to content
Laurent Franceschetti edited this page Feb 28, 2018 · 3 revisions

Motivation

Python 2.x

The initial reason for writing this package for Python 2.x, was to allow an easy import of packages that were not properly installed, i.e. by simply indicating the relative path.

Users were often confused by the various cases, so a package would be most useful.

Python 3.x

With Python 3.x the import rules changed. While this may have pleased a part of the developpers, it remained that relative imports have become more complicated in some cases, especially when a module within a package wants to call a sibling, or a neighbouring package (the .. notation does not allow going out of a package).

Repackage is thus still useful, for developpers who want maximum flexibility (and reliability) in organizing their packages. Basically, it bypasses the limitations of Python 3 (whether one considers it a good or a bad thing is a philosophical matter).

Installing

You can either install it from Pypi:

$ pip install repackage

Or attach to this repository and run:

$ python setup.py install

According to your settings, you may need to replace python by either python2 or python3 according to the Python version for which you want to install repackage.

Clone this wiki locally