Re: [Python-Dev] buildtime vs runtime in Distutils
On Mon, Nov 16, 2009 at 8:15 PM, Toshio Kuratomi wrote: [..] > I've brought the issue of Makefile and pyconfig.h being needed for distutils > to the attention of every new Fedora python maintainer since the package > split was made. The current maintainer, David Malcolm, agrees that > distutils.sysconfig needs to be able to use this data and he has moved the > Makefile and header files into the main python package. This doesn't change > the problems with using a Makefile and C header files as a data format for > python. Great News ! Now for the format problem, I agree that it seems more robust to pre-process the variables and inject them in the stdlib when ./configure is run. I am not sure what is the best strategy here, but I would rather not add yet another configuration file (wether its an xml format or an ini-like format). So what I am proposing is to inject those values in a private dict in the new sysconfig.py module, that can be read through the get_config_vars / get_config_var APIs. This means that sysconfig.py will be added as "sysconfig.py.in" Regards Tarek ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] buildtime vs runtime in Distutils
On Mon, Nov 16, 2009 at 10:09 PM, David Malcolm wrote: [..] >> >> $ dpkg -S /usr/lib/python2.5/config/Makefile >> python2.5: /usr/lib/python2.5/config/Makefile > For what it's worth, this is fixed in Fedora as of python-2.6.4-2.fc13 ; > the bug tracking it was: > https://bugzilla.redhat.com/show_bug.cgi?id=531901 Thanks David ! ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] buildtime vs runtime in Distutils
Tarek Ziadé wrote: > Now for the format problem, I agree that it seems more robust to > pre-process the variables > and inject them in the stdlib when ./configure is run. > > I am not sure what is the best strategy here, but I would rather not > add yet another > configuration file (wether its an xml format or an ini-like format). > > So what I am proposing is to inject those values in a private dict in > the new sysconfig.py module, > that can be read through the get_config_vars / get_config_var APIs. > > This means that sysconfig.py will be added as "sysconfig.py.in" Are you planing to implement the proposal for Windows, too? There may be no need to change the code because we have full control over the official installers. Also the VisualStudio Windows build doesn't use ./configure but hand crafted header files. You'd have to fall back to a hand crafter sysconfig.py. Christian ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] buildtime vs runtime in Distutils
Tarek Ziadé gmail.com> writes: > > So what I am proposing is to inject those values in a private dict in > the new sysconfig.py module, > that can be read through the get_config_vars / get_config_var APIs. > > This means that sysconfig.py will be added as "sysconfig.py.in" This means you have to relaunch the whole configure thing each time you make a change to sysconfig? This doesn't sound like a good idea to me. You could make the private dict a dedicated module instead, e.g. "_sysconfig_data.py.in". As for Windows, if people have the ability to choose the installation directory when installing, I'm not sure how you're gonna handle it. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] buildtime vs runtime in Distutils
Tarek Ziadé wrote: > On Mon, Nov 16, 2009 at 8:15 PM, Toshio Kuratomi wrote: > [..] >> I've brought the issue of Makefile and pyconfig.h being needed for distutils >> to the attention of every new Fedora python maintainer since the package >> split was made. The current maintainer, David Malcolm, agrees that >> distutils.sysconfig needs to be able to use this data and he has moved the >> Makefile and header files into the main python package. This doesn't change >> the problems with using a Makefile and C header files as a data format for >> python. > > Great News ! > > Now for the format problem, I agree that it seems more robust to > pre-process the variables > and inject them in the stdlib when ./configure is run. > > I am not sure what is the best strategy here, but I would rather not > add yet another > configuration file (wether its an xml format or an ini-like format). > > So what I am proposing is to inject those values in a private dict in > the new sysconfig.py module, > that can be read through the get_config_vars / get_config_var APIs. > > This means that sysconfig.py will be added as "sysconfig.py.in" Wouldn't it be cleaner to place the extracted information into a new module _sysconfig_settings.py which gets created by the configure script or the Makefile later during the build ? This new module could then be imported into sysconfig.py at run-time. BTW: There's already a Tools/scripts/h2py.py we could use for converting pyconfig.h into a Python file. For the Makefile we could use the distutils Makefile parser to add the extra values. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 19 2009) >>> Python/Zope Consulting and Support ...http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] buildtime vs runtime in Distutils
On Thu, Nov 19, 2009 at 11:04 AM, Antoine Pitrou wrote: > Tarek Ziadé gmail.com> writes: >> >> So what I am proposing is to inject those values in a private dict in >> the new sysconfig.py module, >> that can be read through the get_config_vars / get_config_var APIs. >> >> This means that sysconfig.py will be added as "sysconfig.py.in" > > This means you have to relaunch the whole configure thing each time you make a > change to sysconfig? This doesn't sound like a good idea to me. You could make > the private dict a dedicated module instead, e.g. "_sysconfig_data.py.in". That's much better indeed. > > As for Windows, if people have the ability to choose the installation > directory > when installing, I'm not sure how you're gonna handle it. I don't know. I am investigating with what Christian has explained on Windows installers, to see how it can be hooked in the installation process, and a fallback for the win32 build version. If it gets too complex, I'll probably postpone this and finish a first version of sysconfig that does use Makefile. Tarek ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] buildtime vs runtime in Distutils
On Thu, Nov 19, 2009 at 12:04 PM, M.-A. Lemburg wrote: [..] > BTW: There's already a Tools/scripts/h2py.py we could use for > converting pyconfig.h into a Python file. Good to know, > For the Makefile > we could use the distutils Makefile parser to add the extra > values. Yes, there's also a pyconfig.h parser function. It seems though, for Makefile, that the tools available during the build phase are simpler/better at extracting values. (currently experimenting those) Tarek ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Meet your 3.2 release manager
I'm pleased to announce that Georg has (naively) volunteered to shepherd the 3.2 release. -- Regards, Benjamin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
