bug-pyconfigure
[Top][All Lists]
Advanced

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

[Bug-pyconfigure] Initial "Experiences"


From: Eric Bavier
Subject: [Bug-pyconfigure] Initial "Experiences"
Date: Sat, 17 Aug 2013 01:35:27 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

Good Evening Pyconfigure,

First off, sorry for the wall of text.

I was exploring a project, http://bugseverywhere.org/, bug was frustrated by their build/install system which so far has been my only gripe with the project.  I remembered seeing the release email for the latest pyconfigure, so I grabbed the pyconfigure-2.0.tar.gz and thought I'd try applying it to this bugs-everywhere project.  This is a summary of problems/bugs I've run into.

Some relevant system info
  • Ubuntu 12.04
  • Python 2.7.4 as well as Python 3.3.1
  • Autoconf 2.69
  • Automake 1.11.6

I started by looking through the documentation.  It said I could mostly just copy a few template files from the src directory.  I was confronted by more files than I was expecting, and the documentation did not discuss the "*.make" and "*.distutils" distinctions.  I ended up grabbing the *.make files (which, looking back, might have been my first mistake).

I re-read the 0.2 release announcement, and it talked about a new pyconf script.  So, I thought I'd do a proper installation of pyconfigure, which went along without any problems.  At first I couldn't find any documentation surrounding the pyconf script.  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.  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.

I removed any files that pyconf didn't like, then reran.  Things seemed to work alright this time, though pyconf seems to not like the "folded field" encoding style for the PKG-INFO Description field.

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.

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:
$ ./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.

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..."

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.

Thanks again,
`~Eric Bavier

Attachment: python.m4.patch
Description: Text Data


reply via email to

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