using ZSQLMethods pypi package in zope 2.13

Hi, I am using zope 2.9.9 and I was trying a migration to 2.13.8 which I have installed with buildout. I am however struggling with this new system, much more complex than the simple old Products system. The zope instance contains a Products folder where I have been able to drop in a few packages (a subfolder in it, actually) from Pypi. However, ZSQLMethods contains the Shared subfolder which is a dependency for the ZSQLMethods and I don't know where to put Shared to make it work (it doesn't work under Products). Based on the buildout.cfg of ZSQLMethods, I did: [buildout] ... parts = ... zsql [zsql] recipe = zc.recipe.testrunner eggs = Products.ZSQLMethods However, running bin/buildout I got Error: Picked: Products.ZSQLMethods = 2.13.4 I guess it should not be so difficult to install ZSQLMethods, but I can't really figure it out. Suggestions? Fernando

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/11/2011 03:45 PM, Fernando Martins wrote:
Hi,
I am using zope 2.9.9 and I was trying a migration to 2.13.8 which I have installed with buildout. I am however struggling with this new system, much more complex than the simple old Products system.
The zope instance contains a Products folder where I have been able to drop in a few packages (a subfolder in it, actually) from Pypi.
However, ZSQLMethods contains the Shared subfolder which is a dependency for the ZSQLMethods and I don't know where to put Shared to make it work (it doesn't work under Products).
Based on the buildout.cfg of ZSQLMethods, I did:
[buildout] ... parts = ... zsql
[zsql] recipe = zc.recipe.testrunner eggs = Products.ZSQLMethods
However, running bin/buildout I got
Error: Picked: Products.ZSQLMethods = 2.13.4
That error comes from having 'allow-picked-versions = false' in buildout.cfg -- you then need to supply an explicit version for every package.
I guess it should not be so difficult to install ZSQLMethods, but I can't really figure it out. Suggestions?
I think you want 'Products.ZSQLMethods' added to the 'eggs' value for your 'instance' section, so that it is on the sys.path when running the 'instance' script. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4bZVgACgkQ+gerLs4ltQ7egACgsEvUswttXfNiW2HBKH3ethqV kbUAnRhB6F4zstK7FYnuNGIvMR0YO7UE =gKwx -----END PGP SIGNATURE-----

On 07/11/2011 11:04 PM, Tres Seaver wrote: [I just realised I had only replied to Tres]
Error: Picked: Products.ZSQLMethods = 2.13.4
That error comes from having 'allow-picked-versions = false' in buildout.cfg -- you then need to supply an explicit version for every package. My instance is out of buildout so I tried:
[zopepy] recipe = zc.recipe.egg eggs = Zope2 Products.ZSQLMethods >= 2.13.4 gives the same error and Products.ZSQLMethods = 2.13.4 gives another error (I suspect "=" is not valid) ValueError: ('Expected version spec in', 'Products.ZSQLMethods=2.13.4', 'at', '=2.13.4') I commented out allow-picked-versions and I got no errors. However, I got no ZSQL Method in zope.
... I think you want 'Products.ZSQLMethods' added to the 'eggs' value for your 'instance' section, so that it is on the sys.path when running the 'instance' script. My instance is not in buildout and I would prefer to keep it separate, if possible. I tried [zopepy] because I saw it was making a custom sys.path with the eggs. ZSQLMethods is added to zopepy's sys.path but it does not appear in zope itself.
Do I need some extra configuration in the zope instance? I installed ZMySQLDA in Products and it complained about missing Shared.DC.ZRDB. What to do to have the Sahred folder imported by Zope? Thanks, Fernando

