Skip to content

Commit d3b9407

Browse files
committed
Prepare release on pypi.org
1 parent 47c24b4 commit d3b9407

File tree

5 files changed

+26
-12
lines changed

5 files changed

+26
-12
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install node
1616
uses: actions/setup-node@v1
1717
with:
18-
node-version: '10.x'
18+
node-version: '14.x'
1919
- name: Install Python
2020
uses: actions/setup-python@v2
2121
with:

.github/workflows/publish.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,24 @@ jobs:
1212
- name: Install node
1313
uses: actions/setup-node@v1
1414
with:
15-
node-version: "12.x"
15+
node-version: "14.x"
1616
registry-url: "https://registry.npmjs.org"
1717
- name: Install Python
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v2
1919
with:
2020
python-version: "3.x"
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
pip install jupyterlab~=2.0
24+
python -m pip pip install jupyterlab~=3.0
2525
- name: Build and publish NPM package
2626
run: |
27-
npm install
27+
jlpm
2828
npm publish --access=public
29+
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*
2932
env:
3033
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
TWINE_USERNAME: __token__
35+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# jlab_enhanced_launcher
1+
# jlab-enhanced-launcher
22

3-
![Github Actions Status](https://github.com/fcollonval/jlab-enhanced-launcher/workflows/Build/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/fcollonval/jlab-enhanced-launcher.git/master?urlpath=lab) [![npm](https://img.shields.io/npm/v/@jlab-enhanced/launcher)](https://www.npmjs.com/package/@jlab-enhanced/launcher)
3+
![Github Actions Status](https://github.com/fcollonval/jlab-enhanced-launcher/workflows/Build/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/fcollonval/jlab-enhanced-launcher/master?urlpath=lab) [![npm](https://img.shields.io/npm/v/@jlab-enhanced/launcher)](https://www.npmjs.com/package/@jlab-enhanced/launcher) [![PyPI](https://img.shields.io/pypi/v/jlab-enhanced-launcher)](https://pypi.org/project/jlab-enhanced-launcher)
44

55
A enhanced launcher for JupyterLab.
66

7-
![Demo](enh_launcher.gif)
7+
![Demo](https://raw.githubusercontent.com/fcollonval/jlab-enhanced-launcher/master/enh_launcher.gif)
88

99
This codes started from https://github.com/jupyterlab/jupyterlab/pull/5953.
1010

@@ -16,24 +16,28 @@ This codes started from https://github.com/jupyterlab/jupyterlab/pull/5953.
1616

1717
```bash
1818
pip install jlab-enhanced-launcher
19+
jupyter labextension disable @jupyterlab/launcher-extension
1920
```
2021

2122
or
2223

2324
```bash
2425
conda install jlab-enhanced-launcher
26+
jupyter labextension disable @jupyterlab/launcher-extension
2527
```
2628

2729
### Uninstall
2830

2931
```bash
3032
pip uninstall jlab-enhanced-launcher
33+
jupyter labextension enable @jupyterlab/launcher-extension
3134
```
3235

3336
or
3437

3538
```bash
3639
conda remove jlab-enhanced-launcher
40+
jupyter labextension enable @jupyterlab/launcher-extension
3741
```
3842

3943
## Contributing
@@ -51,6 +55,7 @@ The `jlpm` command is JupyterLab's pinned version of
5155
# Change directory to the jlab_enhanced_launcher directory
5256
# Install package in development mode
5357
pip install -e .
58+
jupyter labextension disable @jupyterlab/launcher-extension
5459
# Link your development version of the extension with JupyterLab
5560
jupyter labextension develop . --overwrite
5661
# Rebuild extension Typescript source after making changes

jlab_enhanced_launcher/_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
def _fetchVersion():
44
import json
55
import pathlib
6+
from packaging.version import parse
67

78
HERE = pathlib.Path(__file__).parent.absolute()
89

910
for d in HERE.rglob('package.json'):
1011
try:
1112
with d.open() as f:
12-
return json.load(f)['version']
13+
return str(parse(json.load(f)['version']))
1314
except FileNotFoundError:
1415
pass
1516

setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
import json
55
import os
66

7+
import setuptools
78
from jupyter_packaging import (
89
create_cmdclass, install_npm, ensure_targets,
910
combine_commands, skip_if_exists
1011
)
11-
import setuptools
12+
from packaging.version import parse
1213

1314
HERE = os.path.abspath(os.path.dirname(__file__))
1415

@@ -17,7 +18,7 @@
1718

1819
# Get our version
1920
with open(os.path.join(HERE, 'package.json')) as f:
20-
version = json.load(f)['version']
21+
version = str(parse(json.load(f)['version']))
2122

2223
lab_path = os.path.join(HERE, name, "labextension")
2324

@@ -27,7 +28,7 @@
2728
]
2829

2930
package_data_spec = {
30-
name: [
31+
name.replace("_", "-"): [
3132
"*"
3233
]
3334
}
@@ -70,6 +71,7 @@
7071
packages=setuptools.find_packages(),
7172
install_requires=[
7273
"jupyterlab>=3.0.0rc13,==3.*",
74+
"packaging"
7375
],
7476
zip_safe=False,
7577
include_package_data=True,
@@ -84,6 +86,7 @@
8486
"Programming Language :: Python :: 3.6",
8587
"Programming Language :: Python :: 3.7",
8688
"Programming Language :: Python :: 3.8",
89+
"Programming Language :: Python :: 3.9",
8790
"Framework :: Jupyter",
8891
],
8992
)

0 commit comments

Comments
 (0)