conda-tools / conda-build-all

BSD 3-Clause "New" or "Revised" License
30 stars 24 forks source link

Selector resolution problem / Python 2,3 compatibility issue? #77

Open jakirkham opened 7 years ago

jakirkham commented 7 years ago

When trying run conda-build-all on the included recipe, I encounter a build issue when the root environment is Python 3, but not when the root environment is Python 2. More details about the recipe and environments below. Was unable to reproduce this with conda-build alone in either environment. Am sort of suspicious that this issue is actually caused by Python versions. Though it could be.

Python 3 traceback (Python 2 has no issues).

$ conda build-all recipes/wrf-python --matrix-condition "numpy >=1.11" "python >=2.7,<3|>=3.5" 
Fetching package metadata .............
Error: Invalid selector in meta.yaml line 15:
  skip: True  # [win32 or np>=112 or (win and py>=35)]

Recipe below.

```yaml # meta.yaml {% set version = "1.0b1" %} package: name: wrf-python version: {{ version }} source: fn: wrf-python-{{ version }}.tar.gz url: https://github.com/NCAR/wrf-python/archive/{{ version }}.tar.gz sha256: 94f05a9719701959702094eafb84555a996bc4f7d75042fb07bca3c35bda9f31 build: number: 1 detect_binary_files_with_prefix: true skip: True # [win32 or np>=112 or (win and py>=35)] requirements: build: - pip - numpy x.x - wrapt - m2w64-toolchain # [win] - gcc # [unix] - libgcc # [unix] - python - vc 9 # [win and py27] - vc 10 # [win and py34] - vc 14 # [win and py>=35] run: - numpy x.x - python - wrapt - m2w64-toolchain # [win] - gcc # [unix] - libgcc # [unix] - xarray - vc 9 # [win and py27] - vc 10 # [win and py34] - vc 14 # [win and py>=35] test: requires: - nose imports: - wrf about: home: https://github.com/NCAR/wrf-python license: "NCL Source Code" summary: "Diagnostic and interpolation routines for WRF-ARW data." extra: recipe-maintainers: - bladwig1 - marylhaley - david-ian-brown - khallock ```


Python 2 environment

