Friday, April 27, 2012

Re: Django deployment practices -- do people use setup.py?

Hi Simon,
 
I read your blog and am wondering if you considered the 'pip install –e' (edit) option of pip? I use it and it does what you are trying achieve with git submodules.
 
For example:
    $ pip install -e git+git://github.com/danielsokolowski/django-chunks.git#egg=danols-django-chunks
 
Would install django-chunks from my repo under `virtualenv/src/danols-django-chunks` and it would be a full svn repo (or git or hg) that you can push pull from.
You can also add @commit_num to install a specific commit; the benefit of this is that you can place this in your projects `requirements.txt` file as is.
 
If you I don't include the `-e` option then it would install to `virtualenv/lib/python/site-packages/`.  If you did consider the `–e` option but choose not to use it
could you sum up why you find your approach better?
 
In the end I have a mix of official packages, git repos, and project specific code split up in a directory structure like so (I feel like sharing ) :
 
    ./
    ./raw_media – ras project assets
    ./src
    ./src/django-project         – the client website, the django projects
    ./src/django-guardian     – an example of an official app modified just to this specific site but not backward compatible or worthy to be pushed back to an official repo
    ./virtualenv
    ./virtualenv/[...]         – virtual env stuff including stuff install with just 'pip install'
    ./virtualenv/src/        – repos installed with 'pip install –e' options that I can edit and push back
    .project                      – eclipse IDE file
    .pydevproject             – eclipse IDE file
    apache-conf.httpd     – apache conf that I symlink to
    django-project.wsgi     – mod_wsgi setting file
    readme.txt
    requirements.readme.txt
    requirements.txt
 
 
 
Sent: Friday, April 27, 2012 3:19 AM
Subject: Re: Django deployment practices -- do people use setup.py?
 
Hi
 
We have been using git and git submodules and just started using virtualenv and pip.
 
Submodules works well but you need a git repo of your packages. I wrote a blog post on using them: http://www.feinheit.ch/blog/2012/04/18/using-git-submodules/
 
Now we use pip for working packages like south or feincms. I still use submodules for packages still in development.
 
Regards
Simon
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/UsHUTCQQwEwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
 

Daniel Sokolowski
Web Engineer
Danols Web Engineering
http://webdesign.danols.com/

No comments:

Post a Comment