diff --git a/pyproject.toml b/pyproject.toml index d5da2511cfb..65c733fcc85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ [build-system] # PEP 508 specs -requires = ["setuptools", "wheel"] +requires = ["setuptools", "wheel", "packaging"] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 2a49740efa5..7d90c0548e2 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ import os import sys -import pkg_resources +from packaging.version import Version import setuptools # To enable importing version.py directly, we add its path to sys.path. @@ -40,7 +40,7 @@ if datestring := os.environ.get('TFDS_NIGHTLY_TIMESTAMP'): project_name = 'tfds-nightly' # Version as `X.Y.Z.dev199912312459` - curr_version = pkg_resources.parse_version(__version__) + curr_version = Version(__version__) __version__ = f'{curr_version.base_version}.dev{datestring}' else: project_name = 'tensorflow-datasets'