From 4beb9089a070320ed23c13073aabdeb3ba3c6c4a Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Mon, 10 May 2021 12:02:49 +0200 Subject: [PATCH] Remove Packaging Dependency --- jupyterlab_server/_version.py | 16 ++++++++++++++-- pyproject.toml | 2 +- setup.cfg | 3 +-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/jupyterlab_server/_version.py b/jupyterlab_server/_version.py index 7a871235..864d5221 100644 --- a/jupyterlab_server/_version.py +++ b/jupyterlab_server/_version.py @@ -1,3 +1,15 @@ -from jupyter_packaging import get_version_info +""" +store the current version info of the server. + +""" +import re + __version__ = '2.5.0' -version_info = get_version_info(__version__) + +# Build up version_info tuple for backwards compatibility +pattern = r'(?P\d+).(?P\d+).(?P\d+)(?P.*)' +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) diff --git a/pyproject.toml b/pyproject.toml index 96ba87cc..d34c127e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["jupyter_packaging~=0.9", "jupyter_server"] +requires = ["jupyter_packaging~=0.9,<2", "jupyter_server"] build-backend = "setuptools.build_meta" [tool.check-manifest] diff --git a/setup.cfg b/setup.cfg index 514fab5c..753e2998 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,14 +31,13 @@ install_requires = jinja2>=2.10 json5 jsonschema>=3.0.1 - jupyter_packaging~=0.9,<2 packaging requests jupyter_server~=1.4 [options.extras_require] -test = codecov; ipykernel; pytest>=5.3.2; pytest-cov; jupyter_server[test]; openapi_core; pytest-console-scripts; strict-rfc3339; ruamel.yaml; wheel +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 [options.packages.find] exclude = ['docs*']