zc.buildout newbie question
Hi all, I've been looking into zc.buildout since it seems to be quite useful application when developing and distributing Python applications. However, I'm finding it difficult to figure out how it should actually be used. I give you an example of what I'm trying to do and what my problem is. This is probably really trivial but bear with me. ;-) I'm developing a Twisted application and would like to use zc.buildout for bootstrapping development environments and probably even deploying the application to the production system. Here's my very simple buildout.cfg: --- [buildout] parts = twisted [twisted] recipe = minitage.recipe:du url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/Twisted-8.2.0.tar.bz2 --- This works fine and installs Twisted under parts/site-packages-2.5/ and twistd, trial and other scripts under bin/. I'm doing all this inside virtualenv, but I guess it shouldn't matter. Now, my problem is that since the packages are installed in parts/ so they are not visible to my python interpreter. What is the right way to do this? Should I just add /parts/site-packages-2.5 to my PYTHONPATH or? Is there some way to do that using buildout.cfg? I tried to find examples of this but didn't find any. Br, - Teemu -- Teemu Harju email/jabber: teemu.harju@gmail.com blog: http://blog.teemu.im
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Zope buildouts usually contain a part 'zopepy' generating a Python interpreter under bin: [zopepy] recipe = zc.recipe.egg eggs = ${instance:eggs} interpreter = zopepy extra-paths = ${zope2:location}/lib/python scripts = zopepy - -aj On 03.02.2009 11:34 Uhr, Teemu Harju wrote:
Hi all,
I've been looking into zc.buildout since it seems to be quite useful application when developing and distributing Python applications. However, I'm finding it difficult to figure out how it should actually be used. I give you an example of what I'm trying to do and what my problem is. This is probably really trivial but bear with me. ;-)
I'm developing a Twisted application and would like to use zc.buildout for bootstrapping development environments and probably even deploying the application to the production system.
Here's my very simple buildout.cfg: --- [buildout] parts = twisted
[twisted] recipe = minitage.recipe:du url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/Twisted-8.2.0.tar.bz2 ---
This works fine and installs Twisted under parts/site-packages-2.5/ and twistd, trial and other scripts under bin/. I'm doing all this inside virtualenv, but I guess it shouldn't matter.
Now, my problem is that since the packages are installed in parts/ so they are not visible to my python interpreter. What is the right way to do this? Should I just add /parts/site-packages-2.5 to my PYTHONPATH or? Is there some way to do that using buildout.cfg? I tried to find examples of this but didn't find any.
Br,
- Teemu
-- Teemu Harju
email/jabber: teemu.harju@gmail.com mailto:teemu.harju@gmail.com blog: http://blog.teemu.im
------------------------------------------------------------------------
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
- -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535 Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK - ------------------------------------------------------------------------ E-Publishing, Python, Zope & Plone development, Consulting -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkmIH94ACgkQCJIWIbr9KYwZdQCg2jNDgHKk1L5qDgc6iXe9pGep M1EAoLDyrCrofMedpQecm2RLUrsO1ccC =Nbhh -----END PGP SIGNATURE-----
Teemu Harju a écrit :
Hi all,
I've been looking into zc.buildout since it seems to be quite useful application when developing and distributing Python applications. However, I'm finding it difficult to figure out how it should actually be used. I give you an example of what I'm trying to do and what my problem is. This is probably really trivial but bear with me. ;-)
I'm developing a Twisted application and would like to use zc.buildout for bootstrapping development environments and probably even deploying the application to the production system.
Here's my very simple buildout.cfg: --- [buildout] parts = twisted
[twisted] recipe = minitage.recipe:du url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/Twisted-8.2.0.tar.bz2 ---
This works fine and installs Twisted under parts/site-packages-2.5/ and twistd, trial and other scripts under bin/. I'm doing all this inside virtualenv, but I guess it shouldn't matter.
Now, my problem is that since the packages are installed in parts/ so they are not visible to my python interpreter. What is the right way to do this? Should I just add /parts/site-packages-2.5 to my PYTHONPATH or? Is there some way to do that using buildout.cfg? I tried to find examples of this but didn't find any.
Br,
- Teemu
------------------------------------------------------------------------
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Hi, I am the maintener of minitage and you re using a quite old, and not maintened recipe of this egg. You may better to use minitage.recipe:eggs and minitage.recipe:scripts. An example could be: [buildout] parts = twisted twisteds [versions] # The version which is put in the eggs cache. Twisted = 8.2.0 [twisted] recipe = minitage.recipe:egg url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/Twisted-8.2.0.tar.bz2 [twisteds] recipe = minitage.recipe:scripts interpreter=myinterpreter eggs= Twisted ${buildout:eggs} Then, you ll have a nicely wrapped python interpreter in bin/myinterpreter.- More over, you can have a better look to minitage if you are not using it in the whole already. -- -- Cordialement, KiOrKY GPG Key FingerPrint: 0x1A1194B7681112AF
On Tue, Feb 3, 2009 at 3:28 PM, kiorky
Hi, I am the maintener of minitage and you re using a quite old, and not maintened recipe of this egg. You may better to use minitage.recipe:eggs and minitage.recipe:scripts.
An example could be: [buildout] parts = twisted twisteds [versions] # The version which is put in the eggs cache. Twisted = 8.2.0 [twisted] recipe = minitage.recipe:egg url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/Twisted-8.2.0.tar.bz2 [twisteds] recipe = minitage.recipe:scripts interpreter=myinterpreter eggs= Twisted ${buildout:eggs}
Then, you ll have a nicely wrapped python interpreter in bin/myinterpreter.-
More over, you can have a better look to minitage if you are not using it in the whole already.
Hi, Thanks for the tip and for the great recipe. :) I'm liking the patching capabilities of it also. Now my buildout is working. - Teemu -- Teemu Harju email/jabber: teemu.harju@gmail.com blog: http://blog.teemu.im
I'm working on an automatic testing framework which installs eggs downloaded directly from the web-server. From time to time I get a very long stacktrace leading to a ZipImportError (see the pastebin link). Leading up to the error all I do is download the egg into the system's %TEMP% folder. I'm installing the egg like this: easy_install.main( ['-zma', '-f' , config.INSTALL_TOOLS_EGG_VALIDHOSTS, filepath, ] There is apparantly nothing wrong with the file - I can open it in Winzip. If I re-run the process it seems to work fine. The file in question appears to be identical. The error is rare, it seems to occur in about 1 out of 100 easy_install operations. Any suggestions what might be causing this? Very long stacktrace on pastebin: http://python.pastebin.com/m378949f3 I am using setuptools==0.6c9 on Python 2.4 running on Windows XP This email does not create a legal relationship between any member of the Crédit Agricole group and the recipient or constitute investment advice. The content of this email should not be copied or disclosed (in whole or part) to any other person. It may contain information which is confidential, privileged or otherwise protected from disclosure. If you are not the intended recipient, you should notify us and delete it from your system. Emails may be monitored, are not secure and may be amended, destroyed or contain viruses and in communicating with us such conditions are accepted. Any content which does not relate to business matters is not endorsed by us. Calyon is authorised by the Comité des Etablissements de Crédit et des Entreprises d'Investissement (CECEI) and supervised by the Commission Bancaire in France and subject to limited regulation by the Financial Services Authority. Details about the extent of our regulation by the Financial Services Authority are available from us on request. Calyon is incorporated in France with limited liability and registered in England & Wales. Registration number: FC008194. Registered office: Broadwalk House, 5 Appold Street, London, EC2A 2DA.
participants (4)
-
Andreas Jung
-
Fadhley Salim
-
kiorky
-
Teemu Harju