Question

I'm using Paste to run a Pylons application. Is there a way to specify in my paste config file to use the egg from the current directory (the same dir as the config file) instead of looking in global site-packages?

For example, right now the config file has:

[app:main]
use = egg:example

This definitely looks to site-packages. This wouldn't be a problem, except I'm running two versions of the same egg on the same server in a deployable, programmatic way, so I need to be able to deploy them from somewhere besides site-packages.

Thanks.

Was it helpful?

Solution

One way to use several versions of python package on the same system is virtualenv. It works by creating sandboxed environments. All global packages are "visible" from sandboxed environment, but you can install new packages inside the sandbox environment that won't affect rest of the system. I've successfully used this approach to host development and production version of a Pylons webapp on single server.

OTHER TIPS

Read this similar question, at least one of the answers should help you: Making Python Use Code in My Directory (not that in /usr/...)

UPDATE: You could rename the local module to something slightly different, like example_local.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top