```yaml # environment2.yml name: root channels: !!python/tuple - !!python/unicode 'nanshe' - !!python/unicode 'conda-forge' - !!python/unicode 'jakirkham' - !!python/unicode 'defaults' dependencies: - beautifulsoup4=4.5.3=py27_0 - chardet=2.3.0=py27_0 - conda-forge::anaconda-client=1.5.1=py27_0 - conda-forge::anaconda-verify=1.2.0=py27_0 - conda-forge::appnope=0.1.0=py27_0 - conda-forge::backports.shutil_get_terminal_size=1.0.0=py27_1 - conda-forge::ca-certificates=2016.9.26=0 - conda-forge::certifi=2016.9.26=py27_0 - conda-forge::cffi=1.7.0=py27_0 - conda-forge::clyent=1.2.1=py27_0 - conda-forge::conda=4.2.13=py27_0 - conda-forge::conda-build=2.1.1=py27_1 - conda-forge::conda-build-all=1.0.1=py27_1 - conda-forge::conda-env=2.6.0=0 - conda-forge::conda-execute=0.8.0=py27_0 - conda-forge::constructor=1.3.4=py27_0 - conda-forge::contextlib2=0.5.4=py27_0 - conda-forge::coverage=3.7.1=py27_0 - conda-forge::curl=7.52.1=0 - conda-forge::decorator=4.0.10=py27_0 - conda-forge::enum34=1.1.6=py27_1 - conda-forge::expat=2.1.0=2 - conda-forge::filelock=2.0.6=py27_0 - conda-forge::funcsigs=1.0.2=py27_0 - conda-forge::futures=3.0.5=py27_0 - conda-forge::gitdb=0.6.4=py27_1 - conda-forge::gitpython=2.1.1=py27_0 - conda-forge::idna=2.1=py27_0 - conda-forge::ipaddress=1.0.16=py27_0 - conda-forge::ipython=5.1.0=py27_2 - conda-forge::ipython_genutils=0.1.0=py27_0 - conda-forge::jinja2=2.8=py27_1 - conda-forge::libconda=4.0.0=py27_0 - conda-forge::libffi=3.2.1=3 - conda-forge::markupsafe=0.23=py27_1 - conda-forge::mock=2.0.0=py27_0 - conda-forge::ncurses=5.9=10 - conda-forge::nose=1.3.7=py27_2 - conda-forge::openssl=1.0.2h=3 - conda-forge::pathlib2=2.1.0=py27_0 - conda-forge::pbr=1.10.0=py27_0 - conda-forge::pexpect=4.2.1=py27_0 - conda-forge::pickleshare=0.7.3=py27_0 - conda-forge::pip=9.0.1=py27_0 - conda-forge::pkginfo=1.2.1=py27_0 - conda-forge::prompt_toolkit=1.0.9=py27_0 - conda-forge::psutil=4.3.0=py27_0 - conda-forge::ptyprocess=0.5.1=py27_0 - conda-forge::pyasn1=0.1.9=py27_0 - conda-forge::pycosat=0.6.1=py27_0 - conda-forge::pycparser=2.17=py27_0 - conda-forge::pycrypto=2.6.1=py27_0 - conda-forge::pygithub=1.29=py27_0 - conda-forge::pygments=2.1.3=py27_1 - conda-forge::pyopenssl=16.0.0=py27_0 - conda-forge::python=2.7.12=1 - conda-forge::python-dateutil=2.6.0=py27_0 - conda-forge::pytz=2016.10=py27_0 - conda-forge::pyyaml=3.11=py27_0 - conda-forge::readline=6.2=0 - conda-forge::requests=2.12.4=py27_0 - conda-forge::ruamel.ordereddict=0.4.6=py27_0 - conda-forge::ruamel.yaml=0.13.7=py27_0 - conda-forge::ruamel_yaml=0.11.14=py27_0 - conda-forge::setuptools=32.3.1=py27_0 - conda-forge::simplegeneric=0.8.1=py27_0 - conda-forge::six=1.10.0=py27_1 - conda-forge::smmap=2.0.1=py27_0 - conda-forge::sqlite=3.13.0=1 - conda-forge::tk=8.5.19=1 - conda-forge::traitlets=4.3.1=py27_0 - conda-forge::typing=3.5.3.0=py27_0 - conda-forge::wcwidth=0.1.7=py27_0 - conda-forge::wheel=0.29.0=py27_0 - conda-forge::yaml=0.1.6=0 - conda-forge::zlib=1.2.8=3 - conda-verify=2.0.0=py27_0 - cryptography=1.7.1=py27_0 - python.app=1.2=py27_4 - pip: - backports.shutil-get-terminal-size==1.0.0 - conda-build-all (/zopt/conda2/lib/python2.7/site-packages)==1.0.1 - conda-smithy (/Users/kirkhamj/Developer/Conda/conda-forge/conda-smithy)==2.0.0 - ipython-genutils==0.1.0 - prompt-toolkit==1.0.9 - ruamel-yaml==0.11.14 - smmap2==2.0.1 prefix: /zopt/conda2 ```


Python 3 environment

