Skip to content

Commit 0bc4021

Browse files
authored
Remove Packaging Dependency (#181)
1 parent 8dc1a6a commit 0bc4021

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

jupyterlab_server/_version.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1-
from jupyter_packaging import get_version_info
1+
"""
2+
store the current version info of the server.
3+
4+
"""
5+
import re
6+
27
__version__ = '2.5.0'
3-
version_info = get_version_info(__version__)
8+
9+
# Build up version_info tuple for backwards compatibility
10+
pattern = r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'
11+
match = re.match(pattern, __version__)
12+
parts = [int(match[part]) for part in ['major', 'minor', 'patch']]
13+
if match['rest']:
14+
parts.append(match['rest'])
15+
version_info = tuple(parts)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.9", "jupyter_server"]
2+
requires = ["jupyter_packaging~=0.9,<2", "jupyter_server"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.check-manifest]

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ install_requires =
3131
jinja2>=2.10
3232
json5
3333
jsonschema>=3.0.1
34-
jupyter_packaging~=0.9,<2
3534
packaging
3635
requests
3736
jupyter_server~=1.4
3837

3938

4039
[options.extras_require]
41-
test = codecov; ipykernel; pytest>=5.3.2; pytest-cov; jupyter_server[test]; openapi_core; pytest-console-scripts; strict-rfc3339; ruamel.yaml; wheel
40+
test = codecov; ipykernel; pytest>=5.3.2; pytest-cov; jupyter_server[test]; openapi_core~=0.13.8; pytest-console-scripts; strict-rfc3339; ruamel.yaml; wheel
4241

4342
[options.packages.find]
4443
exclude = ['docs*']

0 commit comments

Comments
 (0)