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

Use a single pip install command on startup #111

Open
mdellweg opened this issue Apr 17, 2023 · 3 comments
Open

Use a single pip install command on startup #111

mdellweg opened this issue Apr 17, 2023 · 3 comments

Comments

@mdellweg
Copy link
Member

oci_env calls pip in multiple places multiple times. Pip is not meant to be used that way wand will happily create conflicts with already installed packages or update otherwise pinned dependencies.

Consolidating all calls to pip install into a single one can be considered a hard blocker for using it in any kind of CI.

@lubosmj
Copy link
Member

lubosmj commented Apr 17, 2023

[lmjachky@localhost oci_env]$ oci-env shell
vTraceback (most recent call last):
  File "/usr/local/bin/pulp", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/pulp_cli/__init__.py", line 31, in main
    load_plugins()
  File "/usr/local/lib/python3.8/site-packages/pulp_cli/__init__.py", line 17, in load_plugins
    discovered_plugins: Dict[str, ModuleType] = {
  File "/usr/local/lib/python3.8/site-packages/pulp_cli/__init__.py", line 18, in <dictcomp>
    entry_point.name: entry_point.load()
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2516, in load
    self.require(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2539, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 827, in resolve
    dist = self._resolve_dist(
  File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 873, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pulp-glue 0.18.0 (/usr/local/lib/python3.8/site-packages), Requirement.parse('pulp-glue==0.19.0'))

@decko
Copy link
Member

decko commented Apr 18, 2023

oci_env only calls pip once with the dev_requirements.txt over the pulp-ci-centos image.

What if we bring up the discussion about subtituting pip with something that have a better dependency resolution like poetry. Just a pyproject.toml file and we could have both production and development dependencies, as well as other project settings.

@mdellweg
Copy link
Member Author

What if we bring up the discussion about subtituting pip with something that have a better dependency resolution like poetry

The Packaging Team should be in that type of a discussion. They depend on ancient versions of setuptools sometimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants