[
https://issues.apache.org/jira/browse/ARROW-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16347446#comment-16347446
]
ASF GitHub Bot commented on ARROW-2070:
---------------------------------------
pitrou commented on a change in pull request #1540: ARROW-2070: [Python] Fix
chdir logic in setup.py
URL: https://github.com/apache/arrow/pull/1540#discussion_r165161090
##########
File path: python/setup.py
##########
@@ -129,162 +141,160 @@ def _run_cmake(self):
# The staging directory for the module being built
build_temp = pjoin(os.getcwd(), self.build_temp)
build_lib = os.path.join(os.getcwd(), self.build_lib)
-
- # Change to the build directory
saved_cwd = os.getcwd()
+
if not os.path.isdir(self.build_temp):
self.mkpath(self.build_temp)
- os.chdir(self.build_temp)
Review comment:
Note these lines are merely reindented under a `with
changed_dir(self.build_temp)` block.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [Python] chdir logic in setup.py buggy
> --------------------------------------
>
> Key: ARROW-2070
> URL: https://issues.apache.org/jira/browse/ARROW-2070
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.8.0
> Reporter: Antoine Pitrou
> Assignee: Antoine Pitrou
> Priority: Minor
> Labels: pull-request-available
>
> In some conditions, {{setup.py}} may change the current directory and omit
> restoring the previous one, which can fail some operations.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)