Re: [Distutils] Equivalent of config.h?
On Wed, Jun 16, 2010 at 7:26 AM, Denis Jasselette wrote: > > Do you have better solutions? This is a perfectly fine solution. It is simple, and does not requires any 3rd party code. David ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Equivalent of config.h?
Duh. s/mail call/main call/ ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Equivalent of config.h?
Hello If your script has taken care of separating functions and the mail call in a “if __name__ == '__main__'” block, you can just import your script and get its __version__ attribute. Regards ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Equivalent of config.h?
At 12:26 AM 6/16/2010 +0200, Denis Jasselette wrote: I am trying to distribute a script where I should be able to output the current version number. I thought that I could do things in an opposite way as in C. Rather than having the building system to create the config.h, I could import a config.py in my setup.py and distribute it as a py_module along with the script. Do you have better solutions? Yes. Use setuptools in your setup.py, and declare the version there. Then, in your script, use: from pkg_resources import require my_version = require('MyProjectName')[0].version Where 'MyProjectName' is whatever 'name=' argument you passed to setup() in your setup.py. ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
[Distutils] Equivalent of config.h?
Hi, I use the GNU Autotools when I program in C. They generate a config.h file containing useful information such as the PACKAGE_VERSION that can be retrieved by simply including the file. I'd like to know if there exists anything similar with distutils. I am trying to distribute a script where I should be able to output the current version number. I thought that I could do things in an opposite way as in C. Rather than having the building system to create the config.h, I could import a config.py in my setup.py and distribute it as a py_module along with the script. Do you have better solutions? ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] [Catalog-sig] Proposal: Move PyPI static data to the cloud for better availability
Is there any Nagios monitoring in place or is there the need to have some external reliability monitoring in place? There is no external monitoring in place that I know of. I know ZC had some monitoring that was supposed to send me an email, but that was setup a few years ago, and recently didn't report the downtime. My own mirroring reported the downtime (indirectly, by reporting that it couldn't mirror anymore); this is how I noticed one of the recent outages. I can set up a Nagios machine to check the HTTP status of PyPi. If it's easy to setup: why not? What exactly would that check? As you said, we may have the same problem in the future on all mirroring nodes ... Yes, there should be some more investigative work be done on the reason of the apparent unreliability. The pep381mirror software produces a set of static files on the mirror, so you don't need to run PyPI itself. I merely use Apache to serve the PyPI mirrors. Regards, Martin ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] setuptools for py 2.7 windows
Hello, Well, if you'd be so kind to do the exe and upload it to pypi, you'd save the day for some 50k+ python users (according to the download count of the 2.6 version). Tuesday, June 15, 2010, 8:16:39 PM, you wrote: PJE> At 05:20 PM 6/15/2010 +0200, Adam GROSZER wrote: >>Hello, >> >>Someone please make a setuptools-0.6c11.win32-py2.7.exe. PJE> Unzip or untar the source version, then run "setup.py bdist_wininst" PJE> - one will then be waiting for you in the dist/ subdirectory. PJE> ___ PJE> Distutils-SIG maillist - Distutils-SIG@python.org PJE> http://mail.python.org/mailman/listinfo/distutils-sig -- Best regards, Adam GROSZERmailto:agros...@gmail.com -- Quote of the day: Any sufficiently advanced technology is indistinguishable from magic. ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] setuptools for py 2.7 windows
At 05:20 PM 6/15/2010 +0200, Adam GROSZER wrote: Hello, Someone please make a setuptools-0.6c11.win32-py2.7.exe. Unzip or untar the source version, then run "setup.py bdist_wininst" - one will then be waiting for you in the dist/ subdirectory. ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Is it safe to embedding additional metadata in bdist_wininst installers ?
At 02:51 PM 6/15/2010 +0900, David Cournapeau wrote: I am interested in doing this for arbitrary packages (the goal is to add support for egg <-> windows installer conversion in my packaging solution) If your goal is to convert between eggs and bdist_wininst installers, you might want to take a look at the code that already exists in easy_install to convert bdist_wininst .exe files to .egg files -- even ones that weren't built by setuptools. Converting the other way should also be similarly straightforward, so I'm curious what this other metadata is that you're asking about. ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Design rationale for the egg format ?
>> I don't mean to criticize the design, just to see if you would do things >> differently today. > > Oh, many things. That would make for an interesting read. Regards ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Design rationale for the egg format ?
At 01:25 PM 6/15/2010 +0900, David Cournapeau wrote: On Tue, Jun 15, 2010 at 10:36 AM, P.J. Eby wrote: > As I said above, "it *also* scales better for performance" -- i.e., it's a > secondary concern. ok. > Â The #1 reason for separating metadata files is that it > makes the addition of new metadata much easier than maintaining a single > monolithic format. Do you still think it is true today ? I am asking because AFAIK, there aren't many packages besides setuptools which use those metadata ? That depends on what you mean "besides setuptools". Entry points, for example, are used by various apps and frameworks that implement plugins, and these in turn are used by app and plugin developers. There's also a package (EggTranslations I think?) that uses metadata files for i18n discovery, allowing plugins to provide translations for an app, or translations for other plugins. So, it's true that it's not very common that a library or app would directly use metadata files -- in general, you'll go through an intermediary such as setuptools or EggTranslations... or even a third level, such as an app framework that then uses setuptools internally to implement a plugin API. I don't mean to criticize the design, just to see if you would do things differently today. Oh, many things. But separating metadata files is definitely NOT one of them. As you might notice, PEP 376 and Distutils2 build even further on this pattern, with roughly the same rationale(s). ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
[Distutils] setuptools for py 2.7 windows
Hello, Someone please make a setuptools-0.6c11.win32-py2.7.exe. -- Best regards, Adam GROSZER mailto:agros...@gmail.com -- Quote of the day: To do injustice is more disgraceful than to suffer it. - Plato ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] [Catalog-sig] Proposal: Move PyPI static data to the cloud for better availability
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15 jun 2010, at 16:42, Mathieu Leduc-Hamel wrote: I think the most important missed fact is, just how unreliable is PyPI currently? Does anyone know? Exactly my point, right now, since the code is not completely clear and not tested we don't really know what's supposed to worked and how. It's really a problem when the only way you have to know if something goes wrong is when your users start complaining... Is there any Nagios monitoring in place or is there the need to have some external reliability monitoring in place? I can set up a Nagios machine to check the HTTP status of PyPi. Also, if the earlier described path of PyPi mirroring my the community is chosen I can happily have a server serving PyPi packages in the Netherlands. I don't think this means what you seem to think it means. If you replace a single point of failure with N points of failure, your overall reliability goes down, not up, since there are now more things to go wrong. Assuming that they're independent points of failure, that means your total number of failures will increase by a factor of N. This is why we should work on the heart the problem problem, pypi itself and why it's down sometime. Nobody know exactly what happen, maybe it's not a performance problems. As you said, we may have the same problem in the future on all mirroring nodes ... Yes, there should be some more investigative work be done on the reason of the apparent unreliability. Regards, Simon de Vlieger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) iQIcBAEBAgAGBQJMF5YCAAoJEBBSHP7i+JXfGysP/0IKUsf0KTvjrXn50RvrH2gp jwIpkVfmzbXNGx2EfSywDFNv9neyKqDF844kR2+Vsr96jFnA0EQyUW3nGy7G9q0q bOc2e2GxCauYXDJoGdxGs1S1aS+1z2oyNd2qYZdFDJM236JnKSLHlA3r383cAfDJ bL46SRDeq19IEgOuwjAU9z74+y7t95tomlYX+DgcB4n7cuePCFTym4nWoavjPyE5 4JLN0+Oo6jBf5FwE4WH3e1HWdrbDck7LJTMltB1W2ex6DUPTW9u+tfpc0Bd8DDjP LPcZN2smyqJEFRI89VmLMvwh91wYhAWqGnm42FmgLaKha06SsxxO8b28SSSywYca TZcv+72d59mZSDkF94DtD9CY0Q0feMKN2+O5d3JA8OTb7QosCUNSH8FGE0A3dOk9 jDVlHoQSqYv4FDHrQbLy8pG6A8z9nJK+8Gk3b55mKcfTIFAcYs94WYprY1ZrO42r YLwwF1ngQ9LUuQcJ+7XFpzS/DbNPmXdo5QJuI48usjZrdh6Dub0N0ruaqxWRNOh6 lYz2djbUgUd5xRjG43b0MemRbyiWbb2eZBnvj2+aoCVNXE6xxBpUzzA7FoQvKfSa mF+i//1xKNRxw9ms7WVMDL+FzIxjRrVyEpW0MDKwB3sWkMjjQh8ag2aqIMr6vWKY djCUFH87ofhC+oIIu8Lh =1sDK -END PGP SIGNATURE- ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] Is it safe to embedding additional metadata in bdist_wininst installers ?
Do you think it would make sense to do it for python itself proper (in distutils), so that different implementations could put whatever they want there for their purpose ? I personally never had a need for this. But if you do, go ahead and propose a patch. Regards, Martin ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig