[OVC-demo-team] Re: BRP on Fedora 1

From: David Mertz <voting-project_at_gnosis_dot_cx>
Date: Wed Apr 07 2004 - 02:40:33 CDT

> - python setup_gnosis.py build
> - python setup_gnosis.py install
> I really and seriously wish there had been an option to simply let
> me
> put it into my own directory hierarchy or at least
> /usr/local/lib/....
> I consider /usr/lib to be sacrosanct to distro-only stuff and find
> this
> to be a significant issue.

This is not an issue about Gnosis Utilities, but is the behavior of ALL
Python packages (at least those installed with distutils, which is
standard).

Fortunately, you can modify installation behavior, try:

   % python setup_gnosis.py --help # general distutils options
   % python setup_gnosis.py install --help # options for install

What you probably want is:

   % python setup_gnosis.py install --prefix=/some/local/dir

That said, all you need from Gnosis Utils is the few files in the
directory brp/gnosis_local/ that I bundled in
<http://gnosis.cx/secret/BRP.zip>. You don't need to use the funny
name gnosis_local, I just changed that to avoid accidental conflict
with the "real" Gnosis Utils package (which *is* included with several
Linux distributions: Debian, Gentoo, maybe more, also OpenBSD and
FreeBSD).

> rpm -Uvh PyQt-3.8.1-2.i386.rpm sip-3.8-1.i386.rpm

Incidentally, I think these were probably both installed into /usr/lib
too. But it is true that the distribution packager explicitly included
them.

> The evm2003 subdirectory is taken from the python/evm2003 directory
> hierarchy
> and appears to contain various utility modules.

Here too, all you actually need are the couple files I put in
brp/evm2003/. Nothing wrong with including the whole EVM2003 package
(but it should have it's own setup.py to install it... I'll create that
when a little of the current chaos settles).

> 5. In the brp subdirectory modifed wizard.py around line 565 so that
> it
> is now:
> if state is True or state == 1:

You could also express this as 'if state in (True,1):'. However, the
better approach is to use equality rather than identity in the test.
That is: 'if state==True:'. I am 99% certain that this change will fix
the problem Fred has informed me of.

In recent Python versions, booleans are a subclass of integers, and
True/False are *equal* but not *identical* to 1/0. (just like floats
are equal/non-identical to ints)

I.e.

   $ python
   Python 2.2.2 (#1, Aug 5 2003, 00:44:22)
   [GCC 3.3 20030304 (Apple Computer, Inc. build 1435)] on darwin
   Type "help", "copyright", "credits" or "license" for more information.
>>> True is 1
   0
>>> True == 1
   1
>>> 1.0 is 1
   0
>>> 1.0 == 1
   1

Python 2.3 behaves just the same here. Same change around line 655,
presumably.

HTH.

---
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is to the
21st century what the slave trade was to the 16th.
==================================================================
= The content of this message, with the exception of any external 
= quotations under fair use, are released to the Public Domain    
==================================================================
Received on Sat Nov 22 03:47:07 2008

This archive was generated by hypermail 2.1.8 : Sat Nov 22 2008 - 03:47:30 CST