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

fixing multiple python requires collission #3628

Merged
merged 1 commit into from Sep 27, 2018

Conversation

Projects
None yet
2 participants
@memsharded
Copy link
Contributor

commented Sep 27, 2018

  • Refer to the issue that supports this Pull Request.
    Could close #3619

Changelog: BugFix: Fixes python_requires overwritten when using more than one of them in a recipe

@ghost ghost assigned memsharded Sep 27, 2018

@ghost ghost added the stage: review label Sep 27, 2018

@memsharded memsharded added this to the 1.8 milestone Sep 27, 2018

@memsharded memsharded assigned memsharded and danimtb and unassigned memsharded Sep 27, 2018

@@ -37,7 +37,7 @@ def __call__(self, require):
self._references.append(reference)
try:
sys.path.append(os.path.dirname(path))
module = imp.load_source("python_require", path)
module = imp.load_source(str(r), path)

This comment has been minimized.

Copy link
@memsharded

memsharded Sep 27, 2018

Author Contributor

Maybe this gives some idea to simplify the plugins code, @danimtb. And maybe even the ConanFileLoader code, we need to review it. The random number to load conanfiles, is because all of them are named "conanfile.py", and a unique name is necessary, it might be possible that the ConanFileLoader could be somehow also affected by this behavior of loading modules with the same name.

This comment has been minimized.

Copy link
@danimtb

danimtb Sep 27, 2018

Member

Plugins load function does not used imp.load_source() but __import__(), however it is using some additional code to set unique module names that maybe it is not needed. I will open an engineering issue to look into this

@@ -37,7 +37,7 @@ def __call__(self, require):
self._references.append(reference)
try:
sys.path.append(os.path.dirname(path))
module = imp.load_source("python_require", path)
module = imp.load_source(str(r), path)

This comment has been minimized.

Copy link
@danimtb

danimtb Sep 27, 2018

Member

Plugins load function does not used imp.load_source() but __import__(), however it is using some additional code to set unique module names that maybe it is not needed. I will open an engineering issue to look into this

@danimtb danimtb merged commit d3b9015 into conan-io:develop Sep 27, 2018

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@ghost ghost removed the stage: review label Sep 27, 2018

@memsharded memsharded deleted the memsharded:feature/fix_dup_python_require branch Oct 7, 2018

grisumbras pushed a commit to grisumbras/conan that referenced this pull request Dec 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.