Bugs item #1666745, was opened at 2007-02-23 05:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=723099&aid=1666745&group_id=132078

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libtpclient-py
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jure Repinc (jrepin)
Assigned to: Tim Ansell (mithro)
Summary: Help Python setuptools find modules from libtpproto-py

Initial Comment:
When I was creating ebuilds for Gentoo I stumbled upon a problem where 
libtpclient-py couldn't find some module from libtpproto-py. With the help of a 
Gentoo developer Marien Zwart it was discovered that setuptools need some help 
to make it all work. He suggested a fix where two lines:

import pkg_resources 
pkg_resources.require('libtpclient-py') 

before the line

from tp.client import version

in file setup.py from libtpclient-py

Marien Zwart explains:
if you have tp installed sitewide you *always* get the sitewide copy, 'cause 
it's defined through a .pth file, and .pth files override the local path
so if you want to use a "local" tp (which setup.py does here, that "from 
tp.client import version" is trying to get at the tp.client in the current dir) 
you *have* to go through pkg_resources.require
if you don't it only works if there is no site-wide tp install 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=723099&aid=1666745&group_id=132078
_______________________________________________
tp-bugs mailing list
[email protected]
http://mail.thousandparsec.net/cgi-bin/mailman/listinfo/tp-bugs

Reply via email to