How to load Dependencies

Sir,
What changes made in setup.py of a particular module, so that on installing setup.py of that particular module the dependencies of other module on which this module depends are installed directly.

If you use our cookiecutter template other tryton modules are automatically managed.

Otherwise you should add your dependencies on requires section of setup.py

Hope it helps

Sir,
Is there any module which i can refer to, and see it’s setup.py.

You can have a look at the setup.py of the product_price_list module for example. But any other tryton module uses the same pattern.

Sir,

What do I write in setup.py in order to install dependencies if they are locally present in the system(cloned from a repository)?

You should install the dependency after cloing from a repository. If the dependency is already installed it won’t be reinstalled by the setup scripts

Sir, my question is how to load the dependencies of the module which are given in it’s tryton.cfg automatically when we load the module.

in this example how will the hr_payroll and hr_hra will automatically be loaded on installing the hr_cea module. What changes should be made in setup.py.

Without loading them separately.

I think you’re mixing a lot of concepts.

If you’re talking about the concept of downloading and installing the dependencies of a python package. This is not a Tryton related question so this answer is valid for any python package. You should use pip. Something like pip install trytond-account-payment-stripe will install the account_payment_stripe Tryton module (which is also a python package) and all its dependencies.

In order for pip to know the dependencies they must be defined into setup.py. The standard setup.py script provided by Tryton modules parses the tryton.cfg file and defines correctly the tryton part of the information in setup.py, you will need to specify third-party python packages that you use manually. Keep in mind that pip uses pypi to fetch the packages so you have to publish them there first (they might be already published).