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: allow build with system python 3 #16058

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
10 participants
@forivall
Contributor

forivall commented Oct 7, 2017

When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

build

@forivall

This comment has been minimized.

Show comment
Hide comment
@forivall

forivall Oct 7, 2017

Contributor

Waiting for CI to determine if changes are needed for windows.

Contributor

forivall commented Oct 7, 2017

Waiting for CI to determine if changes are needed for windows.

@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn
Member

gibfahn commented Oct 7, 2017

@gibfahn

gibfahn approved these changes Oct 7, 2017

@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn
Member

gibfahn commented Oct 7, 2017

@Trott Trott added the code-and-learn label Oct 7, 2017

Show outdated Hide outdated configure
Show outdated Hide outdated configure
Show outdated Hide outdated configure
Show outdated Hide outdated configure
build: allow build with system python 3
When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches
@forivall

This comment has been minimized.

Show comment
Hide comment
@forivall

forivall Oct 7, 2017

Contributor

Updated for reviews. Diff @ forivall@528a99d

Contributor

forivall commented Oct 7, 2017

Updated for reviews. Diff @ forivall@528a99d

@bengl

bengl approved these changes Oct 7, 2017

@forivall forivall referenced this pull request Oct 7, 2017

Closed

build: allow build with system python 3 #97

2 of 2 tasks complete
@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn

gibfahn Oct 8, 2017

Member

Landed in 2b5b423.

Thanks for fixing this @forivall , and congrats on becoming a Contributor 🎉 .

Member

gibfahn commented Oct 8, 2017

Landed in 2b5b423.

Thanks for fixing this @forivall , and congrats on becoming a Contributor 🎉 .

@gibfahn gibfahn closed this Oct 8, 2017

gibfahn added a commit that referenced this pull request Oct 8, 2017

build: allow build with system python 3
When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches

PR-URL: #16058
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

joshualim92 pushed a commit to joshualim92/node that referenced this pull request Oct 10, 2017

build: allow build with system python 3
When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches

PR-URL: nodejs#16058
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

MylesBorins added a commit that referenced this pull request Oct 11, 2017

build: allow build with system python 3
When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches

PR-URL: #16058
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

@MylesBorins MylesBorins referenced this pull request Oct 11, 2017

Merged

v8.7.0 proposal #15762

addaleax added a commit to addaleax/ayo that referenced this pull request Oct 12, 2017

build: allow build with system python 3
When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches

PR-URL: nodejs/node#16058
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@hefangshi

This comment has been minimized.

Show comment
Hide comment
@hefangshi

hefangshi Oct 12, 2017

Contributor

This change made Node.js build need install distutils packages which is a dependency change, python3 won't break old build environment but distutils dependency will, maybe we can implement a less dependent method to find default python binary?

Contributor

hefangshi commented Oct 12, 2017

This change made Node.js build need install distutils packages which is a dependency change, python3 won't break old build environment but distutils dependency will, maybe we can implement a less dependent method to find default python binary?

@bnoordhuis

This comment has been minimized.

Show comment
Hide comment
@bnoordhuis

bnoordhuis Oct 12, 2017

Member

@hefangshi distutils is part of python's stdlib. Are you thinking of setuptools?

Member

bnoordhuis commented Oct 12, 2017

@hefangshi distutils is part of python's stdlib. Are you thinking of setuptools?

@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn

gibfahn Oct 12, 2017

Member

Looks like distutils is included by default from Python 2.6 onwards, but maybe not in some distributions (looking at https://stackoverflow.com/questions/3810521/how-to-install-python-distutils).

@hefangshi what platform and version of Python are you on?

Also this commit doesn't add the distutils dependency, it was there before (from the diff 2b5b423):

image

Member

gibfahn commented Oct 12, 2017

Looks like distutils is included by default from Python 2.6 onwards, but maybe not in some distributions (looking at https://stackoverflow.com/questions/3810521/how-to-install-python-distutils).

@hefangshi what platform and version of Python are you on?

Also this commit doesn't add the distutils dependency, it was there before (from the diff 2b5b423):

image

@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn

gibfahn Oct 16, 2017

Member

+1 on landing on a future v6.x release, and it should land with #16241 (assuming that lands).

Member

gibfahn commented Oct 16, 2017

+1 on landing on a future v6.x release, and it should land with #16241 (assuming that lands).

@forivall

This comment has been minimized.

Show comment
Hide comment
@forivall

forivall Oct 16, 2017

Contributor

Yeah, i had assumed the distutils would be fine since it would be loaded if it was python 3 or <= 2.5. there's probably an alternative version of 'which' that doesn't depend on distutils, since that's the only thing it's used for.

Contributor

forivall commented Oct 16, 2017

Yeah, i had assumed the distutils would be fine since it would be loaded if it was python 3 or <= 2.5. there's probably an alternative version of 'which' that doesn't depend on distutils, since that's the only thing it's used for.

@MylesBorins

This comment has been minimized.

Show comment
Hide comment
@MylesBorins

MylesBorins Oct 17, 2017

Member

waiting for #16241 before landing this on v6.x. Please LMK if we don't need to wait

Member

MylesBorins commented Oct 17, 2017

waiting for #16241 before landing this on v6.x. Please LMK if we don't need to wait

MylesBorins added a commit that referenced this pull request Nov 14, 2017

build: allow build with system python 3
When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches

PR-URL: #16058
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

@MylesBorins MylesBorins referenced this pull request Nov 21, 2017

Merged

v6.12.1 proposal #17180

MylesBorins added a commit that referenced this pull request Nov 21, 2017

build: allow build with system python 3
When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches

PR-URL: #16058
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

MylesBorins added a commit that referenced this pull request Nov 28, 2017

build: allow build with system python 3
When the system python is python 3, configure now creates a directory
with a symlink called 'python' to python2, uses it when it calls
run_gyp, and puts it in config.mk so that it propagates to everything
that make launches

PR-URL: #16058
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

MylesBorins added a commit that referenced this pull request Nov 28, 2017

2017-12-05, Version 6.12.1 'Boron' (LTS)
Notable Changes:

* build:
  - fix npm install with --shared (Ben Noordhuis)
    #16438
* build:
  - building with python 3 is now supported (Emily Marigold Klassen)
    #16058
* src:
  - v8 options can be specified with either '\_' or '-' in NODE_OPTIONS
    (Sam Roberts) #14093

PR-URL: #17180

MylesBorins added a commit that referenced this pull request Dec 5, 2017

2017-12-05, Version 6.12.1 'Boron' (LTS)
Notable Changes:

* build:
  - fix npm install with --shared (Ben Noordhuis)
    #16438
* build:
  - building with python 3 is now supported (Emily Marigold Klassen)
    #16058
* src:
  - v8 options can be specified with either '\_' or '-' in NODE_OPTIONS
    (Sam Roberts) #14093

PR-URL: #17180

msoechting added a commit to hpicgs/node that referenced this pull request Feb 5, 2018

2017-12-05, Version 6.12.1 'Boron' (LTS)
Notable Changes:

* build:
  - fix npm install with --shared (Ben Noordhuis)
    nodejs#16438
* build:
  - building with python 3 is now supported (Emily Marigold Klassen)
    nodejs#16058
* src:
  - v8 options can be specified with either '\_' or '-' in NODE_OPTIONS
    (Sam Roberts) nodejs#14093

PR-URL: nodejs#17180

msoechting added a commit to hpicgs/node that referenced this pull request Feb 7, 2018

2017-12-05, Version 6.12.1 'Boron' (LTS)
Notable Changes:

* build:
  - fix npm install with --shared (Ben Noordhuis)
    nodejs#16438
* build:
  - building with python 3 is now supported (Emily Marigold Klassen)
    nodejs#16058
* src:
  - v8 options can be specified with either '\_' or '-' in NODE_OPTIONS
    (Sam Roberts) nodejs#14093

PR-URL: nodejs#17180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment