I have a source tree that looks about like this:
/app/backend/module.py
/app/cli/module.py
/app/common/module.py
Now I want to build three packages, app-backend
, app-cli
and app-common
out of this which should be distributable and be usable separately.
I’d like to keep the code in one repository because I’d like to keep things together and it’s not so much code yet anyway.
What is the most standard and future-proof way to do this with setuptools (or is there a better fit)? I am not building for Python 2.7 or such, I would be fine if it will only work with the most current tools.
I didn’t know that you could use multiple setup(…) calls in one setup.py
You cannot, this is invalid. Please see documentation at the following location: https://python-packaging.readthedocs.io/en/latest/minimal.html
"The main setup config file, setup.py, should contain a single call to setuptools.setup()"
While setuptools does not initially complain, problems start occurring when you try to upload or install the package; with one packages metadata leaking into the later.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With