Hi Dale, if your goal is to create a new module, the steps can be different. tryton-env is only necessary if you want to contribute/develop on the Tryton source itself.
To develop a new module, you could for example use the cookie-cutter Tryton module template:
On Linux, you can do it like this:
mkdir my_module
cd my_module
python3 -m venv venv --prompt my_module # this creates a python virtualenv under the directory 'venv'
source venv/bin/activate # activates the virtualenv for the current terminal session
pip install cookiecutter
cookiecutter hg+https://hg.tryton.org/cookiecutter
cookiecutter
will ask for details about your module. Name, description, etc. Set the version to 6.0.0 to develop from the latest stable version of Tryton. The command will create another folder, which comes with all the files you need to start creating your module. You can keep the files in that folder, or move everything to the first folder you created mv my_module/* my_module/.* .; rmdir my_module
. I did it like this so that you install cookiecutter in the virtualenv.
Then you can install the module in development mode python my_module/setup.py develop
. This will install all the tryton dependencies in your virtual env. It also detects other trytond_module
that you declared in the tryton.cfg
file. If you have your own dependencies, you need to add them to setup.py
. For your own dev dependencies, like linting, for example, you can list them on a requirements-dev.txt
— which you’ll need to install with pip install -r requirements-dev.txt
.
There is also this guide for creating a new module, which is different for developing on tryton. The guide goes beyond creating the dev env and installing dependencies. How to setup environment to create a new module - #11 by mwl