installing directly from checkout with pip

82 views
Skip to first unread message

akaihola

unread,
Mar 11, 2009, 4:38:05 AM3/11/09
to South Users
I'm trying to install south in a virtualenv directly from a checkout:

$ pip install -E /tmp/test -e svn+http://svn.aeracode.org/svn/south/
trunk#egg=south
Checking out south from svn+http://svn.aeracode.org/svn/south/
trunk#egg=south checkout from svn+http://svn.aeracode.org/svn/south/
trunk#egg=south
Checking out http://svn.aeracode.org/svn/south/trunk to ./src/south
Running setup.py egg_info for package south
Installing collected packages: south
Running setup.py develop for south
Creating /tmp/test/lib/python2.5/site-packages/South.egg-link
(link to .)
Adding South 0.4 to easy-install.pth file

Installed /tmp/test/src/south
Successfully installed south

$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import south
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named south

The problem is probably that the trunk directory is actually the south
package. Apps which place their package inside trunk seem to work
correctly.

Is there a pip 0.3.1 option I'm missing? Or any tricks to make this
work?

akaihola

unread,
Mar 11, 2009, 5:46:07 AM3/11/09
to South Users
The same problem exists when using setup.py develop:

(test)/tmp/south $ python setup.py develop
running develop
running egg_info
writing South.egg-info/PKG-INFO
writing top-level names to South.egg-info/top_level.txt
writing dependency_links to South.egg-info/dependency_links.txt
reading manifest file 'South.egg-info/SOURCES.txt'
writing manifest file 'South.egg-info/SOURCES.txt'
running build_ext
Creating /tmp/test/lib/python2.5/site-packages/South.egg-link (link
to .)
Adding South 0.4 to easy-install.pth file

Installed /tmp/south
Processing dependencies for South==0.4
Finished processing dependencies for South==0.4

(test)/tmp/test $ python

akaihola

unread,
Mar 11, 2009, 5:51:19 AM3/11/09
to South Users
Okay, found this:
http://mail.python.org/pipermail/distutils-sig/2008-March/009125.html

>>> This use of package_dir is not compatible with 'develop'. For
>>> 'develop' to work on a project, you may not have any non-empty keys in
>>> package_dir. If you want to use develop with this project, you will
>>> have to alter your directory layout so that 'core' is under 'extern',
>>> or else move the 'extern' modules out of 'extern' and up to the
>>> top-level directory, and update (or get rid of) package_dir accordingly.

Time for changing the directory layout of the south repository?

Andrew Godwin

unread,
Mar 11, 2009, 6:14:28 AM3/11/09
to south...@googlegroups.com
Yeah, I've commented on the ticket about this. I'm very annoyed that I
didn't remember to do this before a release.

I'm willing to change it, but I think there has to be some plan for the
people (like me) who already use svn:externals, and would be terribly
surprised when an update suddenly broke everything.

However, I suspect we can get around that by either using a .pth file,
perhaps, or an __init__.py that does some sickening tricks, with an
appropriate depreciation message.

Andrew

Eric Walstad

unread,
Apr 3, 2009, 1:50:17 PM4/3/09
to South Users
Hi Andrew

On Mar 11, 3:14 am, Andrew Godwin <and...@aeracode.org> wrote:
> I'm willing to change it, but I think there has to be some plan for the
> people (like me) who already use svn:externals, and would be terribly
> surprised when an update suddenly broke everything.

That's what happened to me this morning. Thanks for the
DeprecationWarning. It was helpful to point me to the problem
description. However, the fix is a little lacking. I couldn't edit
the wiki, so I tried to post a comment to ticket #88, but Akismet
thought my comment was spam and rejected it.

Do I need a trac login to be able to post comments to tickets?

Here's the comment that I tried to post to the ticket
----


It looks like your docs haven't been updated to reflect this change.
Shouldn't the [/wiki/Download Download] and [/wiki/Tutorial Tutorial]
wikis be changed from
{{{
svn co http://svn.aeracode.org/svn/south/trunk south
}}}

to

{{{
svn co http://svn.aeracode.org/svn/south/trunk/south south
# or just
# svn co http://svn.aeracode.org/svn/south/trunk/south
}}}

Also, a tip on your [/wiki/DirectoryMove Directory Move] wiki
explaining how to change the svn external definition would be
helpful. I'm pretty new to svn externals but here's how I did it:
{{{
# Assumes directory structure: my_project/my_django_app/south
cd /path/to/my_project
svn propedit svn:externals my_django_app
# in editor, edit the line for south so that it looks like this:
# south http://svn.aeracode.org/svn/south/trunk/south

# Commit the change to svn
svn commit -m "Switched the svn external pointing to south so that it
now points at the new location in South's repository. See also:
http://south.aeracode.org/wiki/DirectoryMove"
}}}
----

Eric.

Andrew Godwin

unread,
Apr 3, 2009, 2:49:48 PM4/3/09
to south...@googlegroups.com
Eric Walstad wrote:
>
> That's what happened to me this morning. Thanks for the
> DeprecationWarning. It was helpful to point me to the problem
> description. However, the fix is a little lacking. I couldn't edit
> the wiki, so I tried to post a comment to ticket #88, but Akismet
> thought my comment was spam and rejected it.
>
> Do I need a trac login to be able to post comments to tickets?
>

Not at all, but Akismet just sometimes is a little eager. It's that,
though, or constant spam, unfortunately.

> Here's the comment that I tried to post to the ticket
> ----
>
>
> It looks like your docs haven't been updated to reflect this change.
> Shouldn't the [/wiki/Download Download] and [/wiki/Tutorial Tutorial]
> wikis be changed from
> {{{
> svn co http://svn.aeracode.org/svn/south/trunk south
> }}}
>
> to
>
> {{{
> svn co http://svn.aeracode.org/svn/south/trunk/south south
> # or just
> # svn co http://svn.aeracode.org/svn/south/trunk/south
> }}}
>
> Also, a tip on your [/wiki/DirectoryMove Directory Move] wiki
> explaining how to change the svn external definition would be
> helpful. I'm pretty new to svn externals but here's how I did it:
> {{{
> # Assumes directory structure: my_project/my_django_app/south
> cd /path/to/my_project
> svn propedit svn:externals my_django_app
> # in editor, edit the line for south so that it looks like this:
> # south http://svn.aeracode.org/svn/south/trunk/south
>
> # Commit the change to svn
> svn commit -m "Switched the svn external pointing to south so that it
> now points at the new location in South's repository. See also:
> http://south.aeracode.org/wiki/DirectoryMove"
> }}}

Yes, good point. I'll also include the fix that I applied, which is
where you simply change the import path.

Andrew

Reply all
Reply to author
Forward
0 new messages