How to use the virtualenv.virtualenv function in virtualenv

To help you get started, we’ve selected a few virtualenv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NCPP / ocgis / ocgis_merge / fabfile / tasks_system.py View on Github external
sudo('apt-get -y install python-pip')
    sudo('pip install virtualenv')
    sudo('pip install virtualenvwrapper')
    
    with settings(warn_only=True):
        run('mkdir ' + VIRTUALENVDIR)
    # create the Python virtual environment
    with prefix(VIRTUALENVWRAPPER_ACTIVATE):
        run('mkvirtualenv --no-site-packages ' + VIRTUALENVNAME)
    
    # install symbolic link in the virtual environment to GDAL
    with settings(warn_only=True):
        run('ln -s ' + GDAL_DIR + '/bin/gdal-config ' + \
                '~/.virtualenvs/' + VIRTUALENVNAME + '/bin/gdal-config')
    
    with virtualenv():
        run('pip install yolk')
        run('pip install Django==1.3')
        run('pip install django-piston')
        run('pip install -e hg+https://bitbucket.org/tylere/django-piston#egg=piston')
        run('pip install numpy==1.5.1')
        run('pip install Shapely')
        run('pip install geojson')
        run('pip install geoalchemy')
        with prefix('export HDF5_DIR=' + HDF5_DIR):
            with prefix('export NETCDF4_DIR=' + NETCDF4_DIR):
                run('pip install netCDF4==0.9.4')
        # install the GDAL Python bindings
        run('pip install --no-install GDAL')
        # build package extensions 
        with cd('$HOME/.virtualenvs/' + VIRTUALENVNAME + '/build/GDAL'):
            run('python setup.py build_ext' + \
github NCPP / ocgis / ocgis_merge / fabfile / tasks_system.py View on Github external
def install_pykml():
    '''Install pyKML and dependencies'''
    from virtualenv import virtualenv
    
    sudo('apt-get -y install libxml2')
    sudo('apt-get -y install libxslt1.1 libxslt-dev')    
    with virtualenv():
        run('pip install pykml')
github NCPP / ocgis / ocgis_merge / fabfile / django_tasks.py View on Github external
def register_archive_usgs_cida_maurer():
    '''Register the USGS CIDA Maurer et al. downscaled archive'''
    with cd('$HOME/.virtualenvs/openclimategis/src/' + \
                               'openclimategis/src/openclimategis'):
        with virtualenv():
            run('./manage.py register_archive' + \
                ' http://cida.usgs.gov/qa/thredds/dodsC/maurer/monthly')
github NCPP / ocgis / ocgis_merge / fabfile / django_tasks.py View on Github external
def install_openclimategis_django():
    '''Install OpenClimateGIS GeoDjango project'''
    with virtualenv():
        run('pip install -e git+http://github.com/tylere/OpenClimateGIS#egg=openclimategis')
github NCPP / ocgis / ocgis_merge / fabfile / django_tasks.py View on Github external
def syncdb():
    '''Synchronizes the Django database tables'''
    with cd('$HOME/.virtualenvs/openclimategis/src/openclimategis/src/openclimategis'):
        with virtualenv():
            # suppress input prompting for a superuser
            run('./manage.py syncdb --noinput')
github NCPP / ocgis / ocgis_merge / fabfile / django_tasks.py View on Github external
def create_superuser():
    '''Creates a Django superuser that can log into the Django admin'''
    with cd('$HOME/.virtualenvs/openclimategis/src/openclimategis/src/openclimategis'):
        with virtualenv():
            run('./manage.py createsuperuser')
github NCPP / ocgis / ocgis_merge / fabfile / database.py View on Github external
def install_psycopg2():
    '''Install the Python PostgreSQL database adapter'''
    with virtualenv():
        run('pip install psycopg2==2.4')
github NCPP / ocgis / ocgis_merge / fabfile / django_tasks.py View on Github external
def update_openclimategis_django():
    '''Update the OpenClimateGIS GeoDjango project'''
    with virtualenv():
        with cd(VIRTUALENVDIR + VIRTUALENVNAME + '/src/openclimategis'):
            run('git pull')