Skip to content

Commit 454a66a

Browse files
authored
Merge pull request #515 from jtpio/remove-packaging-dep
Remove Packaging Dependency
2 parents 0c63b2e + ef9f319 commit 454a66a

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

jupyter_server/_version.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
store the current version info of the server.
33
44
"""
5-
from jupyter_packaging import get_version_info
5+
import re
66

77
# Version string must appear intact for tbump versioning
88
__version__ = '1.7.0.dev0'
9-
version_info = get_version_info(__version__)
9+
10+
# Build up version_info tuple for backwards compatibility
11+
pattern = r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'
12+
match = re.match(pattern, __version__)
13+
parts = [int(match[part]) for part in ['major', 'minor', 'patch']]
14+
if match['rest']:
15+
parts.append(match['rest'])
16+
version_info = tuple(parts)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.9"]
2+
requires = ["jupyter_packaging~=0.9,<2"]
33
build-backend = "jupyter_packaging.build_api"
44

55
[tool.jupyter-packaging.builder]

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ install_requires =
3535
traitlets>=4.2.1
3636
jupyter_core>=4.6.0
3737
jupyter_client>=6.1.1
38-
jupyter_packaging~=0.9
3938
nbformat
4039
nbconvert
4140
Send2Trash

0 commit comments

Comments
 (0)