numscons throws an AssertionError on module import

Bug #196707 reported by John B. Cole
2
Affects Status Importance Assigned to Milestone
numscons
Fix Released
Undecided
Unassigned

Bug Description

I downloaded and installed numscons 0.4.1 on my machine (64-bit RHEL 4, Python 2.4 built from source in a user account). Upon import (e.g. import numscons) numscons throws an AssertionError exception:

[jcole@aipl366 jcole]$ python
Python 2.4.1 (#2, Sep 14 2005, 11:12:15)
[GCC 3.4.3 20050227 (Red Hat 3.4.3-22.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numscons
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/jcole/lib/python2.4/site-packages/numscons-0.4.1-py2.4.egg/numscons/__init__.py", line 26, in ?
    from checkers import CheckF77BLAS, CheckCBLAS, CheckCLAPACK, CheckF77LAPACK, CheckFFT
  File "/home/jcole/lib/python2.4/site-packages/numscons-0.4.1-py2.4.egg/numscons/checkers/__init__.py", line 1, in ?
    from blas_lapack_checkers import CheckCLAPACK, CheckCBLAS, CheckF77BLAS, CheckF77LAPACK
  File "/home/jcole/lib/python2.4/site-packages/numscons-0.4.1-py2.4.egg/numscons/checkers/blas_lapack_checkers.py", line 18, in ?
    from numscons.checkers.perflib import CONFIG, get_perflib_info
  File "/home/jcole/lib/python2.4/site-packages/numscons-0.4.1-py2.4.egg/numscons/checkers/perflib.py", line 15, in ?
    from numscons.checkers.perflib_config import IsFactory, GetVersionFactory, \
  File "/home/jcole/lib/python2.4/site-packages/numscons-0.4.1-py2.4.egg/numscons/checkers/perflib_config.py", line 95, in ?
    CONFIG = build_config()
  File "/home/jcole/lib/python2.4/site-packages/numscons-0.4.1-py2.4.egg/numscons/checkers/perflib_config.py", line 66, in build_config
    assert len(st) > 0
AssertionError
>>>

As a result, I cannot try building the current trunk of NumPy.

Revision history for this message
David Cournapeau (david-ar) wrote :

Thanks for the bug report.

Can I ask you where you got the egg ? The assertion is an internal consistency check, which fails only when there is an installation problem. Can you check whether your egg archive contains the file perflib.cfg in numscons/checkers ?

Revision history for this message
John B. Cole (john-cole) wrote :

Sure. I got the egg by downloading numscons-0.4.1.tar.bz2 from the launchpad site (https://launchpad.net/numpy.scons.support/+download) like it said to on your wiki. My archive does NOT contain perflib.cfg. Here are the perflib files I DO have in numscons/checkers:

perflib_config.py
perflib_info.py
perflib.py

I did not have a pre-existing numscons installation when I installe 0.4.1.

Thanks for your help; trying to get numpy built from source using distutils was costing me my sanity.

Revision history for this message
David Cournapeau (david-ar) wrote :

Well it looks like building with numscons has not been a success either :)

Ok, so if I understand correctly, you build the egg from sources, right ? I've just realized that I forgot to upload 0.4.1.1, which solves this bug I noticed myself. I uploaded to pypi, but forgot to upload on launchpad. This is fixed now.

Revision history for this message
John B. Cole (john-cole) wrote :

Hi, David.

I deleted the numscons tree in my site-packages directory, downloaded 0.4.1.1 from launchpad. built it, and installed it. Unfortunately, there is still no perflib.cfg file in the archive (I used the bz2 version). I grepped the tree to make sure that I wasn't simply missing the file.

I then downloaded the actual .egg file, updated ez_setup, and tried installing using "easy_install numscons-0.4.1.1-py2.4.egg". That worked. It looks like perhaps not all of the distributions you're rolling are being correctly packaged, but I'm not sure why that would be.

Revision history for this message
David Cournapeau (david-ar) wrote :

Sorry about the trouble. I screwed up between branches; this time, I should have correctly merged everything in 0.4.2. I put eggs and source archives; I also checked that perflib.cfg is found in all tarballs.

Revision history for this message
David Cournapeau (david-ar) wrote :

Fix in 0.4.2 release

Changed in numpy.scons.support:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.