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

ImportError when trying to import from previously vendored auxlib #4333

Closed
jezdez opened this issue Nov 23, 2021 · 1 comment · Fixed by #4335
Closed

ImportError when trying to import from previously vendored auxlib #4333

jezdez opened this issue Nov 23, 2021 · 1 comment · Fixed by #4335
Assignees
Labels
locked [bot] locked due to inactivity

Comments

@jezdez
Copy link
Member

jezdez commented Nov 23, 2021

Actual Behavior

conda-build imports from a "vendored" version of the auxlib in conda, which was recently inlined since it diverged significantly from the upstream project. conda/conda#11025

Expected Behavior

There shouldn't be an ImportError when trying to import from auxlib.

Code in question:

from conda._vendor.auxlib.packaging import _get_version_from_git_tag

ovidner added a commit to ovidner/openmdao-bridge-matlab that referenced this issue Nov 23, 2021
Revert when conda/conda-build#4333 is resolved
and released!
@esc
Copy link

esc commented Nov 23, 2021

In case it helps, here is an example stacktrace:

Traceback (most recent call last):
File "/opt/conda/bin/conda-build", line 11, in <module>
sys.exit(main())
File "/opt/conda/lib/python3.8/site-packages/conda_build/cli/main_build.py", line 474, in main
execute(sys.argv[1:])
File "/opt/conda/lib/python3.8/site-packages/conda_build/cli/main_build.py", line 463, in execute
outputs = api.build(args.recipe, post=args.post, test_run_post=args.test_run_post,
File "/opt/conda/lib/python3.8/site-packages/conda_build/api.py", line 186, in build
return build_tree(
File "/opt/conda/lib/python3.8/site-packages/conda_build/build.py", line 2987, in build_tree
metadata_tuples = render_recipe(recipe, config=cfg, variants=variants,
File "/opt/conda/lib/python3.8/site-packages/conda_build/render.py", line 832, in render_recipe
rendered_metadata = distribute_variants(m, variants,
File "/opt/conda/lib/python3.8/site-packages/conda_build/render.py", line 728, in distribute_variants
if mv.needs_source_for_render and mv.variant_in_source:
File "/opt/conda/lib/python3.8/site-packages/conda_build/metadata.py", line 1823, in variant_in_source
self.parse_again(permit_undefined_jinja=True, allow_no_other_outputs=True,
File "/opt/conda/lib/python3.8/site-packages/conda_build/metadata.py", line 961, in parse_again
self.meta = parse(self._get_contents(permit_undefined_jinja,
File "/opt/conda/lib/python3.8/site-packages/conda_build/metadata.py", line 1526, in _get_contents
env.globals.update(environ.get_dict(m=self, skip_build_id=skip_build_id))
File "/opt/conda/lib/python3.8/site-packages/conda_build/environ.py", line 282, in get_dict
d.update(meta_vars(m, skip_build_id=skip_build_id))
File "/opt/conda/lib/python3.8/site-packages/conda_build/environ.py", line 486, in meta_vars
d.update(get_git_info(git_exe, git_dir, meta.config.debug))
File "/opt/conda/lib/python3.8/site-packages/conda_build/environ.py", line 193, in get_git_info
from conda._vendor.auxlib.packaging import _get_version_from_git_tag
ModuleNotFoundError: No module named 'conda._vendor.auxlib'

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

Successfully merging a pull request may close this issue.

5 participants