-
Notifications
You must be signed in to change notification settings - Fork 989
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
Feature/fix python requires imports #3876
Feature/fix python requires imports #3876
Conversation
Tag tests related to SVN (and a couple using Git)
conans/client/loader.py
Outdated
@@ -228,7 +228,7 @@ def _parse_file(conan_file_path): | |||
try: | |||
module_id = str(uuid.uuid1()) | |||
current_dir = os.path.dirname(conan_file_path) | |||
sys.path.append(current_dir) | |||
sys.path.insert(0, current_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't ever happen, but... I would put these three lines outside the try
block to be sure that the finally
block removes the inserted path (otherwise, if one of these lines raises, we are removing something else from the path list).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is ok but answer to the @jgsogo comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…equires_imports Feature/fix python requires imports
Changelog: BugFix: Fix conflicting multiple local imports for python_requires
Fix #3874