From 8ccb509e7ede0720629b7ac3a3ac12f1523f7d57 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 16 Jan 2024 19:18:54 -0500 Subject: [PATCH 1/2] Move versioneer configuration from setup.cfg to pyproject.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit versioneer became a bit too obnoxious in reporting its success and fail stories to the user in stdout which we rely on using as a result of an inquiry to setup.py: ❯ python setup.py --name 2>/dev/null Failed to load config from /home/yoh/proj/datalad/datalad-container/pyproject.toml: 'versioneer' Try to load it from setup.cfg datalad_container ❯ echo $? 0 to workaround -- just moving its configuration to its preferred location - pyproject.toml and it starts to behave a bit better --- pyproject.toml | 11 +++++++++++ setup.cfg | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c7cb364a..a9fc169b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,3 +10,14 @@ multi_line_output = 3 skip = '.git,*.pdf,*.svg,venvs,versioneer.py,venvs' # DNE - do not exist ignore-words-list = 'dne' + +[tool.versioneer] +# See the docstring in versioneer.py for instructions. Note that you must +# re-run 'versioneer.py setup' after changing this section, and commit the +# resulting files. +VCS = 'git' +style = 'pep440' +versionfile_source = 'datalad_container/_version.py' +versionfile_build = 'datalad_container/_version.py' +tag_prefix = '' +parentdir_prefix = '' diff --git a/setup.cfg b/setup.cfg index 0616ed9e..c27d6c0d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,17 +48,6 @@ datalad.extensions = datalad.metadata.extractors = container_inspect = datalad_container.extractors.metalad_container:MetaladContainerInspect -[versioneer] -# See the docstring in versioneer.py for instructions. Note that you must -# re-run 'versioneer.py setup' after changing this section, and commit the -# resulting files. -VCS = git -style = pep440 -versionfile_source = datalad_container/_version.py -versionfile_build = datalad_container/_version.py -tag_prefix = -parentdir_prefix = - [coverage:report] show_missing = True omit = From 6e560d7b1ed2dac0c455040d37385f43fc05cc14 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 16 Jan 2024 20:20:49 -0500 Subject: [PATCH 2/2] Require tomli so setup.py also could read it --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a9fc169b..2ca5bd3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools >= 43.0.0", "wheel"] +requires = ["setuptools >= 43.0.0", "tomli", "wheel"] [tool.isort] force_grid_wrap = 2