source: isenes/mpl_buildout/trunk/recipes/numpy_venv.py @ 5435

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/isenes/mpl_buildout/trunk/recipes/numpy_venv.py@5435
Revision 5435, 1020 bytes checked in by spascoe, 11 years ago (diff)

Work in progress

Line 
1"""
2A recipe to install numpy into a virtualenv environment.
3
4"""
5
6import logging, os, zc.buildout
7from zc.buildout.easy_install import install
8
9from recipe import BaseRecipe
10
11class NumpyVenv(BaseRecipe):
12
13    def __init__(self, buildout, name, options):
14        self.name, self.options = name, options
15
16        #!TODO: support buildout.python option
17        options['executable'] = buildout['buildout']['executable']
18        options['virtualenv'] = os.path.join(
19            buildout['buildout']['parts-directory'],
20            name
21            )
22        options['eggs-directory'] = buildout['buildout']['eggs-directory']
23       
24        if 'eggs' not in options:
25            options['eggs'] = 'numpy'
26
27    def install(self):
28        path = self.options['virtualenv']
29
30        # First install numpy using buildout
31        install(self.options['eggs'].split(), self.options['eggs-directory'])
32           
33        #self.create_virtualenv(path)
34       
35        return path
36   
37    def update(self):
38        pass
39
40   
Note: See TracBrowser for help on using the repository browser.