```yaml # environment3.yml name: root channels: !!python/tuple - nanshe - conda-forge - jakirkham - defaults dependencies: - beautifulsoup4=4.5.3=py35_0 - chardet=2.3.0=py35_0 - conda-forge::anaconda-client=1.5.1=py35_0 - conda-forge::appnope=0.1.0=py35_0 - conda-forge::backports.shutil_get_terminal_size=1.0.0=py35_1 - conda-forge::ca-certificates=2016.9.26=0 - conda-forge::certifi=2016.9.26=py35_0 - conda-forge::clyent=1.2.1=py35_0 - conda-forge::conda=4.2.13=py35_0 - conda-forge::conda-build=2.1.1=py35_1 - conda-forge::conda-build-all=1.0.1=py35_1 - conda-forge::conda-env=2.6.0=0 - conda-forge::decorator=4.0.10=py35_0 - conda-forge::filelock=2.0.6=py35_0 - conda-forge::freetype=2.6.3=1 - conda-forge::gitdb=0.6.4=py35_1 - conda-forge::gitpython=2.1.1=py35_0 - conda-forge::ipython=5.1.0=py35_2 - conda-forge::ipython_genutils=0.1.0=py35_0 - conda-forge::jinja2=2.8=py35_1 - conda-forge::jpeg=9b=0 - conda-forge::libpng=1.6.28=0 - conda-forge::libtiff=4.0.6=7 - conda-forge::markupsafe=0.23=py35_1 - conda-forge::mock=2.0.0=py35_0 - conda-forge::ncurses=5.9=10 - conda-forge::nose=1.3.7=py35_2 - conda-forge::openssl=1.0.2h=3 - conda-forge::path.py=8.2.1=py35_0 - conda-forge::pbr=1.10.0=py35_0 - conda-forge::pexpect=4.2.1=py35_0 - conda-forge::pickleshare=0.7.3=py35_0 - conda-forge::pillow=4.0.0=py35_0 - conda-forge::pip=9.0.1=py35_0 - conda-forge::pkginfo=1.2.1=py35_0 - conda-forge::prompt_toolkit=1.0.9=py35_0 - conda-forge::ptyprocess=0.5.1=py35_0 - conda-forge::pycosat=0.6.1=py35_0 - conda-forge::pycrypto=2.6.1=py35_0 - conda-forge::pygithub=1.29=py35_0 - conda-forge::pygments=2.1.3=py35_1 - conda-forge::python=3.5.2=5 - conda-forge::python-dateutil=2.6.0=py35_0 - conda-forge::python-simplegeneric=0.8.1=py35_0 - conda-forge::pytz=2016.10=py35_0 - conda-forge::pyyaml=3.11=py35_0 - conda-forge::readline=6.2=0 - conda-forge::requests=2.12.4=py35_0 - conda-forge::ruamel.yaml=0.13.7=py35_0 - conda-forge::ruamel_yaml=0.11.14=py35_0 - conda-forge::setuptools=32.3.1=py35_0 - conda-forge::simplegeneric=0.8.1=py35_0 - conda-forge::six=1.10.0=py35_1 - conda-forge::smmap=2.0.1=py35_0 - conda-forge::sqlite=3.13.0=1 - conda-forge::tk=8.5.19=1 - conda-forge::traitlets=4.3.1=py35_0 - conda-forge::wcwidth=0.1.7=py35_0 - conda-forge::wheel=0.29.0=py35_0 - conda-forge::xz=5.2.2=0 - conda-forge::yaml=0.1.6=0 - conda-forge::zlib=1.2.8=3 - conda-verify=2.0.0=py35_0 - jbig=2.1=0 - python.app=1.2=py35_4 - pip: - backports.shutil-get-terminal-size==1.0.0 - conda-smithy (/Users/kirkhamj/Developer/Conda/conda-forge/conda-smithy)==2.0.0 - ipython-genutils==0.1.0 - prompt-toolkit==1.0.9 - ruamel-yaml==0.11.14 - smmap2==2.0.1 prefix: /zopt/conda3 ```
pelson commented 6 years ago

I've just taken a look at this, and realised that it is a conda-build issue, not a conda-build-all one:

pelson@~/dev/conda-build-all> conda build --version
conda-build 2.1.18

pelson@~/dev/conda-build-all> conda build my_recipes/broken_py3 --debug
Error: Invalid selector in meta.yaml line 16:
  skip: True  # [win32 or np>=112 or (win and py>=35)]

Possibly related to https://github.com/conda/conda-build/issues/1202

jakirkham commented 6 years ago

Don't think that issue is related. It's about things like np112, which wasn't used here.