Hi Fernando, Sorry for not being able to get to this earlier, but I didn't want to leave your message unanswered. It looks, from your message, that you haven't yet understood how to specify packages and versions in a buildout configuration. It also seems like you're trying to dismember python packages to attempt to put directories in certain points of the hierarchy (like directories in the Products folder). I suggest you first read-up on zc.buildout and how it treats python distributions[1], and then I suggest you simply use packages for Products.ZSQLMethods and Products.ZMySQLDA, instead of trying to dismember then and assemble them inside your Zope instance. To do this, simply follow the tutorial at [2], but adding Products.ZSQLMethods and Products.ZMySQLDA to the "eggs" parameter of the section that defines the Zope instance. I've attached to this e-mail one such buildout configuration for your convenience. The tutorial at [2] has some easy-to-fix errors (like creating a 'logs' instead of a 'log' directory, and not creating the initial user for the new Zope instance), but nothing you shouldn't be able to solve. And in case you're still stuck, I recommend you ask for help in one of the Zope lists, since it's likely you'll be stuck in non-buildout problems at that point. [1] http://pypi.python.org/pypi/zc.buildout/1.4.4 [2] http://docs.zope.org/zope2/releases/2.13/INSTALL-buildout.html#creating-a-bu... Cheers, Leo On Tue, Jul 12, 2011 at 21:17, Fernando Martins <fernando@cmartins.nl> wrote:
On 07/11/2011 11:04 PM, Tres Seaver wrote: [I just realised I had only replied to Tres]
Error: Picked: Products.ZSQLMethods = 2.13.4
That error comes from having 'allow-picked-versions = false' in buildout.cfg -- you then need to supply an explicit version for every package.
My instance is out of buildout so I tried:
[zopepy] recipe = zc.recipe.egg eggs = Zope2 Products.ZSQLMethods >= 2.13.4
gives the same error and
Products.ZSQLMethods = 2.13.4
gives another error (I suspect "=" is not valid)
ValueError: ('Expected version spec in', 'Products.ZSQLMethods=2.13.4', 'at', '=2.13.4')
I commented out allow-picked-versions and I got no errors. However, I got no ZSQL Method in zope.
... I think you want 'Products.ZSQLMethods' added to the 'eggs' value for your 'instance' section, so that it is on the sys.path when running the 'instance' script.
My instance is not in buildout and I would prefer to keep it separate, if possible. I tried [zopepy] because I saw it was making a custom sys.path with the eggs. ZSQLMethods is added to zopepy's sys.path but it does not appear in zope itself.
Do I need some extra configuration in the zope instance?
I installed ZMySQLDA in Products and it complained about missing Shared.DC.ZRDB. What to do to have the Sahred folder imported by Zope?
Thanks, Fernando _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig

Leo, thanks for your feedback. I can't work on it right now but I hope to give it another go in about a week. Cheers, Fernando On Jul 26, 2011 23:52 "Leonardo Rochael Almeida" <leorochael@gmail.com> <leorochael@gmail.com> wrote:
Hi Fernando,
Sorry for not being able to get to this earlier, but I didn't want to leave your message unanswered.
It looks, from your message, that you haven't yet understood how to specify packages and versions in a buildout configuration. It also seems like you're trying to dismember python packages to attempt to put directories in certain points of the hierarchy (like directories in the Products folder).
I suggest you first read-up on zc.buildout and how it treats python distributions[1], and then I suggest you simply use packages for Products.ZSQLMethods and Products.ZMySQLDA, instead of trying to dismember then and assemble them inside your Zope instance.
To do this, simply follow the tutorial at [2], but adding Products.ZSQLMethods and Products.ZMySQLDA to the "eggs" parameter of the section that defines the Zope instance. I've attached to this e-mail one such buildout configuration for your convenience.
The tutorial at [2] has some easy-to-fix errors (like creating a 'logs' instead of a 'log' directory, and not creating the initial user for the new Zope instance), but nothing you shouldn't be able to solve.
And in case you're still stuck, I recommend you ask for help in one of the Zope lists, since it's likely you'll be stuck in non-buildout problems at that point.
[1] <http://pypi.python.org/pypi/zc.buildout/1.4.4>
[2] <http://docs.zope.org/zope2/releases/2.13/INSTALL-buildout.html#creati ng-a-buildout-based-zope-instance>
Cheers,
Leo
On Tue, Jul 12, 2011 at 21:17, Fernando Martins <fernando@cmartins.nl> <fernando@cmartins.nl> wrote:
On 07/11/2011 11:04 PM, Tres Seaver wrote: [I just realised I had only replied to Tres]
Error: Picked: Products.ZSQLMethods = 2.13.4
That error comes from having 'allow-picked-versions = false' in buildout.cfg -- you then need to supply an explicit version for every package.
My instance is out of buildout so I tried:
[zopepy] recipe = zc.recipe.egg eggs = Zope2 Products.ZSQLMethods >= 2.13.4
gives the same error and
Products.ZSQLMethods = 2.13.4
gives another error (I suspect "=" is not valid)
ValueError: ('Expected version spec in', 'Products.ZSQLMethods=2.13.4', 'at', '=2.13.4')
I commented out allow-picked-versions and I got no errors. However, I got no ZSQL Method in zope.
... I think you want 'Products.ZSQLMethods' added to the 'eggs' value for your 'instance' section, so that it is on the sys.path when running the 'instance' script.
My instance is not in buildout and I would prefer to keep it separate, if possible. I tried [zopepy] because I saw it was making a custom sys.path with the eggs. ZSQLMethods is added to zopepy's sys.path but it does not appear in zope itself.
Do I need some extra configuration in the zope instance?
I installed ZMySQLDA in Products and it complained about missing Shared.DC.ZRDB. What to do to have the Sahred folder imported by Zope?
Thanks, Fernando _______________________________________________ Distutils-SIG maillist - <Distutils-SIG@python.org> <http://mail.python.org/mailman/listinfo/distutils-sig>
participants (4)
-
Fernando
-
Fernando Martins
-
Leonardo Rochael Almeida
-
Tres Seaver