This might be semi weird. I've got a client that wants to be able to
run an application without installing per se. They've currently got
everything checked into an SCM, and want to be able to pull it down
and type "make serve" and have the server start running. They are
doing pure WSGI right now but would like to move to a web framework.
Has anyone done something like this with Pylons? (ie have Pylons and
it's dependencies in SCM, rather than having to install them). It
looks like PIP with it's support for "editable" packages might work.
Any suggestions?
thanks
-matt
Does SCM mean version control system?
> and want to be able to pull it down
> and type "make serve" and have the server start running. They are
> doing pure WSGI right now but would like to move to a web framework.
>
> Has anyone done something like this with Pylons? (ie have Pylons and
> it's dependencies in SCM, rather than having to install them). It
> looks like PIP with it's support for "editable" packages might work.
> Any suggestions?
I would hesitate to put the entire virtualenv into version control
because the Python executable is a binary, there are symlinks from the
lib directory to the system Python, and also .so files (binary) in the
lib directory. These all will work only on the same computer, or at
least one with identical paths, OS, and Python version.
You can set up a "make" command to create a virtualenv on the
destination system and install the application into it (using editable
as you said).
--
Mike Orr <slugg...@gmail.com>
Yes.
>
>> and want to be able to pull it down
>> and type "make serve" and have the server start running. They are
>> doing pure WSGI right now but would like to move to a web framework.
>>
>> Has anyone done something like this with Pylons? (ie have Pylons and
>> it's dependencies in SCM, rather than having to install them). It
>> looks like PIP with it's support for "editable" packages might work.
>> Any suggestions?
>
> I would hesitate to put the entire virtualenv into version control
> because the Python executable is a binary, there are symlinks from the
> lib directory to the system Python, and also .so files (binary) in the
> lib directory. These all will work only on the same computer, or at
> least one with identical paths, OS, and Python version.
>
> You can set up a "make" command to create a virtualenv on the
> destination system and install the application into it (using editable
> as you said).
>
I want to avoid having to download anything from pypi (or the network
other than the SCM). So I would think my options are to stuff it all
in the SCM as virtualenv, or have a way to do local installs.
cheers,
-matt
You can put the source tarballs in a SCM directory, and use
pip/easy_install options to look only in that directory.
--
Mike Orr <slugg...@gmail.com>
* Created a virtualenv for pylons dependencies
* Created a pylons project using said env
* Removed references to simplejson in Pylons and WebError requires.txt
files. (I know that my XP box has Python 2.6 on it which includes
json). Since simplejson has c libraries, the virtualenv version won't
work on windows (it's linux specific).
* Created a simplejson.py stub in virtualenv site-packages that has
the following "from json import *"
* Created a batch file that runs the server :
SET PYTHONPATH=pylonsenv\lib\python2.6\site-packages;pylons_server\
python pylonsenv\bin\paster serve pylons_server\development.ini
Now it works on my linux dev box and the ms deploy box. I realize
this might be a contrived example, but it's what the doctor... (er
client) ordered.
cheers,
-matt
On Mon, Oct 19, 2009 at 11:47 AM, m h <sesq...@gmail.com> wrote:
> Just a follow up on what I did to get it working. Working here means
> to be able to checkout a project and run a command to start the server
> (no installs or hitting external sites to download stuff). This must
> work on XP, but main development is going on in OSX and linux.
>
> * Created a virtualenv for pylons dependencies
> * Created a pylons project using said env
* Copied pkg_resources.py into virtualenv site-packages