Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding project files for allowing direct pip installation #300

Open
oyale opened this issue Jan 9, 2024 · 0 comments
Open

Adding project files for allowing direct pip installation #300

oyale opened this issue Jan 9, 2024 · 0 comments

Comments

@oyale
Copy link

oyale commented Jan 9, 2024

Firstly, thank you for your remarkable work on Odoo community, including your blog and your add-ons, especially for releasing them under an open-source license.

Our deployment strategy at @coopdevs prefers using pip to install Python modules, including Odoo add-ons. pip can install modules via git, but this requires a specific configuration file in the repository. So this work was done to fit our needs, but since it's a standard process, we're creating this issue in case you find it interesting to include it in your repository.

We package add-ons by running a few commands with setuptools-odoo for add-ons until v16.0, and using whool for =>17.0

The setuptools-odoo method generates a setup folder with a setup.py file and symbolic links for each add-on, requiring no further maintenance.

The whool method is even less intrusive, only requiring a pyproject.toml file at the root of every add-on.

This would enable direct installation of CybroAddons with pip, using the git format:

pip install git+https://github.com/CybroOdoo/CybroAddons/@<branch>#egg=odooXX-addon-<module_name>&subdirectory=<setup_folder_path>

For example:

pip install "git+https://github.com/coopdevs/CybroAddons/@14.0#egg=odoo14-addon-login_user_detail&subdirectory=setup/login_user_detail"

I have applied this process to branches from 12.0 to 17.0, addressing minor versioning issues in __manifest__.py. These are in separate commits.

I've already created a PR (#299) for branch 16.0; If you are open to integrating these changes into your repository, I can create pull requests for the other branches.

Furthermore, with this change, adding some CI for auto-publishing add-ons in pypi.org should be trivial.

Regards,

Pelayo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant