Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Packaging Dependency #515

Merged
merged 1 commit into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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