Skip to content

pytest broken again - the return of #6424 #7409

Description

@jamienoss

#6424 doesn't seem to have been fixed. @drdavella

Building 9a5e356 using conda-build and, effectively, the default conda-forge/astropy-feedstock, the followinng error (and similar for other test packages) is generated.

running run_test.py
Traceback (most recent call last):
  File "//anaconda/conda-bld/astropy_1524771161777/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/site-packages/_pytest/config.py", line 334, in _getconftestmodules
    return self._path2confmods[path]
KeyError: local('//anaconda/conda-bld/astropy_1524771161777/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/site-packages/astropy/io/ascii')

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "//anaconda/conda-bld/astropy_1524771161777/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/site-packages/_pytest/config.py", line 365, in _importconftest
    return self._conftestpath2mod[conftestpath]
KeyError: local('//anaconda/conda-bld/astropy_1524771161777/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/site-packages/astropy/conftest.py')

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "//anaconda/conda-bld/astropy_1524771161777/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/site-packages/_pytest/config.py", line 371, in _importconftest
    mod = conftestpath.pyimport()
  File "//anaconda/conda-bld/astropy_1524771161777/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/site-packages/py/_path/local.py", line 686, in pyimport
    raise self.ImportMismatchError(modname, modfile, self)
py._path.local.LocalPath.ImportMismatchError: ('astropy.conftest', '/Users/jnoss/dev/astropy/build/lib.macosx-10.7-x86_64-3.6/astropy/conftest.py', local('//anaconda/conda-bld/astropy_1524771161777/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/site-packages/astropy/conftest.py'))
ERROR: could not load //anaconda/conda-bld/astropy_1524771161777/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/site-packages/astropy/conftest.py

In recipe/meta.yml I only changed the source (pointing to local path to astropy clone) and added jinja2 and cython to build requirements.

Furthermore, it builds! The test mechanism isn't aware that the feedstock tests failed to even run.

The package can be installed, conda install --use-local astropy, and the same errors are given when calling astropy.test() from python.

The above is true for all test packages.

The conda-build dependencies installed are:

The following NEW packages will be INSTALLED:

    astropy:            3.0.2-py36_1          local
    attrs:              17.4.0-py36_0              
    ca-certificates:    2018.03.07-0               
    certifi:            2018.4.16-py36_0           
    intel-openmp:       2018.0.0-8                 
    libcxx:             4.0.1-h579ed51_0           
    libcxxabi:          4.0.1-hebd6815_0           
    libedit:            3.1-hb4e282d_0             
    libffi:             3.2.1-h475c297_4           
    libgfortran:        3.0.1-h93005f0_2           
    mkl:                2018.0.2-1                 
    mkl_fft:            1.0.1-py36h917ab60_0       
    mkl_random:         1.0.1-py36h78cc56f_0       
    more-itertools:     4.1.0-py36_0               
    ncurses:            6.0-hd04f020_2             
    numpy:              1.14.2-py36ha9ae307_1      
    openssl:            1.0.2o-h26aff7b_0          
    pip:                9.0.3-py36_0               
    pluggy:             0.6.0-py36hb1d0581_0       
    psutil:             5.4.5-py36h1de35cc_0       
    py:                 1.5.3-py36_0               
    pytest:             3.5.0-py36_0               
    pytest-arraydiff:   0.2-py36_0                 
    pytest-astropy:     0.3.0-py36_0               
    pytest-doctestplus: 0.1.3-py36_0               
    pytest-openfiles:   0.3.0-py36_0               
    pytest-remotedata:  0.2.1-py36_0               
    python:             3.6.5-hc167b69_1           
    readline:           7.0-hc1231fa_4             
    setuptools:         39.0.1-py36_0              
    six:                1.11.0-py36h0e22d5e_1      
    sqlite:             3.23.1-hf1716c9_0          
    tk:                 8.6.7-h35a86e2_3           
    wheel:              0.31.0-py36_0              
    xz:                 5.2.3-h727817e_4           
    zlib:               1.2.11-hf3cbc9b_2     

When using the exact feedstock (nothing altered) they are the same as above.

Activity

  1. jamienoss commented on Apr 26, 2018

    @jamienoss
    ContributorAuthor

    Thing is, at one point today it did work. I'm not sure what changed though. Damn gremlins!!!

  2. jamienoss commented on Apr 30, 2018

    @jamienoss
    ContributorAuthor

    conda 4.5.1

    The following NEW packages will be INSTALLED:
    
        ca-certificates: 2018.03.07-0         
        certifi:         2018.4.16-py36_0     
        cython:          0.28.2-py36h1de35cc_0
        intel-openmp:    2018.0.0-8           
        jinja2:          2.10-py36hd36f9c5_0  
        libcxx:          4.0.1-h579ed51_0     
        libcxxabi:       4.0.1-hebd6815_0     
        libedit:         3.1-hb4e282d_0       
        libffi:          3.2.1-h475c297_4     
        libgfortran:     3.0.1-h93005f0_2     
        markupsafe:      1.0-py36h3a1e703_1   
        mkl:             2018.0.2-1           
        ncurses:         6.0-hd04f020_2       
        numpy:           1.11.3-py36h8a80b8c_4
        openssl:         1.0.2o-h26aff7b_0    
        pip:             9.0.3-py36_0         
        python:          3.6.5-hc167b69_1     
        readline:        7.0-hc1231fa_4       
        setuptools:      39.0.1-py36_0        
        sqlite:          3.23.1-hf1716c9_0    
        tk:              8.6.7-h35a86e2_3     
        wheel:           0.31.0-py36_0        
        xz:              5.2.3-h727817e_4     
        zlib:            1.2.11-hf3cbc9b_2 
    
  3. drdavella commented on May 3, 2018

    @drdavella
    Contributor

    I've been trying to reproduce but I suspect this might be a quirk in your local environment. Any other hints you can provide for reproducing would be helpful.

  4. drdavella commented on May 10, 2018

    @drdavella
    Contributor

    Here's what I get for the installed package list when running conda build:

        astropy:            3.0.2-py36_1            local
        attrs:              18.1.0-py36_0
        ca-certificates:    2018.03.07-0
        certifi:            2018.4.16-py36_0
        intel-openmp:       2018.0.0-8
        libcxx:             4.0.1-h579ed51_0
        libcxxabi:          4.0.1-hebd6815_0
        libedit:            3.1.20170329-hb402a30_2
        libffi:             3.2.1-h475c297_4
        libgfortran:        3.0.1-h93005f0_2
        mkl:                2018.0.2-1
        mkl_fft:            1.0.1-py36h917ab60_0
        mkl_random:         1.0.1-py36h78cc56f_0
        more-itertools:     4.1.0-py36_0
        ncurses:            6.1-h0a44026_0
        numpy:              1.14.2-py36ha9ae307_1
        openssl:            1.0.2o-h26aff7b_0
        pip:                10.0.1-py36_0
        pluggy:             0.6.0-py36hb1d0581_0
        psutil:             5.4.5-py36h1de35cc_0
        py:                 1.5.3-py36_0
        pytest:             3.5.1-py36_0
        pytest-arraydiff:   0.2-py36_0
        pytest-astropy:     0.3.0-py36_0
        pytest-doctestplus: 0.1.3-py36_0
        pytest-openfiles:   0.3.0-py36_0
        pytest-remotedata:  0.2.1-py36_0
        python:             3.6.5-hc167b69_1
        readline:           7.0-hc1231fa_4
        setuptools:         39.1.0-py36_0
        six:                1.11.0-py36h0e22d5e_1
        sqlite:             3.23.1-hf1716c9_0
        tk:                 8.6.7-h35a86e2_3
        wheel:              0.31.0-py36_0
        xz:                 5.2.3-h727817e_4
        zlib:               1.2.11-hf3cbc9b_2
    
  5. jamienoss commented on May 15, 2018

    @jamienoss
    ContributorAuthor

    Ok, I've now stumbled across this one #407

    error: [Errno 2] Could not find C/C++ file astropy/convolution/boundary_extend.(c/cpp) for Cython file astropy/convolution/boundary_extend.pyx when building extension astropy.convolution.boundary_extend. Cython must be installed to build from a git checkout.: 'astropy/convolution/boundary_extend.c'
    

    Cython is specified as a build requirement in my recipe/meta.yml.

    This is actually not related to conda build, it occures from just a ./setup build from the astropy src dir. Blowing away the astropy/build dir and a git clean seem to have fixed this. I wonder if it's pulling compiler info from the built file _compiler.blahblah? If so, perhaps it shouldn't.

  6. jamienoss commented on May 15, 2018

    @jamienoss
    ContributorAuthor

    Whoops!!! Removing the build dir from the src path seems to have fixed everything. Guess I must have done a half build at somepoint, directly using ./setup build from within the src tree and just left it. Conda build obviously (now) copies the entire src tree, including this, and probbaly only carries on from where the previous build left off, or something else that mangles the build - perhaps only its presence.

    Anyhow, all sorted, going to slowly skulk away now without anyone noticing, bye... shhhhhhhh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions