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

Fixed ninja binary location logic to use ninja.BIN_DIR. #4655

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

bdbaddog
Copy link
Contributor

Previous logic no longer works starting with python ninja package version 1.11.1.2

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt and RELEASE.txt (and read the README.rst).
  • I have updated the appropriate documentation

…c no longer works starting with python ninja package version 1.11.1.2
@bdbaddog bdbaddog requested a review from mwichmann November 25, 2024 04:48
@@ -1079,7 +1087,16 @@ def java_get_class_files(self, dir):
result.append(os.path.join(dirpath, fname))
return sorted(result)

def Qt_dummy_installation(self, dir: str='qt') -> None:
def ninja_binary(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious if this a method for efficiency reasons, or if it would be better as just a variable at a top level like is done with the path to Python?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.
I'll change to that and update the branch.

"scons: done reading SConscript files.\n" + \
f"scons: {cap}ing targets ...\n" + \
build_str + \
term
Copy link
Collaborator

Choose a reason for hiding this comment

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

A lot of this file is style stuff... I have a complete "black" reformat of the framework for when you feel enthused... actually "reviewing" it would be a bear though, so here it still sits. That line got turned into this, for example:

        return (                                                   
            "scons: Reading SConscript files ...\n"
            + read_str
            + "scons: done reading SConscript files.\n"
            + f"scons: {cap}ing targets ...\n"
            + build_str
            + term
        )

CHANGES.txt Outdated
- Update ninja tool to use ninja.BIN_DIR to find pypi packaged ninja binary.
python ninja package version 1.11.1.2 changed the location and previous
logic no longer worked.
- Added ninja_binary() method to TestSCons to centralize logic to find ninja binary
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks okay to me (although see the question on the added method itself).

…tool loading logic. This fixes changes in this PR breaking JavaCommonTests because pypi's ninja module and SCons.Tool.ninja had the same name which python couldn't differentiate
@bdbaddog bdbaddog merged commit f1723d8 into SCons:master Nov 26, 2024
@bdbaddog bdbaddog deleted the fix_new_ninja_package branch November 26, 2024 18:12
@mwichmann mwichmann added Ninja testsuite Things that only affect the SCons testing. Do not use just because a PR has tests. labels Nov 26, 2024
@mwichmann mwichmann added this to the NextRelease milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ninja testsuite Things that only affect the SCons testing. Do not use just because a PR has tests.
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

2 participants