|
1 | 1 | """
|
2 | 2 | jupyterlab-system-monitor setup
|
3 | 3 | """
|
4 |
| -import json |
5 | 4 | import os
|
6 | 5 |
|
7 | 6 | from jupyter_packaging import (
|
8 | 7 | create_cmdclass, install_npm, ensure_targets,
|
9 |
| - combine_commands, get_version, |
| 8 | + combine_commands, get_version, skip_if_exists |
10 | 9 | )
|
11 | 10 | import setuptools
|
12 | 11 |
|
|
21 | 20 |
|
22 | 21 | # Representative files that should exist after a successful build
|
23 | 22 | jstargets = [
|
24 |
| - os.path.join(HERE, "packages", "system-monitor", "lib", "index.js"), |
25 | 23 | os.path.join(lab_path, "package.json"),
|
26 | 24 | ]
|
27 | 25 |
|
|
43 | 41 | data_files_spec=data_files_spec
|
44 | 42 | )
|
45 | 43 |
|
46 |
| -cmdclass["jsdeps"] = combine_commands( |
| 44 | +js_command = combine_commands( |
47 | 45 | install_npm(HERE, build_cmd="build:prod", npm=["jlpm"]),
|
48 | 46 | ensure_targets(jstargets),
|
49 | 47 | )
|
50 | 48 |
|
| 49 | +is_repo = os.path.exists(os.path.join(HERE, ".git")) |
| 50 | +if is_repo: |
| 51 | + cmdclass["jsdeps"] = js_command |
| 52 | +else: |
| 53 | + cmdclass["jsdeps"] = skip_if_exists(jstargets, js_command) |
| 54 | + |
51 | 55 | with open("README.md", "r") as fh:
|
52 | 56 | long_description = fh.read()
|
53 | 57 |
|
|
62 | 66 | cmdclass= cmdclass,
|
63 | 67 | packages=setuptools.find_packages(),
|
64 | 68 | install_requires=[
|
65 |
| - "jupyterlab>=3.0.0rc10,==3.*", |
66 |
| - "jupyterlab-topbar>=0.6.0,<0.7.0", |
67 |
| - "nbresuse>=0.4.0,<0.5.0" |
| 69 | + "jupyterlab~=3.0", |
| 70 | + "jupyterlab-topbar~=0.6", |
| 71 | + "jupyter-resource-usage~=0.5" |
68 | 72 | ],
|
69 | 73 | zip_safe=False,
|
70 | 74 | include_package_data=True,
|
|
0 commit comments