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

tools: install components optionally #5741

Closed

Conversation

thefourtheye
Copy link
Contributor

Pull Request check-list

  • Does make -j8 test (UNIX) or vcbuild test nosign (Windows) pass with
    this change (including linting)?
  • Is the commit message formatted according to CONTRIBUTING.md?

Affected core subsystem(s)

tools

Description of change

Refer: #5734

This introduces a command line option, ('-c' or '--components') to
install components optionally. The valid components are

  • node
  • npm
  • headers

All these components can be installed or uninstalled, like this

python tools/install.py -c node,headers install . /

python tools/install.py --components npm uninstall . /

"-c" is just the short form of "--components"


cc @rvagg @bnoordhuis

@thefourtheye thefourtheye added the tools Issues and PRs related to the tools directory. label Mar 16, 2016
@jasnell
Copy link
Member

jasnell commented Mar 16, 2016

Seems like a good change, LGTM

tools/install.py Outdated
global node_prefix, install_path, target_defaults, variables
components = set(['node', 'npm', 'headers'])
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be without "npm" since that's added later when you set "node_install_npm" in the config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rvagg Ah, you are correct. Currently also, when we install node and headers, we install npm only if 'node_install_npm' is set. Good catch. I'll fix it.

@rvagg
Copy link
Member

rvagg commented Mar 16, 2016

Solid work @thefourtheye, much better than if I'd been left to do this! I'll close #5734 in favour of this but the question of whether this is semver-major is still open as it removes the HEADERS_ONLY env var.

@jasnell
Copy link
Member

jasnell commented Mar 17, 2016

+1 to semver-major just to be on the safe side.

@rvagg rvagg added the semver-major PRs that contain breaking changes and should be released in the next major version. label Mar 17, 2016
@rvagg
Copy link
Member

rvagg commented Mar 17, 2016

k, made it so, it means the new installer won't land till v6 but that's probably good anyway. /cc @fhemberger

@thefourtheye I just have that one item above, aside from that this lgtm but I'll also test it against my installer PR to verify before you land it.

@thefourtheye
Copy link
Contributor Author

Thanks @rvagg :-) I used most of the code from your PR only :-) I removed npm from the default set of components, PTAL.

tools/install.py Outdated
for component in components:
funcs[component](action)


Copy link
Member

Choose a reason for hiding this comment

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

while I like extra newlines, I don't think we're doing that in this file, so this needs single newlines between function declarations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops sorry. Actually Python style guide recommends two line gaps between functions. As the indentation is important in Python, the two line gaps make it easier to read. I'll change it, so that it will be consistent throughout the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rvagg And its done now :-)

@thefourtheye
Copy link
Contributor Author

@bnoordhuis We use optparse now, to be consistent with other scripts and addressed your comments. PTAL.

tools/install.py Outdated
usage = 'usage: %prog [-c components] COMMAND DESTDIR PREFIX'
parser = optparse.OptionParser(usage)
parser.add_option('-c', '--components', dest='components',
help='Comma seperated list of components. Valid values '
Copy link
Member

Choose a reason for hiding this comment

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

Typo: separated

@bnoordhuis
Copy link
Member

LGTM with nit.

@thefourtheye thefourtheye force-pushed the install-seperate-components branch from dab2d5f to 16f5095 Compare March 20, 2016 07:12
@thefourtheye
Copy link
Contributor Author

Okay, addressed ben's comments, rebased and force pushed.

@bnoordhuis
Copy link
Member

If all you did was fix the nit, then rubber-stamp LGTM.

@jasnell
Copy link
Member

jasnell commented Mar 21, 2016

@rvagg ... have you had the opportunity to test this one yet?

@rvagg
Copy link
Member

rvagg commented Mar 22, 2016

no, and it's not an urgent change because it's only needed for the osx installer upgrade, I'll get to it but perhaps not this week

Refer: nodejs#5734

This introduces a command line option, ('-c' or '--components')  to
install components optionally. The valid components are

  * node
  * npm
  * headers

All these components can be installed or uninstalled, like this

    python tools/install.py -c node,headers install . /

    python tools/install.py --components npm uninstall . /

"-c" is just the short form of "--components".
@thefourtheye thefourtheye force-pushed the install-seperate-components branch from 16f5095 to eb0bb29 Compare April 20, 2016 05:55
@thefourtheye
Copy link
Contributor Author

Rebased!

@estliberitas estliberitas force-pushed the master branch 2 times, most recently from 7da4fd4 to c7066fb Compare April 26, 2016 05:23
@thefourtheye
Copy link
Contributor Author

@rvagg ping!

@thefourtheye
Copy link
Contributor Author

Bump

@jasnell
Copy link
Member

jasnell commented Feb 28, 2017

@thefourtheye @rvagg ... is this still something we should pursue?

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Mar 1, 2017
@thefourtheye
Copy link
Contributor Author

I would have @rvagg take a call.

@fhinkel
Copy link
Member

fhinkel commented Mar 26, 2017

ping @rvagg

@Trott
Copy link
Member

Trott commented Aug 13, 2017

This seems to need:

  • confirmation from @rvagg that we still want it?
  • a rebase
  • perhaps a quick look to make sure it works just fine if we start bundling npx

@jasnell
Copy link
Member

jasnell commented Aug 24, 2017

Closing due to lack of forward progress on this.

@jasnell jasnell closed this Aug 24, 2017
@thefourtheye thefourtheye deleted the install-seperate-components branch August 25, 2017 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major PRs that contain breaking changes and should be released in the next major version. stalled Issues and PRs that are stalled. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants