Skip to content

build: add library_files to gyp variables - #39293

Closed
himself65 wants to merge 1 commit into
nodejs:masterfrom
himself65:20210707-support-py3
Closed

himself65 wants to merge 1 commit into
nodejs:masterfrom
himself65:20210707-support-py3

Conversation

@himself65

@himself65 himself65 commented Jul 7, 2021 •

Copy link
Copy Markdown
Member

GYP uses the system path when parsing node.gyp; however, if system python is different from our gyp runtime python, like '2.7', gyp would crash.

➜  node git:(master) ./configure && /usr/bin/python3 tools/gyp_node.py -f make 
Node.js configure: Found Python 3.9.6...
INFO: configure completed successfully
Traceback (most recent call last):
  File "tools/search_files.py", line 22, in <module>
    main()
  File "tools/search_files.py", line 19, in main
    print('\n'.join(utils.SearchFiles(options.directory, options.ext)))
  File "/Users/himself65/Code/Github/node/tools/utils.py", line 112, in SearchFiles
    list = glob.glob(dir+ '/**/*.' + ext, recursive=True)
TypeError: glob() got an unexpected keyword argument 'recursive'
gyp: Call to 'python tools/search_files.py --ext js lib' returned exit status 1 while in /Users/himself65/Code/Github/node/node.gyp.

Upstream: #39069

@github-actions github-actions Bot added build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. python PRs and issues that require attention from people who are familiar with Python. labels Jul 7, 2021
@himself65 himself65 added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 7, 2021
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 7, 2021
@nodejs-github-bot

This comment has been minimized.

@himself65

ghost commented Jul 7, 2021

Copy link
Copy Markdown
Member Author

🤔

@targos

This comment has been minimized.

@targos

This comment has been minimized.

@himself65

This comment has been minimized.

@targos

This comment has been minimized.

@himself65

This comment has been minimized.

@himself65

This comment has been minimized.

@himself65
himself65 marked this pull request as draft July 7, 2021 09:24
@targos

This comment has been minimized.

@himself65

This comment has been minimized.

@himself65

This comment has been minimized.

@himself65

ghost commented Jul 7, 2021

Copy link
Copy Markdown
Member Author

okay, I found why

@himself65 himself65 closed this Jul 7, 2021
@himself65 himself65 reopened this Jul 7, 2021
@himself65
himself65 marked this pull request as ready for review July 7, 2021 12:10
@himself65
himself65 force-pushed the 20210707-support-py3 branch 3 times, most recently from 85bb606 to 842c8a9 Compare July 7, 2021 12:20
@himself65
himself65 requested a review from joyeecheung July 7, 2021 12:23
@himself65

ghost commented Jul 7, 2021

Copy link
Copy Markdown
Member Author

I'm not good at editing the gyp config. so plz take a look /cc @joyeecheung

@himself65 himself65 changed the title build: remove incorrect argument recursive at glob.glob build: using pymod_do_main in node.gyp Jul 7, 2021
@himself65
himself65 requested a review from targos July 7, 2021 12:55
Comment thread tools/search_files.py Resolved
@himself65
himself65 force-pushed the 20210707-support-py3 branch from 2478c47 to 4b2344f Compare July 7, 2021 16:19
@himself65

ghost commented Jul 7, 2021

Copy link
Copy Markdown
Member Author

Related: #39069 (comment)

Comment thread node.gyp Resolved
@himself65 himself65 changed the title build: using pymod_do_main in node.gyp build: add library_files to gyp variables Jul 8, 2021
GYP uses the system path when parsing node.gyp;
However, if system python is different from our
gyp runtime python, like '2.7', gyp would crash.

Co-authored-by: Michaël Zasso <targos@protonmail.com>
@himself65
himself65 requested review from jasnell and targos July 8, 2021 08:03
@himself65
himself65 force-pushed the 20210707-support-py3 branch from ad8d3d4 to cf2fd0e Compare July 8, 2021 08:03
@nodejs-github-bot

ghost commented Jul 8, 2021

Copy link
Copy Markdown
Collaborator

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks

@nodejs-github-bot

ghost commented Jul 12, 2021

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

ghost commented Jul 13, 2021

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

ghost commented Jul 13, 2021

Copy link
Copy Markdown
Collaborator

@himself65

ghost commented Jul 14, 2021

Copy link
Copy Markdown
Member Author

Landed in cfb7c4f

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 Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. python PRs and issues that require attention from people who are familiar with Python.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants