Discussion:
Python macros
Brandon Invergo
2012-09-23 18:31:35 UTC
Permalink
Hi everyone,
Sorry for the cross-posting here but it touches both Autoconf and
Automake in some way...

I recently worked to implement a standard configure/Makefile.in file
pair for Python-based GNU projects. In the process, I implemented a
large number of Autoconf macros. Well, in fact, a lot were taken from
python.m4 that is included with Automake. However, in that file, many
tests are done in one macro, whereas I've broken them down into
individual macros, such that the user can decide what tests they
actually want. I furthermore implemented Python as a language in
Autoconf, so you can do things like AC_LANG_PROG to call arbitrary
Python code.

Since this task of implementing configure scripts for Python packages
was considered to be of rather high importance by rms et al., I'm
wondering how best to submit these macros. There are other Python macros
in the Autoconf Macro Archive, however they are limited and sadly
out-of-date (ie they only check for Python versions up to 2.6, when 2.7+
and 3.2+ are available).

python.m4 in Automake is much more complete, and these macros are the
direct decendents of that file, but to me at least, it's confusing that
these macros should be implemented in Automake and not in Autoconf (or
Autoconf Archive for that matter). So I'm not sure if they should be
submitted to that project.

So, please let me know how best to proceed with the macros. If any work
needs to be done to make them fit better, I'd be happy to help. For
example, the macros are all in the "PC_" namespace ("Python Configure")
since I didn't know where they'd end up....that would need to be
changed.

I've attached the macro file to this email, or you can find it here:
http://bzr.savannah.gnu.org/lh/gsrc/trunk/annotate/head:/util/python-configure/m4/python.m4

Regards,
Brandon Invergo
Paul Eggert
2012-09-24 06:30:50 UTC
Permalink
My kneejerk reaction is that Python would be a good language
for Autoconf to deal with. The hard part would probably
be writing the documentation -- is that something you
could do? The idea would be to come up with a patch
to the Autoconf sources.
Brandon Invergo
2012-09-25 16:01:59 UTC
Permalink
Post by Paul Eggert
My kneejerk reaction is that Python would be a good language
for Autoconf to deal with. The hard part would probably
be writing the documentation -- is that something you
could do? The idea would be to come up with a patch
to the Autoconf sources.
Yes, that's no problem. I may have to put it off for a few days,
unfortunately, but I have no problem writing docs and then putting
together a patch.

-brandon

Stefano Lattarini
2012-09-24 07:53:43 UTC
Permalink
[SNIP]
python.m4 in Automake is much more complete, and these macros are the
direct decendents of that file, but to me at least, it's confusing that
these macros should be implemented in Automake and not in Autoconf (or
Autoconf Archive for that matter).
I guess the reason for that is that when Automake introduced support for
the _PYTHON primary, no Autoconf macro existed that dealt with python, so
the Automake developers rolled their own macros, mostly tailored to the
specific needs of Automake.
So I'm not sure if they should be submitted to that project.
I say the correct way to proceed is to implement python support in
Autoconf, and then have Automake build upon that (maybe extending
it where necessary, albeit I hope there will be no need for that).
[SNIP]
Thanks,
Stefano
Loading...