bug-pyconfigure
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-pyconfigure] Initial "Experiences"


From: Brandon Invergo
Subject: Re: [Bug-pyconfigure] Initial "Experiences"
Date: Sat, 17 Aug 2013 11:12:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi Eric,

Thanks for the detailed email.  Jeez.  This is unacceptable and I am
very sorry for such a negative initial experience.  I will make it my
priority to fix as much of this as possible today.

> I eventually realise this is because the documentation at
> https://www.gnu.org/software/pyconfigure/manual/html_node /index.html
> is for pyconfigure 1.0, while the remaining documentation formats seem
> to be up-to-date.  

A huge oversight on my part.  Will be fixed ASAP.

> After scanning through the 2.0 documentation, and
> throwing together a PKG-INFO.in file, I try
>
> $ pyconf PKG-INFO.in
> Running pyconfigure in /home/bavier/src/be
> Copying Python M4 macros
> Traceback (most recent call last):
>   File "/usr/local/bin/pyconf", line 281, in <module>
>     copy_macros(output)
>   File "/usr/local/bin/pyconf", line 130, in copy_macros
>     except FileExistsError:
> NameError: global name 'FileExistsError' is not defined
>
> I realize there's a FileExistsError being thrown because I left the
> directory dirty from my first attempt manually copying the tempalte
> files.  But it appears my version of Python doesn't recognize the
> exception class.  Looking at the pyconf script, it appears the error
> would otherwise just cause a pass-over.

This is a mistake.  FileExistsError is Python 3 only.  Thanks for
catching that.  I tried to make pyconf compatible with both Python 2 and
3 but I missed this. 

> ...though pyconf seems to not like the "folded field" encoding style
> for the PKG-INFO Description field.

Could you please expand on what you mean by this? 

> Upon first running configure, I got
>
> ./configure: line 1696: syntax error near unexpected token `2.7,'
> ./configure: line 1696: `PC_INIT(2.7, 3.3.1)'
>
> This might not be related directly to pyconfigure, as it seems
> autoconf was just not finding the m4/python.m4 macro file.  Adding
> "m4_include([m4/python.m4])" seems to fix this, but I'm not sure why
> it was broken in the first place.

Strange, those macros should be included by the AC_CONFIG_MACRO_DIR
call, which "works for me."  In fact, both that macro and the m4_include
that you added were previously in there but were removed for
redundancy.  I need to look into this more.

> When running configure:
>
> $ ./configure
> checking for python3.3... /usr/bin/python3.3
> checking for python3.3... (cached) /usr/bin/python3.3
> checking if Python >= '2.7'... 
> yes
> checking if Python <= '3.3.1'... 
> configure: error: in `/home/bavier/src/be':
> configure: error: No compatible Python interpreter found. If you're sure that 
> you have one, try setting the PYTHON environment variable to the location of 
> the interpreter.
> See `config.log' for more details
>
> I can indeed set PYTHON=/usr/bin/python (Python 2.7), and things work
> fine, but it should work regardless since python3.3 on my system is
> Python 3.3.1 (which is certainly <= 3.3.1).   Doing
> PC_INIT([2.7],[3.3.2]) works.  I'm not yet certain of the requirements
> for this project:

That should work but at first glance I don't know what is going wrong.
I will investigate.

> $ ./configure
> checking for python3.3... /usr/bin/python3.3
> checking for python3.3... (cached) /usr/bin/python3.3
> checking if Python >= '2.7'... 
> yes
> checking if Python <= '3.3.2'... 
> yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for python3.3-config... no
> checking for Python prefix... cat
> checking for Python site-packages directory... lib/python3.3/site-packages
> checking for Python exec-prefix... cat
> checking for Python extension module directory... lib/python/site-packages
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating setup.py
>
> I'll overlook for now the unsightly line breaks after the python
> version checks.  I'm curious as to why the Python prefix is discovered
> to be "cat".  Seems suspicious to me.  I think the attached patch
> addresses the problem.

The line breaks do need fixing, though as they are cosmetic and I am
immensely busy through the end of September, I can't guarantee that
they'll be fixed if they require a lot of time to hunt down (I wasn't
successful in the past).  Nevertheless they are high on my to-do list.

The cat problem is strange but it looks like a bug in my macros.  I will
fix that.

>
> Also slightly misleading:
>
> $ ./configure PYTHON=/usr/bin/python2
> checking for python3.3... /usr/bin/python2
> checking for python3.3... (cached) /usr/bin/python2
> ...
>
> That it indicates it's looking for python3.3 and found a python2
> interpreter that satisfies that search?  Better might be to just say
> "checking for python..."

Also strange, also needs investigation.  

> I just thought I'd provide some feedback.  I do very much appreciate
> all the work you've already done.  I've learned a lot about python
> today :).  I might actually be able to send some more patches your way
> if I get a chance.

The feedback is *greatly* appreciated.  I am embarrassed by some of the
problems that you found (and flummoxed by others) but I might not have
noticed them had you not brought them up.  I'm still earning my advanced
Autoconf chops, so some hiccups along the way are expected, I suppose,
but I hope to get all of this ironed out ASAP.  I'll aim for a bugfix
release this week.

Thanks again!
Brandon


-- 
Brandon Invergo
http://brandon.invergo.net

Attachment: pgpN5Tk8toJiw.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]