using the pip package manager for odoo

12
Using the pip package manager for Odoo Daniel Reis | OpenDays 2014

Upload: odoo

Post on 09-May-2015

2.449 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Using the pip package manager for Odoo

Using the pip package manager for Odoo

Daniel Reis | OpenDays 2014

Page 2: Using the pip package manager for Odoo

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

Page 3: Using the pip package manager for Odoo

Why pip?

Python recommended tool to install packages.

Good tooling support:• – virtualenv• – freeze, requirements.txt.• Why not?

Page 4: Using the pip package manager for Odoo

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?

Page 5: Using the pip package manager for Odoo

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

Page 6: Using the pip package manager for Odoo

i. Getting packages builtTemplate 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

Page 7: Using the pip package manager for Odoo

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

Page 8: Using the pip package manager for Odoo

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

Page 9: Using the pip package manager for Odoo

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

Page 10: Using the pip package manager for Odoo

● 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

Page 11: Using the pip package manager for Odoo

Developers? – Provide the simplest way to install OdooIntegrators? – Allow pip to be a part of dev and ops workflows. End-users? – Ease community Apps & Features discovery.

Where can we go?

Page 12: Using the pip package manager for Odoo

Thank you !

@reis_pt | dgreis(at)sapo.pt