Skip to content

Commit

Permalink
Merge pull request #515 from jtpio/remove-packaging-dep
Browse files Browse the repository at this point in the history
Remove Packaging Dependency
  • Loading branch information
blink1073 committed May 10, 2021
2 parents 0c63b2e + ef9f319 commit 454a66a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
11 changes: 9 additions & 2 deletions jupyter_server/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
store the current version info of the server.
"""
from jupyter_packaging import get_version_info
import re

# Version string must appear intact for tbump versioning
__version__ = '1.7.0.dev0'
version_info = get_version_info(__version__)

# Build up version_info tuple for backwards compatibility
pattern = r'(?P<major>\d+).(?P<minor>\d+).(?P<patch>\d+)(?P<rest>.*)'
match = re.match(pattern, __version__)
parts = [int(match[part]) for part in ['major', 'minor', 'patch']]
if match['rest']:
parts.append(match['rest'])
version_info = tuple(parts)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["jupyter_packaging~=0.9"]
requires = ["jupyter_packaging~=0.9,<2"]
build-backend = "jupyter_packaging.build_api"

[tool.jupyter-packaging.builder]
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ install_requires =
traitlets>=4.2.1
jupyter_core>=4.6.0
jupyter_client>=6.1.1
jupyter_packaging~=0.9
nbformat
nbconvert
Send2Trash
Expand Down

0 comments on commit 454a66a

Please sign in to comment.