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

feat: Add proper support for IBM i #2626

Merged
merged 2 commits into from
Sep 24, 2022
Merged

Conversation

kadler
Copy link
Contributor

@kadler kadler commented Mar 3, 2022

Checklist
  • npm install && npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

Python 3.9 on IBM i now properly returns "os400" for sys.platform
instead of claiming to be AIX as it did previously. While the IBM i PASE
environment is compatible with AIX, it is a subset and has numerous
differences which makes it beneficial to distinguish, however this means
that it now needs explicit support here.

@kadler
Copy link
Contributor Author

kadler commented Mar 3, 2022

Related gpy-next PR: nodejs/gyp-next#140

CC @ThePrez

Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

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

The gyp/ changes are a duplicate of nodejs/gyp-next#140. Ideally we'd merge in gyp-next and then update that here for those.

Otherwise the node-gyp parts LGTM.

gyp/pylib/gyp/common.py Show resolved Hide resolved
@@ -41,7 +41,7 @@ def ExecFlock(self, lockfile, *cmd_list):
# with EBADF, that's why we use this F_SETLK
# hack instead.
fd = os.open(lockfile, os.O_WRONLY | os.O_NOCTTY | os.O_CREAT, 0o666)
if sys.platform.startswith("aix"):
if sys.platform.startswith("aix") or sys.platform == "os400":
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if sys.platform.startswith("aix") or sys.platform == "os400":
if sys.platform.startswith(("aix", "os400")):

Comment on lines 12 to +15
if (process.platform === 'aix') {
platformMake = 'gmake'
} else if (process.platform === 'os400') {
platformMake = 'gmake'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (process.platform === 'aix') {
platformMake = 'gmake'
} else if (process.platform === 'os400') {
platformMake = 'gmake'
if (process.platform === 'aix' || process.platform === 'os400') {
platformMake = 'gmake'

@dmabupt
Copy link

dmabupt commented Mar 28, 2022

The gyp/ changes are a duplicate of nodejs/gyp-next#140. Ideally we'd merge in gyp-next and then update that here for those.

Otherwise the node-gyp parts LGTM.

Hello @richardlau and @kadler , The PR nodejs/gyp-next#140 has been merged. Can we merge this PR as well now?

@richardlau
Copy link
Member

It looks like nodejs/gyp-next#140 was released in gyp-next v0.11.0 so the next step would be to update gyp-next here (e.g. similar to one of the previous gyp-next updates, #2521).

@dmabupt
Copy link

dmabupt commented Apr 11, 2022

It looks like nodejs/gyp-next#140 was released in gyp-next v0.11.0 so the next step would be to update gyp-next here (e.g. similar to one of the previous gyp-next updates, #2521).

Hello @richardlau , I have submitted a PR #2642 based on the patch (https://github.com/nodejs/gyp-next/compare/v0.10.0...v0.11.0.patch). Would you review it?
And @kadler , maybe you need to remove the duplicated code changes in this PR to resolve the conflicts?

@kadler
Copy link
Contributor Author

kadler commented Apr 12, 2022

Sorry, I didn't realize that gyp-next was an upstream of this package. If that's the case, then I think this PR is probably not necessary, since the changes would be covered by the updates in gyp-next 0.11.0. We can close this in favor of #2642 then.

@richardlau
Copy link
Member

Sorry, I didn't realize that gyp-next was an upstream of this package. If that's the case, then I think this PR is probably not necessary, since the changes would be covered by the updates in gyp-next 0.11.0. We can close this in favor of #2642 then.

We'll still need to update the files outside of the gyp directory, which should be done in this PR.

@kadler
Copy link
Contributor Author

kadler commented Apr 13, 2022

Ah, ok. I'll rebase once #2642 lands then.

@dmabupt
Copy link

dmabupt commented Apr 18, 2022

Duplicated PR landed -- nodejs/node@b99bb57
So I closed feat(gyp): update gyp to v0.12.1

Python 3.9 on IBM i now properly returns "os400" for sys.platform
instead of claiming to be AIX as it did previously. While the IBM i PASE
environment is compatible with AIX, it is a subset and has numerous
differences which makes it beneficial to distinguish, however this means
that it now needs explicit support here.
@kadler
Copy link
Contributor Author

kadler commented Aug 18, 2022

I used update-gyp.py to update to gpy-next v0.13.0 and rebased my changes. This should obsolete #2642.

@dmabupt
Copy link

dmabupt commented Sep 19, 2022

I used update-gyp.py to update to gpy-next v0.13.0 and rebased my changes. This should obsolete #2642.

Closed issue feat(gyp): update gyp to v0.12.1

@kadler
Copy link
Contributor Author

kadler commented Sep 22, 2022

Looks like this has been approved, can it get merged?

@mhdawson
Copy link
Member

@richardlau are you able to land?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants