-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[build-script] Use the build-script-impl from the swift repo that invoked build-script. #8439
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
[build-script] Use the build-script-impl from the swift repo that invoked build-script. #8439
Conversation
@swift-ci Please python lint |
@swift-ci Please smoke test and merge |
Looks like some stripped off the executable bit from python lint. I ran it locally and everything passed. |
5517bbf
to
5f99cbf
Compare
…oked build-script. In the past if one wanted to be able to develop using multiple swift repos, one was often stymied by build-script always using build-script-impl from the swift directory. This includes the case where one invokes the build-script from a hypothetical directory called swift-2.
5f99cbf
to
e3858d3
Compare
@swift-ci python lint |
I fixed python lint in this commit. |
@swift-ci python lint |
@swift-ci smoke test and merge |
1 similar comment
@swift-ci smoke test and merge |
I'm slightly confused with this. This isn't the repo name, but actually the repo path for swift: ...
def _get_default_swift_repo_name():
result = ""
# Are we in a Swift checkout? Start from this file and check its parent
# directories.
#
# $SWIFT_SOURCE_ROOT/$SWIFT_REPO_NAME/utils/SwiftBuildSupport.py
(swift_path, parent_dirname) = os.path.split(os.path.dirname(__file__))
if parent_dirname != "utils":
return result
if not os.path.exists(os.path.join(swift_path, 'CMakeLists.txt')):
return result
return swift_path
# Set SWIFT_REPO_NAME in your environment to control the name of the swift
# directory name that is used.
SWIFT_REPO_NAME = os.environ.get(
"SWIFT_REPO_NAME", _get_default_swift_repo_name())
print(SWIFT_REPO_NAME)
...
This looks like the actual folder path, rather than the actual name of the directory (I'd expect this to be |
This doesn't actually matter, though: print(os.path.join('C:/Users', 'C:/Users/hugh')) This just prints |
[build-script] Use the build-script-impl from the swift repo that invoked build-script.
In the past if one wanted to be able to develop using multiple swift repos, one
was often stymied by build-script always using build-script-impl from the swift
directory. This includes the case where one invokes the build-script from a
hypothetical directory called swift-2.
This is just a productivity enhancement.