ppouliot/puppet-openstack_hyper_v — pull request #17 by luisfdez (2013-07-24 12:39:11+00:00)
Title: Python dependecy refactoring

Hi Peter,

First of all, do not merge! hehe, it's not yet ready.

This is a big refactoring for handling the python dependencies. They key points are basically:
* I've created a python_dependency.pp class to handle the installation of the dependencies, and it accepts the following types:
* msi: the given name must match the DisplayName of the package as a normal windows package on puppet.
* pip: the given name is the name of the pip package, as the pip provider is call. PENDING: make pip available in the system path.
* exe: the complex one and not yet fully implemented. It basically extract the exe, and copies the following folders. The name given in this case must be the name of the egg-info file. I have to implement the conditions to prevent this case to be executed every puppet run.
* PLATLIB to C:\Python27\Lib\site-packages (used by all the modules).
* SCRIPTS to C:\Python27\Scripts (used by pywin32).
* HEADERS to C:\Python27\ (used by greenlet that needs 'include\greenlet\greenlet.h').
* python.pp: this class now basically installs Python+EasyInstall+Pip and adds references to all the dependencies in the new way.
* An alternative in this case is to split this class in two: one to install Python+ez+pip, and the other one just to contain the nova dependencies (nova_dependencies.pp?).

What do you think about it? The advantage of this option is that we can reuse a lot of code for each module and it's still flexible enough to launch post-installation scripts like the ones needed by pywin32.

Please, take a look and... show me you feedback!

Saludos!