Distributing multiple packages with on setup.py

dieter dieter at handshake.de
Sat Sep 30 02:11:09 EDT 2017


Jimmy Thrasibule <thrasibule.jimmy at gmail.com> writes:
> ...
> Is it possible, still keeping one unique ``setup.py`` file, to create
> 3 independent packages?
>
> * ``myproj.common``
> * ``myproj.subpackage1``
> * ``myproj.subpackage2``
>
> Also I'd like to specify that when installing ``myproj.subpackage1``,
> ``myproj.common`` is required or that ``myproj.subpackage2`` will
> require both ``myproj.common`` and ``myproj.subpackage1``.

Yes - in principal - but ...
the "setup.py" essentially contains the "setup" function call
and this call needs package specific parameter values (e.g.
the package name, the package dependencies, ...).
If you want a single "setup.py", this "setup.py" must use
some (potentially sophisticated) logic to determine those
package specific parameters and select (depending on the context)
which parameter set to pass on to the "setup" function call.

Personally, I never want interested in this approach.




More information about the Python-list mailing list