Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit baeb9b7

Browse files
authored
Merge pull request #41 from jtpio/import-package
Make the package importable
2 parents 57205b5 + 6f7573b commit baeb9b7

File tree

8 files changed

+12
-13
lines changed

8 files changed

+12
-13
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ node_modules/
44
*.egg-info/
55
.ipynb_checkpoints
66
*.tsbuildinfo
7-
jupyterlab-python-file/labextension
7+
jupyterlab_python_file/labextension
88

99
# Created by https://www.gitignore.io/api/python
1010
# Edit at https://www.gitignore.io/?templates=python

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ node_modules
22
**/node_modules
33
**/lib
44
**/package.json
5-
jupyterlab-python-file
5+
jupyterlab_python_file

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include ts*.json
1010
include yarn.lock
1111
include *.md
1212

13-
graft jupyterlab-python-file/labextension
13+
graft jupyterlab_python_file/labextension
1414

1515
# Javascript files
1616
graft src
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"build:prod": "jlpm run clean && jlpm run build:lib && jlpm run build:labextension",
3636
"clean": "jlpm run clean:lib",
3737
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
38-
"clean:labextension": "rimraf jupyterlab-python-file/labextension",
38+
"clean:labextension": "rimraf jupyterlab_python_file/labextension",
3939
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
4040
"eslint": "eslint . --ext .ts,.tsx --fix",
4141
"eslint:check": "eslint . --ext .ts,.tsx",
@@ -67,7 +67,7 @@
6767
},
6868
"jupyterlab": {
6969
"extension": true,
70-
"outputDir": "jupyterlab-python-file/labextension"
70+
"outputDir": "jupyterlab_python_file/labextension"
7171
},
7272
"jupyter-releaser": {
7373
"hooks": {

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.0"]
33
build-backend = "jupyter_packaging.build_api"
44

55
[tool.jupyter-packaging.options]
6-
skip-if-exists = ["jupyterlab-python-file/labextension/static/style.js"]
7-
ensured-targets = ["jupyterlab-python-file/labextension/static/style.js", "jupyterlab-python-file/labextension/package.json"]
6+
skip-if-exists = ["jupyterlab_python_file/labextension/static/style.js"]
7+
ensured-targets = ["jupyterlab_python_file/labextension/static/style.js", "jupyterlab_python_file/labextension/package.json"]
88

99
[tool.jupyter-packaging.builder]
1010
factory = "jupyter_packaging.npm_builder"
@@ -14,4 +14,4 @@ build_cmd = "build:prod"
1414
npm = ["jlpm"]
1515

1616
[tool.check-manifest]
17-
ignore = ["jupyterlab-python-file/labextension/**", "yarn.lock", ".*", "package-lock.json"]
17+
ignore = ["jupyterlab_python_file/labextension/**", "yarn.lock", ".*", "package-lock.json"]

setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@
1010

1111
# The name of the project
1212
name = "jupyterlab-python-file"
13+
package = name.replace('-', '_')
1314

14-
lab_path = HERE / name / "labextension"
15+
lab_path = HERE / package / "labextension"
1516

1617
# Representative files that should exist after a successful build
1718
ensured_targets = [
1819
str(lab_path / "package.json"),
1920
str(lab_path / "static/style.js")
2021
]
2122

22-
labext_name = "jupyterlab-python-file"
23-
2423
data_files_spec = [
25-
("share/jupyter/labextensions/%s" % labext_name, str(lab_path), "**"),
26-
("share/jupyter/labextensions/%s" % labext_name, str(HERE), "install.json"),
24+
("share/jupyter/labextensions/%s" % name, str(lab_path), "**"),
25+
("share/jupyter/labextensions/%s" % name, str(HERE), "install.json"),
2726
]
2827

2928
long_description = (HERE / "README.md").read_text()

0 commit comments

Comments
 (0)