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

JUPYTER_PACKAGING_SKIP_NPM environment variable versus --skip-npm option #160

Closed
videlec opened this issue Aug 25, 2022 · 2 comments · Fixed by #161
Closed

JUPYTER_PACKAGING_SKIP_NPM environment variable versus --skip-npm option #160

videlec opened this issue Aug 25, 2022 · 2 comments · Fixed by #161

Comments

@videlec
Copy link
Contributor

videlec commented Aug 25, 2022

tried with: jupyter-jsmol version 2022.1.0 and jupyter-packaging 0.12.2
downstream issue: https://trac.sagemath.org/ticket/34421

When setting JUPYTER_PACKAGING_SKIP_NPM=1 in the shell and launching pip install --no-binary ':all:' jupyter-jsmol, the setup process correctly ignores npm install. However, it ends up with

  Skipping npm install as requested.
  Traceback (most recent call last):
    File "[...]/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "[...]/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "[...]/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
      return hook(metadata_directory, config_settings)
    File "[...]/python3.10/site-packages/setuptools/build_meta.py", line 188, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "[...]/python3.10/site-packages/setuptools/build_meta.py", line 174, in run_setup
      exec(code, locals())
    File "<string>", line 8, in <module>
    File "[...]/python3.10/site-packages/jupyter_packaging/__init__.py", line 6, in <module>
      from .setupbase import *  # noqa
    File "[...]/python3.10/site-packages/jupyter_packaging/setupbase.py", line 77, in <module>
      sys.argv.remove("--skip-npm")
  ValueError: list.remove(x): x not in list
@blink1073
Copy link
Contributor

Hi @videlec, would you like to submit a PR to add a check around the removal?

@videlec
Copy link
Contributor Author

videlec commented Aug 25, 2022

Hi @videlec, would you like to submit a PR to add a check around the removal?

sure.

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 a pull request may close this issue.

2 participants