[issue1168055] Add current dir when running try_run test program

2009-01-12 Thread Fernando Gomes

Fernando Gomes fgs...@gmail.com added the comment:

Dear Community,
I'd fronted problems to install Statistics module on my Ubuntu.
There are errors that are hard to solve without an expert help, such as
the one received from Michiel (Thank you again!!!).
Errors are listed below:

# XXX
o...@fgsj-ima:/usr/lib/python2.5/statistics-0.19# python setup.py config
running config
 = begin statistics configuration 
unable to execute _configtest: No such file or directory
libm does not contain erf; skipping this feature
unable to execute _configtest: No such file or directory
libm does not contain erfc; skipping this feature
 = end statistics configuration ==
wrote config file (src/config.h)
r...@fgsj-ima:/usr/lib/python2.5/statistics-0.19# python setup.py build
running build
running build_ext
building 'statistics' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -Isrc
-I/usr/lib/python2.5/site-packages/numpy/core/include
-I/usr/include/python2.5
-c src/statisticsmodule.c -o
build/temp.linux-i686-2.5/src/statisticsmodule.o
src/statisticsmodule.c:1:20: error: Python.h: No such file or directory
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
from src/statisticsmodule.c:2:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:100:2:
error: #error Must use Python with unicode enabled.
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
from src/statisticsmodule.c:2:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:920:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:921:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘npy_uintp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1013:
error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1014:
error:
expected ‘)’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1016:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1016:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1017:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1027:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1027:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1029:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1029:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1030:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1032:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1037:
error:
expected ‘)’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1042:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1044:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1045:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1045:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1047:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1051:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1053:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1054:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1055:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’

[issue1168055] Add current dir when running try_run test program

2008-09-23 Thread Steve Lianoglou

Steve Lianoglou [EMAIL PROTECTED] added the comment:

Sorry to bring up an old issue, but I just got bit by this when trying
to install a python package.

The `config` command was used to ensure that a certain function was
included in the math.h on my cpu before compiling the resulting c binary
and python wrapper for it.

I had to chase down the problem and basically re-figure out what Michiel
did in his patch on my system[1] and override the `try_run` method in
the setup.py file.

I didn't bother checking the issue tracker assuming distutils is used so
widely (and is old enough) that the bug couldn't be in distutiles
itself, but must be something I'm doing wrong in my end ... oh well.

Anyway, could we somehow try to fix this bug to mitigate some lost time
and frustration?

Michiel's patch seems reasonable enough to me since it looks to be the
least surgery-intensive way (I'm not sure where Phillip would like to
put the os.path.abspath() call) to fix the bug for the majority of the
time when someone would be bitten by it.

Regardless of whether or not the code is well documented, it's still
there and usable in distutils (w/o any warnings against its use), so it
would make sense to me that we at least have it work as its intended to.

[1] My path was slightly different than the submitted patch. Where
Michiel has:

command = os.path.join(os.curdir, exe)

I have:

command = os.path.join(os.getcwd(), exe)

all in all, you get the same effect

--
nosy: +lianos

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1168055
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com