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

serialize pyrequires path, needed for buildinfo #14886

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion conans/client/graph/python_requires.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def __init__(self, module, conanfile, ref, path, recipe_status, remote):

def serialize(self):
return {"remote": self.remote.name if self.remote is not None else None,
"recipe": self.recipe}
"recipe": self.recipe,
"path": self.path}


class PyRequires(object):
Expand Down
8 changes: 7 additions & 1 deletion conans/test/integration/command/info/info_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os
import textwrap

from conan.cli.exit_codes import ERROR_GENERAL
Expand Down Expand Up @@ -199,7 +200,12 @@ class pkg(ConanFile):

client.run("graph info . --format=json")
info = json.loads(client.stdout)
assert "tool/0.1#4d670581ccb765839f2239cc8dff8fbd" in info["graph"]["nodes"]["0"]["python_requires"]
pyrequires = info["graph"]["nodes"]["0"]["python_requires"]
tool = pyrequires["tool/0.1#4d670581ccb765839f2239cc8dff8fbd"]
# lets make sure the path exists
assert tool["recipe"] == "Cache"
assert tool["remote"] is None
assert os.path.exists(tool["path"])

def test_build_id_info(self):
client = TestClient()
Expand Down