Skip to content

Commit 5dc2e40

Browse files
telamonianfcollonval
authored andcommitted
instead of yarn use jlpm, which is guaranteed to be installed alongside Jupyterlab (jupyterlab#423)
* instead of `yarn` use `jlpm`, which is guaranteed to be installed w/jlab * adopt standard practice of installing jlab before running other tests
1 parent 1c93669 commit 5dc2e40

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

Diff for: .travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ cache:
66
directories:
77
- /home/travis/.yarn-cache/
88
script:
9+
- pip install 'jupyterlab~=1.0'
910
- python setup.py sdist
1011
- pip install --find-links=dist jupyterlab_git[test]
1112
- pytest jupyterlab_git

Diff for: package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
"jupyterlab-extension"
1313
],
1414
"scripts": {
15-
"build": "yarn run build:lib",
15+
"build": "jlpm run build:lib",
1616
"build:labextension": "cd jupyterlab_git && rimraf labextension && mkdirp labextension && cd labextension && npm pack ../..",
1717
"build:lib": "tsc",
18-
"build:all": "yarn run build:labextension",
19-
"clean": "yarn run clean:lib",
18+
"build:all": "jlpm run build:labextension",
19+
"clean": "jlpm run clean:lib",
2020
"clean:lib": "rimraf lib",
2121
"clean:labextension": "rimraf jupyterlab_git/labextension",
22-
"clean:all": "yarn run clean:lib && yarn run clean:labextension",
23-
"prepare": "yarn run clean && yarn run build",
22+
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
23+
"prepare": "jlpm run clean && jlpm run build",
2424
"watch": "tsc -w",
2525
"test": "jest",
2626
"lint": "tslint --project .",

Diff for: setup.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
from setupbase import (
77
create_cmdclass, install_npm, ensure_targets,
8-
find_packages, combine_commands, ensure_python,
9-
get_version, HERE
8+
combine_commands, ensure_python, get_version,
9+
HERE
1010
)
1111

1212
import setuptools
@@ -43,8 +43,9 @@
4343
package_data_spec=package_data_spec,
4444
data_files_spec=data_files_spec
4545
)
46+
4647
cmdclass['jsdeps'] = combine_commands(
47-
install_npm(HERE, build_cmd='build:all'),
48+
install_npm(HERE, build_cmd='build:all', npm='jlpm'),
4849
ensure_targets(jstargets),
4950
)
5051

@@ -84,7 +85,7 @@
8485
extras_require = {
8586
'test': [
8687
'pytest',
87-
'jupyterlab>=1.0.3',
88+
'jupyterlab~=1.0',
8889
],
8990
},
9091
)

Diff for: setupbase.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def run(self):
341341
node_modules = pjoin(node_package, 'node_modules')
342342
is_yarn = os.path.exists(pjoin(node_package, 'yarn.lock'))
343343

344-
npm_cmd = npm
344+
npm_cmd = [npm] if isinstance(npm, str) else npm
345345

346346
if npm is None:
347347
if is_yarn:
@@ -697,4 +697,4 @@ def _translate_glob_part(pat):
697697
res.append('[%s]' % stuff)
698698
else:
699699
res.append(re.escape(c))
700-
return ''.join(res)
700+
return ''.join(res)

0 commit comments

Comments
 (0)