boa icon indicating copy to clipboard operation
boa copied to clipboard

boa build fails to build noarch package

Open beenje opened this issue 4 years ago • 0 comments

I tried boa build on a simple noarch: python recipe but it failed:

curl -Ls https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/master/recipe/conda_build_config.yaml >  ${HOME}/conda_build_config.yaml
git clone https://github.com/conda-forge/icepap-feedstock
cd icepap-feedstock/
boa convert recipe/meta.yaml > recipe/recipe.yaml
boa build recipe 2>&1 | tee boa.log

boa is trying to build several variants:

Assembling all recipes and variants

            Output: icepap
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Package         ┃ Variant versions ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ target_platform │ linux-64         │
│ python          │ 3.7.* *_cpython  │
│                 │ 3.8.* *_cpython  │
│                 │ 3.9.* *_cpython  │
└─────────────────┴──────────────────┘

This is a noarch recipe, so it should only build one package:

build:
  number: 0
  noarch: python
  entry_points:
    - icepap = icepap.__main__:main
    - icepapctl = icepap.cli:cli
  script: '{{ PYTHON }} -m pip install . -vv'

First build (for python 3.7) works: TEST END: /opt/conda/conda-bld/noarch/icepap-3.6.3-pypyhe5f6b98_0.tar.bz2

And second fails with:

Starting build for icepap

source tree in: /opt/conda/conda-bld/icepap_1650053889632/work
export PREFIX=/opt/conda/conda-bld/icepap_1650053889632/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho
ld_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh
export BUILD_PREFIX=/opt/conda/conda-bld/icepap_1650053889632/_build_env
export SRC_DIR=/opt/conda/conda-bld/icepap_1650053889632/work
ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Using pip 22.0.4 from $PREFIX/lib/python3.8/site-packages/pip (python 3.8)
Non-user install because user site-packages disabled
Ignoring indexes: https://pypi.org/simple
Created temporary directory: /tmp/pip-ephem-wheel-cache-_bvqnlpn
Created temporary directory: /tmp/pip-req-tracker-m7vwlq0t
Initialized build tracking at /tmp/pip-req-tracker-m7vwlq0t
Created build tracker: /tmp/pip-req-tracker-m7vwlq0t
Entered build tracker: /tmp/pip-req-tracker-m7vwlq0t
Created temporary directory: /tmp/pip-install-01asln2z
Exception information:
Traceback (most recent call last):
  File "$PREFIX/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "$PREFIX/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "$PREFIX/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 305, in run
    reqs = self.get_requirements(args, options, finder, session)
  File "$PREFIX/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 416, in get_requirements
    req_to_add = install_req_from_line(
  File "$PREFIX/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 390, in install_req_from_line
    parts = parse_req_from_line(name, line_source)
  File "$PREFIX/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 308, in parse_req_from_line
    url = _get_url_from_path(p, name)
  File "$PREFIX/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 264, in _get_url_from_path
    raise InstallationError(
pip._internal.exceptions.InstallationError: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Removed build tracker: '/tmp/pip-req-tracker-m7vwlq0t'

I guess some working directory was removed after the first build? Anyway, only one package should be built.

conda mambabuild recipe properly creates only one package: /opt/conda/conda-bld/noarch/icepap-3.6.3-pyhd8ed1ab_0.tar.bz2.

beenje avatar Apr 15 '22 20:04 beenje