diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index 6c6aab15..74b99fb5 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -28,6 +28,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + fetch-tags: true - name: Setup the Python install uses: actions/setup-python@v4 with: diff --git a/.github/workflows/publish_to_test_pypi.yml b/.github/workflows/publish_to_test_pypi.yml index 53ac8875..7c26859f 100644 --- a/.github/workflows/publish_to_test_pypi.yml +++ b/.github/workflows/publish_to_test_pypi.yml @@ -33,6 +33,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + fetch-tags: true - name: Setup the Python install uses: actions/setup-python@v4 with: @@ -45,7 +46,7 @@ jobs: pip install build --user - + - name: Build a binary wheel and source tarball run: >- python -m @@ -55,19 +56,9 @@ jobs: --outdir dist/ . - - 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/ - - + # 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/versioneer.py b/versioneer.py index 1e3753e6..821ee7e8 100644 --- a/versioneer.py +++ b/versioneer.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:50. Copyright (c) The Contributors + # Version: 0.29 """The Versioneer - like a rocketeer, but for versions. @@ -310,6 +313,7 @@ import configparser import errno +import functools import json import os import re @@ -318,7 +322,6 @@ from pathlib import Path from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union from typing import NoReturn -import functools have_tomllib = True if sys.version_info >= (3, 11): @@ -1322,7 +1325,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 - IDENTICAL TO _version.py ], cwd=root) # --long was added in git-1.5.5 if describe_out is None: