Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

AttributeError: 'CondaBuildSpec' object has no attribute 'split' #388

Closed
dhvu opened this issue Dec 5, 2023 · 5 comments · Fixed by #395
Closed

AttributeError: 'CondaBuildSpec' object has no attribute 'split' #388

dhvu opened this issue Dec 5, 2023 · 5 comments · Fixed by #395

Comments

@dhvu
Copy link

dhvu commented Dec 5, 2023

boa 0.16.0 using conda-build 3.28.0 fails with

│ .../site-packages/conda_build/post.py:1661 in                                                                                   │
│ <listcomp>                                                                                       │
│                                                                                                  │
│   1658 │   │   m.build_number(),                                                                 │
│   1659 │   │   m.config.target_subdir,                                                           │
│   1660 │   │   m.get_value("build/ignore_run_exports"),                                          │
│ ❱ 1661 │   │   [req.split(" ")[0] for req in m.get_value("requirements/run", [])],               │
│   1662 │   │   [req.split(" ")[0] for req in m.get_value("requirements/build", [])],             │
│   1663 │   │   [req.split(" ")[0] for req in m.get_value("requirements/host", [])],              │
│   1664 │   │   host_prefix or m.config.host_prefix,                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'CondaBuildSpec' object has no attribute 'split'

Apparently boa passes on boa.core.conda_build_spec.CondaBuildSpec instances in this list, rather than str. Downgrading conda-build to 3.27.0 can serve as a temporary work-around.

@wolfv
Copy link
Member

wolfv commented Dec 5, 2023

is that fixed with an older conda-build release?

@victorlin
Copy link

is that fixed with an older conda-build release?

Yes, @dhvu mentioned that downgrading to 3.27.0 works. I was able to use this workaround successfully.

@victorlin
Copy link

Another workaround is to use boa version 0.15.1, which pins conda-build >=3.24,<3.26.

@h-vetinari
Copy link

Looking at the recent changes in conda_build/post.py, this seems to be due to conda/conda-build@decbcf9.

@Tobias-Fischer
Copy link
Contributor

I've just ran into this again.

IsabelParedes added a commit to IsabelParedes/emscripten-forge-recipes that referenced this issue Jan 24, 2024
IsabelParedes added a commit to IsabelParedes/emscripten-forge-recipes that referenced this issue Jan 29, 2024
DerThorsten pushed a commit to emscripten-forge/recipes that referenced this issue Jan 30, 2024
* Update checkout action

* Update micromamba setup

* Clean up

* Change env name

* Remove windows files for testing ci

* Set env to ci

* Update boa command

* Test build all

* Pin ruamel.yaml to v0.17

`safe_load()` has been removed in v0.18 which is used by boa/core/test.py

* Relax pin

* Set env name to ci

* Fix attribute error with CondaBuildSpec

Downgrade to use conda-build=3.27
mamba-org/boa#388

* Remove duplicates

* Set build all to run on schedule only

The workflow runs but some package builds fail, so it is
working as intended.
mbargull added a commit to mbargull/boa that referenced this issue Mar 16, 2024
mbargull added a commit to mbargull/boa that referenced this issue Mar 16, 2024
mbargull added a commit to mbargull/boa that referenced this issue Mar 16, 2024
luizirber pushed a commit to luizirber/recipes that referenced this issue Aug 1, 2024
* Update checkout action

* Update micromamba setup

* Clean up

* Change env name

* Remove windows files for testing ci

* Set env to ci

* Update boa command

* Test build all

* Pin ruamel.yaml to v0.17

`safe_load()` has been removed in v0.18 which is used by boa/core/test.py

* Relax pin

* Set env name to ci

* Fix attribute error with CondaBuildSpec

Downgrade to use conda-build=3.27
mamba-org/boa#388

* Remove duplicates

* Set build all to run on schedule only

The workflow runs but some package builds fail, so it is
working as intended.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants