[buildout] improving zc.recipe.egg's README.txt
Hi All, What I'd like to do at the start of the "Script generation" section was cat the setup.py of the demo egg to show the entry point where the demo eggs defines its script. However, given that the demo egg is a binary egg, I can't decide what the best way to do this is. I'd thought of using the zipfile module to reach inside the egg, but I'm confused as to why -py2.3.egg files are specified in the test and work even though I'm running with python 2.4 and there's no python 2.3 in sight? Any ideas welcome... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
On Aug 13, 2008, at 5:22 AM, Chris Withers wrote:
Hi All,
What I'd like to do at the start of the "Script generation" section was cat the setup.py of the demo egg to show the entry point where the demo eggs defines its script.
However, given that the demo egg is a binary egg, I can't decide what the best way to do this is.
We could just show the contents of setup.py or simply explain, perhaps in a footnote that the scripts are defined via entry points, giving a link to the setuptools documentation.
I'd thought of using the zipfile module to reach inside the egg, but I'm confused as to why -py2.3.egg files are specified in the test and work even though I'm running with python 2.4 and there's no python 2.3 in sight?
The examples have to show something, The tests have to be run with multiple versions of Python, since multiple versions of Python are supported. An output normalizer takes care adjusting actual and expected output for the version of Python used at run time. Jim -- Jim Fulton Zope Corporation
Jim Fulton wrote:
However, given that the demo egg is a binary egg, I can't decide what the best way to do this is.
We could just show the contents of setup.py or simply explain, perhaps in a footnote that the scripts are defined via entry points, giving a link to the setuptools documentation.
To be honest, given the use of the demo egg all over the place, maybe it'd be better just to have it as a static directory in the distribution? Is there any technical reason that means we can't do this?
I'd thought of using the zipfile module to reach inside the egg, but I'm confused as to why -py2.3.egg files are specified in the test and work even though I'm running with python 2.4 and there's no python 2.3 in sight?
The examples have to show something, The tests have to be run with multiple versions of Python, since multiple versions of Python are supported. An output normalizer takes care adjusting actual and expected output for the version of Python used at run time.
Okay, so if I wanted to use ZipFile to reach inside an egg, what path should I use to open? Is the normalisation code available as a function anywhere? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote:
Jim Fulton wrote:
However, given that the demo egg is a binary egg, I can't decide what the best way to do this is.
We could just show the contents of setup.py or simply explain, perhaps in a footnote that the scripts are defined via entry points, giving a link to the setuptools documentation.
To be honest, given the use of the demo egg all over the place, maybe it'd be better just to have it as a static directory in the distribution? Is there any technical reason that means we can't do this?
I'd thought of using the zipfile module to reach inside the egg, but I'm confused as to why -py2.3.egg files are specified in the test and work even though I'm running with python 2.4 and there's no python 2.3 in sight?
The examples have to show something, The tests have to be run with multiple versions of Python, since multiple versions of Python are supported. An output normalizer takes care adjusting actual and expected output for the version of Python used at run time.
Okay, so if I wanted to use ZipFile to reach inside an egg, what path should I use to open? Is the normalisation code available as a function anywhere?
pkg_resources (part of setuptools, documented on the setuptools homepage) abstract the access to data inside packages, no matter whether they're in a zipped egg or not.
Philipp von Weitershausen wrote:
pkg_resources (part of setuptools, documented on the setuptools homepage) abstract the access to data inside packages, no matter whether they're in a zipped egg or not.
Yeah, but it's the actual contents of setup.py that I want to show given that this is supposed to be documentation ;-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
El 14 Aug 2008, a las 13:24 , Chris Withers escribió:
Philipp von Weitershausen wrote:
pkg_resources (part of setuptools, documented on the setuptools homepage) abstract the access to data inside packages, no matter whether they're in a zipped egg or not.
Yeah, but it's the actual contents of setup.py that I want to show given that this is supposed to be documentation ;-)
setup.py is never part of an .egg file or directory.
Philipp von Weitershausen wrote:
El 14 Aug 2008, a las 13:24 , Chris Withers escribió:
Philipp von Weitershausen wrote:
pkg_resources (part of setuptools, documented on the setuptools homepage) abstract the access to data inside packages, no matter whether they're in a zipped egg or not.
Yeah, but it's the actual contents of setup.py that I want to show given that this is supposed to be documentation ;-)
setup.py is never part of an .egg file or directory.
um? then what *is* it part of? ;-) Regardless of what it is or isn't, it's the contents of the demo egg's setup.py that's currently obfuscated but which would help understanding of the docs a lot. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Surely the easiest way to get that would be direct from SVN? The setup.py file would be part of your project. It's used to build the egg but never actually incorporated into the egg - I cannot think what use it would be even if you found a way to break this convention. By the way - kudos to you for sorting out the documentation. It's really awesome that somebody is tackling this. :-) -----Original Message----- From: distutils-sig-bounces@python.org [mailto:distutils-sig-bounces@python.org] On Behalf Of Chris Withers Sent: 14 August 2008 12:32 To: Philipp von Weitershausen Cc: distutils-sig@python.org Subject: Re: [Distutils] [buildout] improving zc.recipe.egg's README.txt Philipp von Weitershausen wrote:
El 14 Aug 2008, a las 13:24 , Chris Withers escribió:
Philipp von Weitershausen wrote:
pkg_resources (part of setuptools, documented on the setuptools homepage) abstract the access to data inside packages, no matter whether they're in a zipped egg or not.
Yeah, but it's the actual contents of setup.py that I want to show given that this is supposed to be documentation ;-)
setup.py is never part of an .egg file or directory.
um? then what *is* it part of? ;-) Regardless of what it is or isn't, it's the contents of the demo egg's setup.py that's currently obfuscated but which would help understanding of the docs a lot. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig 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 Commission Bancaire in France and regulated by the Financial Services Authority for the conduct of business in the United Kingdom. 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.
Fadhley Salim wrote:
Surely the easiest way to get that would be direct from SVN?
The setup.py file would be part of your project. It's used to build the egg but never actually incorporated into the egg - I cannot think what use it would be even if you found a way to break this convention.
Er? Suggest reading the whole thread. This setup.py is generated as part of the doctest setup which obfuscates it significantly. Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris Withers wrote:
Philipp von Weitershausen wrote:
El 14 Aug 2008, a las 13:24 , Chris Withers escribió:
Philipp von Weitershausen wrote:
pkg_resources (part of setuptools, documented on the setuptools homepage) abstract the access to data inside packages, no matter whether they're in a zipped egg or not. Yeah, but it's the actual contents of setup.py that I want to show given that this is supposed to be documentation ;-) setup.py is never part of an .egg file or directory.
um? then what *is* it part of? ;-)
The source distribution (the .tar.gz file made by running 'setup.py sdist'). Eggs are binary distributions (made by running 'setup.py bdist_egg'). They don't contain all the files in the corresponding 'sdist', and 'setup.py' in particular. 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.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIpEYO+gerLs4ltQ4RAlVPAKC15tTDKOs5iJ6/wSCa3LBLOdJRvQCfbRyJ NHBwO+JIWbuoc5uQjrMi59c= =JPte -----END PGP SIGNATURE-----
El 14 Aug 2008, a las 16:49 , Tres Seaver escribió:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Chris Withers wrote:
Philipp von Weitershausen wrote:
El 14 Aug 2008, a las 13:24 , Chris Withers escribió:
Philipp von Weitershausen wrote:
pkg_resources (part of setuptools, documented on the setuptools homepage) abstract the access to data inside packages, no matter whether they're in a zipped egg or not. Yeah, but it's the actual contents of setup.py that I want to show given that this is supposed to be documentation ;-) setup.py is never part of an .egg file or directory.
um? then what *is* it part of? ;-)
The source distribution (the .tar.gz file made by running 'setup.py sdist').
Eggs are binary distributions (made by running 'setup.py bdist_egg').
As Phillip Eby confirmed several times, .egg files are meant to be an installation format, not a distribution format (cf. [1]). Note that I distinguish .egg files from Eggs-the-concept (development eggs are eggs even though they don't come in .egg files, and I consider source distributions eggs as well if they have a setup.py and use setuptools). [1] http://philikon.wordpress.com/2008/06/26/is-there-a-point-to-distributing-eg...
participants (5)
-
Chris Withers -
Fadhley Salim -
Jim Fulton -
Philipp von Weitershausen -
Tres Seaver