Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies in run requirements are not checked properly during build #1880

Closed
constantinpape opened this issue Mar 27, 2017 · 5 comments
Closed
Labels
locked [bot] locked due to inactivity

Comments

@constantinpape
Copy link

constantinpape commented Mar 27, 2017

Bulding a conda package with invalid dependencies in the run requirement does not produce an error (during build). However, trying to install the package fails, because the dependencies cannot be resolved:

conda install -c cpape conda_test

fails with:

PackageNotFoundError: Package not found: Conda could not find '

(By the way this cryptic error message does not make this easier to debug.)
Note, that I have a test that tries to import the package in the meta.yaml, which does not fail during the build.
I have the most recent conda (4.3.14) and conda-build (2.1.8) installed.
See https://github.com/constantinpape/conda_tests for a minimal example.

@msarahan
Copy link
Contributor

msarahan commented Apr 3, 2017

Your recipe has quite a few issues that I recommend changing. See https://gist.github.com/msarahan/f3c9c0fcd12e0149557bfd1d1d4c6046

Basically:

  1. Never pin python directly. Define skip: True for the python versions you don't want.
  2. you have an extra s - the test section (not tests section). That means your tests are not getting picked up at all. Not nice that it fails silently here, but we've opted for the flexibility of letting users put anything into their recipes, which unfortunately makes typos very hard to catch.
  3. I didn't change your build string line, but it's almost always best to avoid setting this yourself. In your case, by setting it to py_, your package looks like a noarch package, which really confused me for a while. Letting conda set this will give you py27_{{ PKG_BUILDNUM }}, anyway.

Here's what I get on OSX, conda-build 2.1.8, for the adapted recipe:

updating: conda_test-1.0-py_1.tar.bz2
updating index in: /Users/msarahan/miniconda3/conda-bld
TEST START: /Users/msarahan/miniconda3/conda-bld/osx-64/conda_test-1.0-py_1.tar.bz2
Deleting work directory, /Users/msarahan/miniconda3/conda-bld/conda_test_1491250767711/work
updating index in: /Users/msarahan/miniconda3/conda-bld/osx-64
updating index in: /Users/msarahan/miniconda3/conda-bld/noarch
Can't build /Users/msarahan/code/conda_tests/build due to unsatisfiable dependencies:
Packages/dependencies missing in current osx-64 channels:
  - conda_test 1.0 py_1 -> numpy 1.12
  - numpy 1.12

@constantinpape
Copy link
Author

Thanks for looking into this.
I have changed the build script according to your suggestions (see updated repo).
However, this has not fixed the issue.
The build passes without throwing an error, I can upload the packages, but installing it fails.

I have tried on Ubuntu 14.04 and 16.04.

@msarahan
Copy link
Contributor

msarahan commented Apr 4, 2017

If it's uploading, then you still have recipe problems. The tests (if they run at all) install your package, which should trigger this unsatisfiability error. Please double-check your recipe, especially your test section.

Otherwise, if conda-build is working well enough to get a package uploaded, then it falls on conda for the failure to install your packages (or rather, to tell you why it can't in a meaningful way). If this is the case, please let me know and I'll move this issue to the conda tracker.

@msarahan
Copy link
Contributor

Closing due to inactivity. @constantinpape feel free to reopen if you want to revisit this.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants