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

gyp: pull Python 3 changes from node/node-gyp #28573

Closed
wants to merge 1 commit into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Jul 6, 2019

#28563 is too complicated for easy review. It touches 32 files some of which contain complex changes. This PR is a subset of #28563 which brings across 16 files (the easy half) that only contain Python 3 compatibility modifications. Once this PR is merged, we can rebase #28563 and focus our attention on the complex half.

The commands used to create this PR are below...

Order of execution: This PR (#28573), then #28563, then #28537, then #25878

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
cd node-gyp
git checkout master
git pull --rebase upstream master
git push origin master

cd ../node
git checkout master
git pull --rebase upstream master
git push origin master

git checkout -b gyp-pull-python3-changes
cd ..
SRC_DIR="node-gyp/gyp/"
DST_DIR="node/tools/gyp/"
ls ${SRC_DIR}
ls ${DST_DIR}

cp -r ${SRC_DIR}PRESUBMIT.py ${DST_DIR}
cp -r ${SRC_DIR}tools        ${DST_DIR}
cp -r ${SRC_DIR}pylib/gyp/MSVSNew.py      ${DST_DIR}pylib/gyp/
cp -r ${SRC_DIR}pylib/gyp/MSVSUserFile.py ${DST_DIR}pylib/gyp/
cp -r ${SRC_DIR}pylib/gyp/__init__.py     ${DST_DIR}pylib/gyp/
cp -r ${SRC_DIR}pylib/gyp/flock_tool.py   ${DST_DIR}pylib/gyp/
cp -r ${SRC_DIR}pylib/gyp/generator/analyzer.py              ${DST_DIR}pylib/gyp/generator/
cp -r ${SRC_DIR}pylib/gyp/generator/dump_dependency_json.py  ${DST_DIR}pylib/gyp/generator/
cp -r ${SRC_DIR}pylib/gyp/generator/eclipse.py               ${DST_DIR}pylib/gyp/generator/
cp -r ${SRC_DIR}pylib/gyp/generator/gypd.py                  ${DST_DIR}pylib/gyp/generator/
cp -r ${SRC_DIR}pylib/gyp/input_test.py   ${DST_DIR}pylib/gyp/
cp -r ${SRC_DIR}pylib/gyp/ordered_dict.py ${DST_DIR}pylib/gyp/
cp -r ${SRC_DIR}pylib/gyp/simple_copy.py  ${DST_DIR}pylib/gyp/

cd node
code tools/gyp/tools/pretty_vcproj.py  # fix print(("Usage:")) --> print("Usage:")
git commit -am"gyp: pull Python 3 changes from node/node-gyp"
git push --set-upstream origin gyp-pull-python3-changes
echo "Done."

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory. labels Jul 6, 2019
@cclauss cclauss added gyp Issues and PRs related to the GYP tool and .gyp build files python PRs and issues that require attention from people who are familiar with Python. labels Jul 6, 2019
@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Jul 6, 2019

@nodejs/python @nodejs/gyp

@cclauss
Copy link
Contributor Author

cclauss commented Jul 6, 2019

@MattIPv4 You review of these changes please.

@cclauss cclauss requested a review from thefourtheye July 7, 2019 06:33
@MattIPv4
Copy link
Member

MattIPv4 commented Jul 7, 2019

@cclauss What is the aim with this? Is support for 2.7 intended still, or is this a complete move to 3.x?

@cclauss
Copy link
Contributor Author

cclauss commented Jul 7, 2019

Both Python and legacy Python must be supported.

@MattIPv4
Copy link
Member

MattIPv4 commented Jul 7, 2019

@cclauss Is legacy Python simply regarded as 2.7 now and not older versions that were supported before?

@cclauss
Copy link
Contributor Author

cclauss commented Jul 7, 2019

Yes. See BUILDING.md.

tools/gyp/PRESUBMIT.py Show resolved Hide resolved
tools/gyp/pylib/gyp/__init__.py Show resolved Hide resolved
Copy link
Member

@MattIPv4 MattIPv4 left a comment

Choose a reason for hiding this comment

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

Lgtm.

Copy link
Contributor

@sam-github sam-github left a comment

Choose a reason for hiding this comment

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

RSLGTM

Since this drops support Python 2.6 and below I labelled it dont-land 10.x and 8.x, which document support for 2.6 in their BUILDING.md. Someone can correct that if I misunderstand.

AFAICT, there is a bug in core-validate-commit, see nodejs/core-validate-commit#65

You could use tools: as a sub-system to make Travis happy, it can be patched if necessary when this is landed.

@sam-github
Copy link
Contributor

@nodejs/gyp Needs one more approval to land (or will have to wait 114 more hours...).

@cclauss FYI, your github profile and your commit lack identifying information. Its not absolutely required, but it is helpful to be able to attribute commits to specific humans.

----------------------------------- PR info ------------------------------------
Title      gyp: pull Python 3 changes from node/node-gyp (#28573)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     cclauss:gyp-pull-python3-changes -> nodejs:master
Labels     build, dont-land-on-v10.x, dont-land-on-v8.x, gyp, python, tools
Committers 1
 - cclauss <[email protected]>

@cclauss
Copy link
Contributor Author

cclauss commented Jul 10, 2019

How do we make progress on this? Are there any Pythonistas in the project that we should add as reviewers? @nodejs/python

@sam-github
Copy link
Contributor

@bnoordhuis You may be the sole member of https://github.com/orgs/nodejs/teams/gyp that is still active on the project, PTAL

brace_diff = 0
if not COMMENT_RE.match(line):
if COMMENT_RE.match(line):
print(line)
Copy link
Member

Choose a reason for hiding this comment

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

Does this not change the behavior? Before, it used to strip '\r\n\t ' from the line?

Copy link
Member

Choose a reason for hiding this comment

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

It looks like this is still doing that at 126 - This just now prints the line if it matches the regex, otherwise strips - Unlike before where it stripped it if failed the regex immediately.

pull bot pushed a commit to SimenB/node that referenced this pull request Jul 11, 2019
PR-URL: nodejs#28573
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@sam-github
Copy link
Contributor

Landed in 5ebaf70

@sam-github sam-github closed this Jul 11, 2019
@cclauss cclauss deleted the gyp-pull-python3-changes branch July 11, 2019 16:37
targos pushed a commit that referenced this pull request Jul 20, 2019
PR-URL: #28573
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
This was referenced Jul 23, 2019
BaochengSu pushed a commit to BaochengSu/node that referenced this pull request Oct 20, 2020
PR-URL: nodejs#28573
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
(cherry picked from commit 5ebaf70)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. gyp Issues and PRs related to the GYP tool and .gyp build files python PRs and issues that require attention from people who are familiar with Python. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants