[CentralOH] pip freeze / subversion / setup.py

Mark Erbaugh mark at microenh.com
Fri Jul 1 17:12:19 CEST 2011


Hi,

First question:

I'm trying to set up workspaces in subversion such that I can get a repeatable build environment.  I use virtualenv to create a base environment then checkout my project into that environment. One of the files checked out is setup.py that uses setuptools to populate the virtualenv's site-packages with needed libraries.

Things seem to be working for me, but I just noticed that on a couple of my older projects that were already in svn version control that I then added setup.py and related files to, pip freeze reports some sort of svn warning:

> svn URL does not fit normal structure (tags/branches/trunk): http://server.local/svn/buildexams2/trunk/src
> -e svn+http://server.local/svn/buildexams2/trunk/src@28#egg=BuildExams-dev_r28


Other than that things seem to be working as expected.  What is this warning telling me?  Is it something to be concerned about? How do I fix it?

One thing that's interesting is that it appears to reference version 28.  The current version as reported by svn info is 30.  On the other project, the version in the warning seems to be 33, and what's strange is that svn info reports version 30.

Here's my setup.py

> from setuptools import setup, find_packages
> 
> setup(
>     # basic package data
>     name = "BuildExams",
>     version = "2.04b",
> 
>     # package structure
>     packages=find_packages('src'),
>     package_dir={'':'src'},
> 
>     install_requires = [ 
>         'reportlab==2.5',
>         'pdfrw==0.1',
>         'nose==1.0.0',
>         ],  
>     test_suite='nose.collector',
> )



Second question.

In this particular workspace, to complete the setup I need to copy a couple of files to specific locations within the directory structure created by virutalenv. I'm not checking these directories into version control.  This is a workaround to get wxPython working with virtualenv. See Robin Dunn's post: http://wiki.wxpython.org/wxPythonVirtualenvOnMac 

Is there a way to include the copying in setup.py. My first attempt is to use subprocess and call cp. The problem with that is that it gets called everytime setup.py is invoked and I think I only need the copying to be done if setup.py is invoked with install or develop.  I'm sure I could check sys.argv and respond appropriately, but I wonder if setuptools.setup already has hooks that I should be using?

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/centraloh/attachments/20110701/89642952/attachment.html>


More information about the CentralOH mailing list