Using the "pip" package manager for Odoo/OpenERP - Opendays 2014

3,311 views

Published on

Discussing a solution to package Odoo/OpenERP modules in pip installable packages, providing a public index for them, and installing using the pip python tool.

Published in: Software, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,311
On SlideShare
0
From Embeds
0
Number of Embeds
369
Actions
Shares
0
Downloads
37
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Using the "pip" package manager for Odoo/OpenERP - Opendays 2014

  1. 1. Using the pip package manager for Odoo Daniel Reis | OpenDays 2014
  2. 2. Who am I Daniel Reis – Applications Manager at Securitas Portugal – 15+ years in IT, most as a consultant – 3 yrs working with Odoo/OpenERP – Active participant in the Odoo Community
  3. 3. Why pip? Python recommended tool to install packages. Good tooling support: • – virtualenv • – freeze, requirements.txt. • Why not?
  4. 4. Issues to address ● How to build the pip packages? – setup.py for server & addons. – Package version numbers. – Support for “series” (v7, v8) . – Automate the builds for module repos. ● How to distribute packages? – Use PyPi? Or create another index?
  5. 5. What do we need to consider? i. Build module packagesi. Build module packages ii. Distribute packagesii. Distribute packages iii. Install and updateiii. Install and update
  6. 6. i. Getting packages built Template setup.py for modules* – Target into site-packages/openerp/addons/ – Versions: bzr revno; git/hg unix timestamp.→ → – A build tool: pipo build command Modified Server setup.py* – Packaged as “openerp-base” – Add basic web dependencies * Based on Vo Minh Thu's work: https://github.com/noteed/openerpdist
  7. 7. pipo: pip for OpenERP Module packager: build command. Wrapper around pip (todo!): – install and update modules. – “glue” pip with server commands. Source: https://github.com/dreispt/pipo ● $ pipo build ./addons-dir ./pkgs-dir ● $ pipo install openerp-sale
  8. 8. Pypi-line index distribution openerpapps.info – Channels/series: openerp/8.0, ocb/7.0, … – Server dependencies included in Index: skip PyPi. Automated builds with pipo.py – Only changed modules are rebuilt. – Multiple vcs support: bzr, git, hg. ii. Distributing the packages
  9. 9. Iii. Installation the pip way ● $ virtualenv --system-site-packages mydemo ● $ source mydemo/bin/activate $ pip install --index-url http://openerpapps.info/simple/openerp/7.0 openerp-sale
  10. 10. ● Distribute “Apps”, or maybe “Repos”? – autoinstall glue modules – res.config module installation ● Painless pip install – Wrap pip “boilerplate” options – pip install/update server install/update→ ● Painless server provisioning – Script additional config tasks ● Missing CLI capabilities – Update module list, uninstall ● Webclient GUI? Issues still to address
  11. 11. Developers? – Provide the simplest way to install Odoo Integrators? – Allow pip to be a part of dev and ops workflows. End-users? – Ease community Apps & Features discovery. Where can we go?
  12. 12. Thank you ! @reis_pt | dgreis(at)sapo.pt

×