conda / conda-build

Commands and tools for building conda packages
https://docs.conda.io/projects/conda-build/
Other
383 stars 423 forks source link

Subpackages don't respect `run_exports` in `host` dependencies #3478

Open kkraus14 opened 5 years ago

kkraus14 commented 5 years ago

Actual Behavior

In recipes with subpackages, outputs which specify a host dependency with a run_export don't have that run_export respected as a runtime dependency. For example:

https://github.com/conda-forge/apr-feedstock/blob/master/recipe/meta.yaml#L105 https://anaconda.org/conda-forge/libapriconv/files

libapriconv 1.2.2 h14c3975_0
----------------------------
file name   : libapriconv-1.2.2-h14c3975_0.tar.bz2
name        : libapriconv
version     : 1.2.2
build       : h14c3975_0
build number: 0
size        : 1.2 MB
license     : Apache-2.0
subdir      : linux-64
url         : https://conda.anaconda.org/conda-forge/linux-64/libapriconv-1.2.2-h14c3975_0.tar.bz2
md5         : e957c9320bac820c4e30436b9ea186e2
timestamp   : 2019-02-26 06:44:49 UTC
dependencies: 
  - libgcc-ng >=7.3.0

Expected Behavior

In the above example, I'd expect a runtime dependency for libapriconv of libapr >=1.6.5,<2.0.0a0

Steps to Reproduce

Create a recipe with subpackage(s) that specify host dependencies with a run_export.

Output of conda info
     active environment : cudf_dev
    active env location : /home/nfs/kkraus/anaconda3/envs/cudf_dev
            shell level : 1
       user config file : /home/nfs/kkraus/.condarc
 populated config files : /home/nfs/kkraus/.condarc
          conda version : 4.6.11
    conda-build version : 3.17.8
         python version : 3.7.1.final.0
       base environment : /home/nfs/kkraus/anaconda3  (writable)
           channel URLs : https://conda.anaconda.org/rapidsai/label/cuda10.0/linux-64
                          https://conda.anaconda.org/rapidsai/label/cuda10.0/noarch
                          https://conda.anaconda.org/nvidia/label/cuda10.0/linux-64
                          https://conda.anaconda.org/nvidia/label/cuda10.0/noarch
                          https://conda.anaconda.org/rapidsai-nightly/label/cuda10.0/linux-64
                          https://conda.anaconda.org/rapidsai-nightly/label/cuda10.0/noarch
                          https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/nfs/kkraus/anaconda3/pkgs
                          /home/nfs/kkraus/.conda/pkgs
       envs directories : /home/nfs/kkraus/anaconda3/envs
                          /home/nfs/kkraus/.conda/envs
               platform : linux-64
             user-agent : conda/4.6.11 requests/2.21.0 CPython/3.7.1 Linux/4.4.0-134-generic ubuntu/16.04.6 glibc/2.23
                UID:GID : 10006:10000
             netrc file : None
           offline mode : False

cc @jakirkham

msarahan commented 5 years ago

Yeah, you can't rely on run_exports in subpackages. run_exports is implemented in a way that assumes the other package is external. This would be a nice feature to add, but this issue is expected behavior right now. You need to manually handle any dependency that you need to be inherited.

kkraus14 commented 5 years ago

Yeah, you can't rely on run_exports in subpackages. run_exports is implemented in a way that assumes the other package is external. This would be a nice feature to add, but this issue is expected behavior right now. You need to manually handle any dependency that you need to be inherited.

Thanks @msarahan. Should I open a new issue for an RFE or does this suffice?

github-actions[bot] commented 1 year ago

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

jakirkham commented 1 year ago

Please keep this open