diff --git a/.github/workflows/publish_to_test_pypi.yml b/.github/workflows/publish_to_test_pypi.yml index 4ddc8c71..53ac8875 100644 --- a/.github/workflows/publish_to_test_pypi.yml +++ b/.github/workflows/publish_to_test_pypi.yml @@ -37,7 +37,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.12 - + # The next two chunks set up PIP properly and build the module - name: Install pypa/build run: >- @@ -54,12 +54,20 @@ jobs: --wheel --outdir dist/ . - - # Then the module is published to the test PyPI index - - name: Publish to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + + - name: Having a peek + run: >- + ls + + - name: Show me the vers + run: >- + python setup.py version + +# # Then the module is published to the test PyPI index +# - name: Publish to TestPyPI +# uses: pypa/gh-action-pypi-publish@release/v1 +# with: +# password: ${{ secrets.TEST_PYPI_API_TOKEN }} +# repository_url: https://test.pypi.org/legacy/ diff --git a/setup.cfg b/setup.cfg index 53394405..4f9e1764 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,6 +7,4 @@ VCS = git style = pep440 versionfile_source = xga/_version.py versionfile_build = xga/_version.py -tag_prefix = 'v' -parentdir_prefix = xga- - +tag_prefix = '' \ No newline at end of file diff --git a/xga/_version.py b/xga/_version.py index 2865a59c..0f00b248 100644 --- a/xga/_version.py +++ b/xga/_version.py @@ -1,4 +1,7 @@ +# This code is a part of X-ray: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS). +# Last modified by David J Turner (turne540@msu.edu) 12/08/2024, 16:09. Copyright (c) The Contributors + # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build @@ -12,12 +15,12 @@ """Git implementation of _version.py.""" import errno +import functools import os import re import subprocess import sys from typing import Any, Callable, Dict, List, Optional, Tuple -import functools def get_keywords() -> Dict[str, str]: @@ -52,7 +55,7 @@ def get_config() -> VersioneerConfig: cfg.VCS = "git" cfg.style = "pep440" cfg.tag_prefix = "" - cfg.parentdir_prefix = "xga-" + cfg.parentdir_prefix = "None" cfg.versionfile_source = "xga/_version.py" cfg.verbose = False return cfg @@ -188,6 +191,7 @@ def git_versions_from_keywords( verbose: bool, ) -> Dict[str, Any]: """Get version information from git keywords.""" + if "refnames" not in keywords: raise NotThisMethod("Short version file found") date = keywords.get("date") @@ -284,7 +288,7 @@ def git_pieces_from_vcs( # if there isn't one, this yields HEX[-dirty] (no NUM) describe_out, rc = runner(GITS, [ "describe", "--tags", "--dirty", "--always", "--long", - "--match", f"{tag_prefix}[[:digit:]]*" + "--match", f"v*" # TODO THIS IS WHERE I BODGED IT ], cwd=root) # --long was added in git-1.5.5 if describe_out is None: @@ -643,7 +647,6 @@ def get_versions() -> Dict[str, Any]: # __file__, we can work backwards from there to the root. Some # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which # case we can only use expanded keywords. - cfg = get_config() verbose = cfg.verbose