acsone / setuptools-odoo

A library to help packaging Odoo addons with setuptools. It mainly populates the usual setup.py keywords from the Odoo manifest files.
GNU Lesser General Public License v3.0
41 stars 46 forks source link

setuptools-odoo-makedefault src directory support #51

Closed idadzie closed 3 years ago

idadzie commented 3 years ago

Could there be src directory support for module packaging? My expectation using the --addons-dir option was that the autogenerated setup directory would also be created at the repository's top-level and the resultant symlink mapped correctly.

The current behaviour also generates the setup directory in the src directory.

Tree for the expected output:

.
├── setup
│  ├── module_name
│  │  ├── odoo
│  │  │  └── addons
│  │  │     └── module_name -> ../../../../../module_name
│  │  └── setup.py
│  └── README
└── src
   └── module_name
      ├── models
      │  ├── __init__.py
      │  └── model_one.py
      ├── views
      │  └── model_one.xml
      ├── __init__.py
      ├── __manifest__.py
      └── README.md
sbidoul commented 3 years ago

We could add an option to specify the location of the setup directory, although I'm not sure of why you'd want such a layout, or why it is a problem to have the setup directory in the src directory.

idadzie commented 3 years ago

At the time, my team and I wanted to group our addons in an src directory instead of the repository root to make some related scripting consistent across our Odoo repositories.