Re: [Zope] Re: zope 2.8.6 on Mac Intel

2006-04-15 Thread manuel spuhler
Hello David,  sorry, I meant you before, but hey, hello too Dieter ;-)

I think I broke the thread, sorry for reposting:

I finally manage to install and run Zope 2.8.6 on Mac Intel after
installing the Universal package of python 2.4.3 for os x
(http://www.python.org/download/releases/2.4.3/).

Then I did the usual unix stuff:
$./configure --with-python=/usr/local/bin/python --prefix=/opt/Zope2.8
 make make install
$ /opt/Zope2.8/bin/mkzopeinstance.py

Even if this Python version is not supported, I didn't notice (yet;-)
any problem. As far as I know, it's the 1st Zope 2.8.6 and Plone 2.11
on Mac Intel and it's at least as fast as on Linux !!!

Thank you all for your help and happy zoping!

Manuel


Zope Version
(Zope 2.8.6-final, python 2.4.3, darwin)
Python Version
2.4.3 (#1, Mar 30 2006, 11:02:16) [GCC 4.0.1 (Apple Computer, Inc. build 5250)]
System Platform
darwinope Version
(Zope 2.8.6-final, python 2.4.3, darwin)
Python Version
2.4.3 (#1, Mar 30 2006, 11:02:16) [GCC 4.0.1 (Apple Computer, Inc. build 5250)]
System Platform
darwin
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Install 2.9.2 fails with error: must supply either home or prefix/exec-prefix -- not both

2006-04-15 Thread Jerry Westrick
Hello all

I've done a clean install SUSE 10.1 RC1.
(Yes I know it's new, and probably the problem)

I've downloaded Zope 2.9.2

And executed the installation as described in the readme.txt.

I've tried it with both --prefix and without.

Any Ideas where to look would be appreceated...

Here the result of the installation:

log2:/backup/install/zope # tar -zxf Zope-2.9.2.tgz
log2:/backup/install/zope # cd Zope-2.9.2
log2:/backup/install/zope/Zope-2.9.2 # ./configure

Configuring Zope installation

Testing for an acceptable Python interpreter...

Python version 2.4.2 found at /usr/bin/python

The optimum Python version (2.4.2) was found at /usr/bin/python.

log2:/backup/install/zope/Zope-2.9.2 # make
/usr/bin/python install.py -q build
Dependencies/ExtensionClass-Zope-2.9.2/ExtensionClass/_ExtensionClass.c: In 
function ?PyExtensionClass_Export_?:
Dependencies/ExtensionClass-Zope-2.9.2/ExtensionClass/_ExtensionClass.c:768: 
warning: cast from pointer to integer of different size
log2:/backup/install/zope/Zope-2.9.2 # make install
/usr/bin/python install.py -q build
/usr/bin/python install.py -q install --skip-build --home 
/usr/local/Zope-2.9.2
error: must supply either home or prefix/exec-prefix -- not both
make: *** [install] Error 1
log2:/backup/install/zope/Zope-2.9.2 #  
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Install 2.9.2 fails with error: must supply either home or prefix/exec-prefix -- not both

2006-04-15 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 16 Apr 2006, at 00:11, Jerry Westrick wrote:


Hello all

I've done a clean install SUSE 10.1 RC1.
(Yes I know it's new, and probably the problem)

I've downloaded Zope 2.9.2

And executed the installation as described in the readme.txt.

I've tried it with both --prefix and without.

Any Ideas where to look would be appreceated...


It worked fine for me right now by doing...

./configure --prefix=`pwd` --force
make
make install

I had to use --force because the --prefix already existed, it was the  
folder created by untarring the source tarball.


jens

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEQX9jRAx5nvEhZLIRAnnJAJ9XDGmgFcjiENUUPIcB/Kmlv6NjQwCgqNys
cMrpzgy5Ad+VCTxLArx7opo=
=C+mn
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Generic SQL insert

2006-04-15 Thread Michael Shulman
Robert (Jamie) Munro [EMAIL PROTECTED] wrote:
 I'd much rather have a dictionary of fields and values, and just throw
 it at the DB, not having to make those queries for every table. I have
 acheived it like so:

I have achieved a similar result, although for update methods in my
case, in what I think is a slightly better way (although probably
people on this list will tell me I'm wrong).  Rather than having a
single generic ZSQL method, I have one ZSQL method for each table, but
intsead of writing them all by hand I have a single script which
generates/regenerates them from inspection of the columns in the
database, like so:


# select some arbitrary record from the table into table_data, then:
fields = table_data.data_dictionary()
arguments = 
comma = 
print update %s set % table

types = {'s':nb, 'd':nb, 'i':int, 'n':nb}
for field in fields.keys():
   arguments = arguments + field +  
   type = types[fields[field][type]]
   print%s%s = dtml-if expr=\%s is
None\nulldtml-elsedtml-sqlvar %s type=\%s\ optional/dtml-if
% (comma, field, field, field, type)
   comma = ,

print  where %s = dtml-sqlvar %s type=\int\ % (id_field, id_field)

# update_zsql is the ZSQL update method I am creating/updating
update_zsql.manage_edit('','database_name',arguments,printed)


This way, all the columns are assigned the correct type, but the
calling script doesn't have to handle types or casts, since all the
types are assigned by inspecting the actual database.  Also, this way
the update/insert will fail if any fields are missing.

Actually, given how object-oriented Zope is in general, I was
surprised to find that its database interface (ZSQL methods) still
requires the user to write SQL code essentially by hand, rather than
using an object-relational mapper like SQLObject.  There appears to be
a  toolkit called sqlos for using SQLObject with Zope 3, but I haven't
yet tried it out.


 mydict = {field1:value1 , field2:value2 ,...}
 (fields,values)=zip(*myDict.items())
 context.genericInsert(table='table name',fields=fields,values=values)

 Where generic insert is the following ZSQL method:
 insert into dtml-var table
  (dtml-in expr=fieldsdtml-var sequence-itemdtml-if
 sequence-enddtml-else,/dtml-if/dtml-in)
  values (dtml-in expr=valuesdtml-sqlvar sequence-item
 type=stringdtml-if sequence-enddtml-else,/dtml-if/dtml-in);

 with parameters:
 * table - table name
 * fields - list of fieldnames
 * values - list of values in the same order

 What do other people think of this? Is it a really bad idea?

 Robert Munro
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Some installation glitches

2006-04-15 Thread Dennis Allison

64-bit machines (dual dual-core AMD Opteron)

First:

Configuring Zope installation

Using Python interpreter at /usr/local/bin/python2.4

/usr/local/bin/python2.4 install.py -q build
Dependencies/ExtensionClass-Zope-2.9.2/ExtensionClass/_ExtensionClass.c: 
In function `PyExtensionClass_Export_':
Dependencies/ExtensionClass-Zope-2.9.2/ExtensionClass/_ExtensionClass.c:768: 
warning: cast from pointer to integer of different size
/usr/local/bin/python2.4 install.py -q build
/usr/local/bin/python2.4 install.py -q install --skip-build --home 
/usr/local/src/zope/Zope2.9


_ExtensionClass is not 64-bit clean.  I believe the warning can be 
ignored.


When I install Zope 2.9.0 on a 64 bit machine the path to the system is 

.../Zope/lib64/python/...

but with Zope 2.9.2, also on a 64-but machine the path to the system is 

...Zope/lib/python/

Why the change?



-- 

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )