AW: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Roger Ineichen
Hi all

 Cc: Philipp von Weitershausen; Martijn Pieters
 Betreff: Re: [Zope3-Users] z3c-form meta.zcml error

[...]

  Btw, Windows users can generate standard tarballs using the 
 --formats
  switch:
 
 Yep, that worked. Roger forgot those options. I am going to 
 release real tarballs today.

No I defently didn't forgot this option. I released 1.7.1
as tar.gz with the option --format=gztar and 1.7.2 as zip
because of the report form malthe that the egg misses the 
zcml file.

All the *.zcml files where in every release included.

I think that's a setuptools issue, The files do not get 
extracted, that's it. I have no idea if this only happens
because the computer which extracts the eggs does not have
the newest setuptools installed.

I used the newest version of setuptools whihc is available
e.g. version: setuptools-0.6c7-py2.4.egg. If this is a 
issue on build eggs, then it's defently not fixed.

Many thanks Stephan

Regards
Roger Ineichen

 Regards,
 Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


RE: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Gross,Thomas Michael
Hi all,

  I'm using setuptools-0.6c7-py2.4.egg on a Mac OS X 10.5.1 and I have the same 
issue with zope.viewlet 3.4.1.

-Tom

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Roger Ineichen [EMAIL 
PROTECTED]
Sent: Thursday, January 24, 2008 10:02 AM
To: [EMAIL PROTECTED]; zope3-users@zope.org
Cc: 'Philipp von Weitershausen'; 'Martijn Pieters'
Subject: AW: [Zope3-Users] z3c-form meta.zcml error

Hi all

 Cc: Philipp von Weitershausen; Martijn Pieters
 Betreff: Re: [Zope3-Users] z3c-form meta.zcml error

[...]

  Btw, Windows users can generate standard tarballs using the
 --formats
  switch:

 Yep, that worked. Roger forgot those options. I am going to
 release real tarballs today.

No I defently didn't forgot this option. I released 1.7.1
as tar.gz with the option --format=gztar and 1.7.2 as zip
because of the report form malthe that the egg misses the
zcml file.

All the *.zcml files where in every release included.

I think that's a setuptools issue, The files do not get
extracted, that's it. I have no idea if this only happens
because the computer which extracts the eggs does not have
the newest setuptools installed.

I used the newest version of setuptools whihc is available
e.g. version: setuptools-0.6c7-py2.4.egg. If this is a
issue on build eggs, then it's defently not fixed.

Many thanks Stephan

Regards
Roger Ineichen

 Regards,
 Stephan

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


AW: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Roger Ineichen
Hi Tom

 Betreff: RE: [Zope3-Users] z3c-form meta.zcml error
 
 Hi all,
 
   I'm using setuptools-0.6c7-py2.4.egg on a Mac OS X 10.5.1 
 and I have the same issue with zope.viewlet 3.4.1.

Yes, there are more scrambled eggs out there.

Stephan, 
do you have time do release the other eggs?

Regards
Roger Ineichen

 -Tom
 
 From: [EMAIL PROTECTED] 
 [EMAIL PROTECTED] On Behalf Of Roger Ineichen 
 [EMAIL PROTECTED]
 Sent: Thursday, January 24, 2008 10:02 AM
 To: [EMAIL PROTECTED]; zope3-users@zope.org
 Cc: 'Philipp von Weitershausen'; 'Martijn Pieters'
 Subject: AW: [Zope3-Users] z3c-form meta.zcml error
 
 Hi all
 
  Cc: Philipp von Weitershausen; Martijn Pieters
  Betreff: Re: [Zope3-Users] z3c-form meta.zcml error
 
 [...]
 
   Btw, Windows users can generate standard tarballs using the
  --formats
   switch:
 
  Yep, that worked. Roger forgot those options. I am going to release 
  real tarballs today.
 
 No I defently didn't forgot this option. I released 1.7.1 as 
 tar.gz with the option --format=gztar and 1.7.2 as zip 
 because of the report form malthe that the egg misses the zcml file.
 
 All the *.zcml files where in every release included.
 
 I think that's a setuptools issue, The files do not get 
 extracted, that's it. I have no idea if this only happens 
 because the computer which extracts the eggs does not have 
 the newest setuptools installed.
 
 I used the newest version of setuptools whihc is available 
 e.g. version: setuptools-0.6c7-py2.4.egg. If this is a issue 
 on build eggs, then it's defently not fixed.
 
 Many thanks Stephan
 
 Regards
 Roger Ineichen
 
  Regards,
  Stephan
 
 ___
 Zope3-users mailing list
 Zope3-users@zope.org
 http://mail.zope.org/mailman/listinfo/zope3-users
 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


AW: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Roger Ineichen
Hi Martijn

 Betreff: Re: [Zope3-Users] z3c-form meta.zcml error

[...]

  I used the newest version of setuptools whihc is available e.g. 
  version: setuptools-0.6c7-py2.4.egg. If this is a issue on 
 build eggs, 
  then it's defently not fixed.
 
 Ah, ah, ah! Files not getting extracted sounds like the 
 tarfile bug in python that Florian Schulze hit as well:
 
 http://www.nabble.com/Egg-uploads---Lessons-learned-td14279963
 s6745.html

Yes, absolutly, thanks for the link. 

 Apparently that's fixed in Python 2.5, which is a fat lot of 
 help to us stuck on 2.4.

Sounds like a good reason to switch to Pyhton 2.5

Regards
Roger Ineichen
_
END OF MESSAGE

 --
 Martijn Pieters
 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: AW: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Stephan Richter
On Thursday 24 January 2008, Roger Ineichen wrote:
 Stephan,
 do you have time do release the other eggs?

Yes.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. Zope Stephan Richter
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] zcml for z3c.form

2008-01-24 Thread John
I'm converting from formlib to z3c.form.  What should my configure.zcml 
look like?


For formlib it is:

 browser:page
   for=zope.app.container.interfaces.IAdding
   name=.Person
   class=.browser.PersonAddForm
   permission=zope.ManageContent
   /

I assume the 'for=' value should change, but to what?  Complete code is 
attached (with non-Person classes still using formlib).


Thanks,
John


from interfaces import IPerson, IDriver, ICar, ILimosvc, ILimosvcContained
from classes import Person, Driver, Car
from zope.formlib import form
from z3c.form import form as z3cform, field as z3cfield


class PersonEdit(z3cform.EditForm):
form_fields = z3cfield.Fields(IPerson)
class PersonAddForm(z3cform.AddForm):
form_fields = z3cfield.Fields(IPerson)
def create(self,data):
return Person(**data)
def add(self,object):
			self.context[object.id]=object
def nextURL(self):
return 'index.html'


class CarEdit(form.EditForm):
form_fields = form.Fields(ICar)
class CarAddForm(form.AddForm):
form_fields = form.Fields(ICar)
def create(self,data):
obj=Car()
form.applyChanges(obj, self.form_fields, data)
return obj


class DriverEdit(form.EditForm):
form_fields = form.Fields(IDriver)
class DriverAddForm(form.AddForm):
form_fields = form.Fields(IDriver)
def create(self,data):
obj=Driver()
form.applyChanges(obj, self.form_fields, data)
return obj


from zope.interface import implements
from zope.app.container.btree import BTreeContainer
from zope.app.container.contained import Contained
from zope.security.proxy import removeSecurityProxy

from limosvc.interfaces import IPerson, IDriver, ICar, ILimosvc, ILimosvcContained

'''
class Person(Contained):
	implements(IPerson,ILimosvcContained)
	name = u''
	email = u''
	phoneNum = u''
'''
from zope.schema.fieldproperty import FieldProperty
class Person(object):
implements(IPerson)
name = FieldProperty(IPerson['name'])
email = FieldProperty(IPerson['email'])
phoneNum = FieldProperty(IPerson['phoneNum'])
def __init__(self, name=None, email=None, phoneNum=None):
if name:
self.name = name
if email:
self.email = email
if phoneNum:
self.phoneNum = phoneNum
def __repr__(self):
return '%s %r' % (self.__class__.__name__, self.name)


class Car(Contained):
	implements(ICar,ILimosvcContained)

	name = u''
	model = u''
	nPassengers = u'0'

class Driver(Contained):
	implements(IDriver,ILimosvcContained)

	person_=None
	def getPerson_(self):
		return self.person_
	def setPerson_(self, value):
		self.person_=removeSecurityProxy(value)
	person=property(getPerson_,setPerson_)
	car_=None
	def getCar_(self):
		return self.car_
	def setCar_(self, value):
		self.car_=removeSecurityProxy(value)
	car=property(getCar_,setCar_)

class Limosvc(BTreeContainer):
implements(ILimosvc)
name = u''
configure
xmlns=http://namespaces.zope.org/zope;
xmlns:browser=http://namespaces.zope.org/browser;
i18n_domain=limosvc


  include package=zope.security file=meta.zcml /
  include package=zope.app.zcmlfiles file=meta.zcml /

  include package=zope.publisher /
  include package=zope.traversing /
  include package=zope.traversing.browser /
  include package=zope.app.zcmlfiles /

  !-- The following packages aren't needed from the beginning, but
   end up being used in most applications --
  include package=zope.i18n file=meta.zcml /
  include package=zope.annotation /
  include package=zope.copypastemove /
  include package=zope.formlib /
  include package=zope.i18n.locales /
  include package=zope.app.authentication /
  include package=zope.app.session /
  include package=zope.app.intid /
  include package=zope.app.keyreference /
  include package=zope.app.catalog /

  !-- Add your own component registrations here --

  interface
  interface=.interfaces.IPerson
  type=zope.app.content.interfaces.IContentType
  /

  class class=.classes.Person
!--implements
interface=zope.annotation.interfaces.IAttributeAnnotatable
/--
factory
id=limosvc.classes.Person
description=a person 
/
require
permission=zope.ManageContent
interface=.interfaces.IPerson
/
require
permission=zope.ManageContent
set_schema=.interfaces.IPerson
/
  /class
  
  browser:addMenuItem
class=.classes.Person
title=a person
permission=zope.ManageContent
description='add Person'
view='.Person'
/
  browser:page
for=zope.app.container.interfaces.IAdding
name=.Person
class=.browser.PersonAddForm
permission=zope.ManageContent
/
  browser:page
for=.interfaces.IPerson
name=edit.html
class=.browser.PersonEdit

Re: Fwd: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Marius Gedminas
On Wed, Jan 23, 2008 at 06:40:08PM -0500, Stephan Richter wrote:
 On Wednesday 23 January 2008, Martijn Pieters wrote:
  On Jan 23, 2008 10:12 AM, Peter Koppatz [EMAIL PROTECTED] wrote:
   What has changed between 1.7.0 and 1.7.2?
  
   ls -al | wc -l
  
   1.7.0 -- 76
   1.7. 2 -- 47
   there are no *-txt , *.zcml anymore!
 
  Someone must have built the release tarball from a fresh SVN export;
  setup.py does not include txt and zcml files and such by default when
  building a release tarball, while a development egg would include
  those. In other words, the maintainer of z3c.form (and I mean YOU,
  Stephan) should add a MANIFEST.in with the lines global-include
  *.txt and global-include *.zcml in it and re-roll the release.
 
 The problem are faulty ZIP files that do not open correctly in Linux. The 
 ZCML 
 and Text files are there, but are not extracted correctly by setuptools. 

When we encountered this problem during the Foliage sprint, the problem
was not the use of .zip instead of .tar.gz, but a manifest with \r\n
line endings inside the archive.  setuptools did rstrip('\n') on the
lines and then tried to copy nonexistent files with a names that ended
in '\r'.  The bug was fixed on the same day in a newer setuptools 0.6
prerelease.

Marius Gedminas
-- 
Funny off-topic messages are always on-topic.


signature.asc
Description: Digital signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


AW: Fwd: [Zope3-Users] z3c-form meta.zcml error

2008-01-24 Thread Roger Ineichen
Hi Marius

 Betreff: Re: Fwd: [Zope3-Users] z3c-form meta.zcml error

[...]

  The problem are faulty ZIP files that do not open correctly 
 in Linux. 
  The ZCML and Text files are there, but are not extracted 
 correctly by setuptools.
 
 When we encountered this problem during the Foliage sprint, 
 the problem was not the use of .zip instead of .tar.gz, but a 
 manifest with \r\n line endings inside the archive.  
 setuptools did rstrip('\n') on the lines and then tried to 
 copy nonexistent files with a names that ended in '\r'.  The 
 bug was fixed on the same day in a newer setuptools 0.6 prerelease.

Yes, that was what I was thinking. But I had the latest setuptools
installed and this happens again. Seems that this is a tar lib
bug in python.

Regards
Roger Ineichen
_
END OF MESSAGE

 Marius Gedminas
 --
 Funny off-topic messages are always on-topic.
 

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users