diff --git a/dpctl/_version.py b/dpctl/_version.py index 4673380250..7b4b323189 100644 --- a/dpctl/_version.py +++ b/dpctl/_version.py @@ -6,7 +6,7 @@ # that just contains the computed version number. # This file is released into the public domain. -# Generated by versioneer-0.26 +# Generated by versioneer-0.28 # https://github.com/python-versioneer/python-versioneer """Git implementation of _version.py.""" diff --git a/versioneer.py b/versioneer.py index 223db1d9cf..18e34c2f53 100644 --- a/versioneer.py +++ b/versioneer.py @@ -1,5 +1,5 @@ -# Version: 0.26 +# Version: 0.28 """The Versioneer - like a rocketeer, but for versions. @@ -30,21 +30,27 @@ ### Vendored mode * `pip install versioneer` to somewhere in your $PATH -* add a `[tool.versioneer]` section to your `pyproject.toml or a + * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is + available, so you can also use `conda install -c conda-forge versioneer` +* add a `[tool.versioneer]` section to your `pyproject.toml` or a `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) + * Note that you will need to add `tomli; python_version < "3.11"` to your + build-time dependencies if you use `pyproject.toml` * run `versioneer install --vendor` in your source tree, commit the results * verify version information with `python setup.py version` ### Build-time dependency mode * `pip install versioneer` to somewhere in your $PATH -* add a `[tool.versioneer]` section to your `pyproject.toml or a + * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is + available, so you can also use `conda install -c conda-forge versioneer` +* add a `[tool.versioneer]` section to your `pyproject.toml` or a `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) -* add `versioneer` to the `requires` key of the `build-system` table in - `pyproject.toml`: +* add `versioneer` (with `[toml]` extra, if configuring in `pyproject.toml`) + to the `requires` key of the `build-system` table in `pyproject.toml`: ```toml [build-system] - requires = ["setuptools", "versioneer"] + requires = ["setuptools", "versioneer[toml]"] build-backend = "setuptools.build_meta" ``` * run `versioneer install --no-vendor` in your source tree, commit the results @@ -286,9 +292,8 @@ To make Versioneer easier to embed, all its code is dedicated to the public domain. The `_version.py` that it creates is also in the public domain. -Specifically, both are released under the Creative Commons "Public Domain -Dedication" license (CC0-1.0), as described in -https://creativecommons.org/publicdomain/zero/1.0/ . +Specifically, both are released under the "Unlicense", as described in +https://unlicense.org/. [pypi-image]: https://img.shields.io/pypi/v/versioneer.svg [pypi-url]: https://pypi.python.org/pypi/versioneer/ @@ -313,11 +318,15 @@ from pathlib import Path from typing import Callable, Dict import functools -try: - import tomli - have_tomli = True -except ImportError: - have_tomli = False + +have_tomllib = True +if sys.version_info >= (3, 11): + import tomllib +else: + try: + import tomli as tomllib + except ImportError: + have_tomllib = False class VersioneerConfig: @@ -373,12 +382,12 @@ def get_config_from_root(root): pyproject_toml = root / "pyproject.toml" setup_cfg = root / "setup.cfg" section = None - if pyproject_toml.exists() and have_tomli: + if pyproject_toml.exists() and have_tomllib: try: with open(pyproject_toml, 'rb') as fobj: - pp = tomli.load(fobj) + pp = tomllib.load(fobj) section = pp['tool']['versioneer'] - except (tomli.TOMLDecodeError, KeyError): + except (tomllib.TOMLDecodeError, KeyError): pass if not section: parser = configparser.ConfigParser() @@ -470,7 +479,7 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, # that just contains the computed version number. # This file is released into the public domain. -# Generated by versioneer-0.26 +# Generated by versioneer-0.28 # https://github.com/python-versioneer/python-versioneer """Git implementation of _version.py.""" @@ -1363,7 +1372,7 @@ def do_vcs_install(versionfile_source, ipy): if "VERSIONEER_PEP518" not in globals(): try: my_path = __file__ - if my_path.endswith(".pyc") or my_path.endswith(".pyo"): + if my_path.endswith((".pyc", ".pyo")): my_path = os.path.splitext(my_path)[0] + ".py" versioneer_file = os.path.relpath(my_path) except NameError: @@ -1411,7 +1420,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose): SHORT_VERSION_PY = """ -# This file was generated by 'versioneer.py' (0.26) from +# This file was generated by 'versioneer.py' (0.28) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. @@ -1900,6 +1909,8 @@ def run(self): return # now locate _version.py in the new build/ directory and replace # it with an updated value + if not cfg.versionfile_build: + return target_versionfile = os.path.join(self.build_lib, cfg.versionfile_build) if not os.path.exists(target_versionfile): @@ -1973,7 +1984,7 @@ def run(self): # sdist farms its file list building out to egg_info if 'egg_info' in cmds: - _sdist = cmds['egg_info'] + _egg_info = cmds['egg_info'] else: from setuptools.command.egg_info import egg_info as _egg_info