[4suite] Re: [XML-SIG] problem whith the error " ImportError:
cannot import name boolean"
Uche Ogbuji
uche.ogbuji@fourthought.com
26 Jul 2002 23:52:55 -0600
On Fri, 2002-07-26 at 13:49, Mike Olson wrote:
> On Fri, 2002-07-26 at 12:00, Uche Ogbuji wrote:
> >
> > Can't we fix this with an import hook inside Ft/Lib/__init__.py?
> >
> > I'm sure that's not clear, so I'll do a bit of experimentation and
> > report back.
>
>
> Nope, unless we move DistExt.
>
> The problem is that in setup.py we do "from Ft.Lib import DistExt". If,
> in Ft/Lib/__init__.py you mess with boolean, which does not exist at
> install time, then we won't be able to install.
Was this meant to be a challenge? No better way to get me to fix the
problem :-)
And fix it I did. No boolean.py necessary. All I did was use
os.environ to flag when we were in setup.py.
I tested it after blowing away build and site-packages/Ft. Works. It
gives the error message in the install dir, and doesn't outside of it.
All is well, I think.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Track chair, XML/Web Services One Boston: http://www.xmlconference.com/
Basic XML and RDF techniques for knowledge management, Part 7 -
http://www-106.ibm.com/developerworks/xml/library/x-think12.html
Keeping pace with James Clark -
http://www-106.ibm.com/developerworks/xml/library/x-jclark.html
Python and XML development using 4Suite, Part 3: 4RDF -
http://www-105.ibm.com/developerworks/education.nsf/xml-onlinecourse-bytitle/8A1EA5A2CF4621C386256BBB006F4CEC