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

[python] migrate to pathlib in setup.py and use absolute() on paths first #4444

Merged
merged 3 commits into from
Jul 10, 2021

Conversation

StrikerRUS
Copy link
Collaborator

Contributes to #4416.

@StrikerRUS StrikerRUS force-pushed the pathlib3 branch 2 times, most recently from 770688c to a4b6b87 Compare July 7, 2021 17:51
rmtree(build_dir, ignore_errors=True)
build_dir.mkdir(parents=True)
original_dir = Path.cwd()
chdir(build_dir)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we have to chdir due to old CMake doesn't support specifying building directory (I don't want to use undocumented flag):
https://stackoverflow.com/a/24435795
https://stackoverflow.com/a/20611964

cmake [<options>] -S <path-to-source> -B <path-to-build>
https://cmake.org/cmake/help/latest/manual/cmake.1.html#synopsis

and no such possibility in CMake < 3.13
https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#synopsis

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for calling this out, makes sense!

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks!

@StrikerRUS StrikerRUS merged commit 96583ab into master Jul 10, 2021
@StrikerRUS StrikerRUS deleted the pathlib3 branch July 10, 2021 13:19
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants