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

CEP-17 python_site_packages_path parameter not included in PackageRecord of solution #560

Open
2 tasks done
jjhelmus opened this issue Nov 5, 2024 · 1 comment
Open
2 tasks done
Labels
type::bug describes erroneous operation, use severity::* to classify the type

Comments

@jjhelmus
Copy link
Contributor

jjhelmus commented Nov 5, 2024

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

When creating an environment which includes a python package that includes the optional CEP-17 python_site_packages_path parameter, this parameter is not included in the PackageRecord of the solution determined by conda-libmamba-solver. The results in conda being unable to use this parameter to correctly place noarch: python package contents, see conda/conda#14256.

A small reproducer is:

from conda.base.context import context
from conda.models.match_spec import MatchSpec

context.__init__()
solver_backend = context.plugin_manager.get_cached_solver_backend()
solver = solver_backend(
    prefix="/fake/fake/fake",
    channels = ("jjhelmus/label/sp_path", ),
    subdirs = ("linux-64", "noarch"),
    specs_to_add=(MatchSpec("python=3.99.90"), ),
    repodata_fn="repodata.json",
    command="create"
)
solution = solver.solve_final_state()
python_record = solution[0]
print(f"version: {python_record.version}")
print(f"path: {python_record.python_site_packages_path}")

With CONDA_SOLVER=classic this returns:

version: 3.99.90
path: sample_path/from_the_file/index_json

vs CONDA_SOLVER=libmamba

version: 3.99.90
path: None

Conda Info

Local dev install of conda+conda-libmamba-solver:

❯ conda info

     active environment : base
    active env location : /Users/jhelmus/workspace/conda-libmamba-solver/conda-libmamba-solver/env
            shell level : 2
       user config file : /Users/jhelmus/.condarc
 populated config files : /Users/jhelmus/.condarc
          conda version : 24.9.3.dev34
    conda-build version : 24.9.0
         python version : 3.12.7.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=24.9.3.dev34=0
                          __osx=14.6.1=0
                          __unix=0=0
       base environment : /Users/jhelmus/workspace/conda-libmamba-solver/conda-libmamba-solver/env  (writable)
      conda av data dir : /Users/jhelmus/workspace/conda-libmamba-solver/conda-libmamba-solver/env/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/jhelmus/workspace/conda-libmamba-solver/conda-libmamba-solver/env/pkgs
                          /Users/jhelmus/.conda/pkgs
       envs directories : /Users/jhelmus/workspace/conda-libmamba-solver/conda-libmamba-solver/env/envs
                          /Users/jhelmus/.conda/envs
               platform : osx-arm64
             user-agent : conda/24.9.3.dev34 requests/2.32.3 CPython/3.12.7 Darwin/23.6.0 OSX/14.6.1 solver/libmamba conda-libmamba-solver/24.7.1.dev20+g8a9cf41 libmambapy/1.5.10
                UID:GID : 502:20
             netrc file : None
           offline mode : False

Conda Config

==> /Users/jhelmus/.condarc <==
add_pip_as_python_dependency: False
changeps1: False
ssl_verify: True
channels:
  - defaults
report_errors: False

==> envvars <==
allow_softlinks: False

Conda list

NA

Additional Context

No response

@jjhelmus jjhelmus added the type::bug describes erroneous operation, use severity::* to classify the type label Nov 5, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Nov 5, 2024
@jjhelmus
Copy link
Contributor Author

jjhelmus commented Nov 6, 2024

Fairly certain support for this field needs to be added to mamba first. mamba-org/mamba#3558 looks to be the ticket for this work in mamba.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant