Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setuptools_scm for pyproject.toml, setup.cfg and setup.py #185

Open
wants to merge 67 commits into
base: main
Choose a base branch
from

Commits on Sep 21, 2024

  1. Add setuptools_scm for pyproject.toml, setup.cfg and setup.py

    Caspar van Leeuwen committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    87ace82 View commit details
    Browse the repository at this point in the history
  2. Also add an init which sets the version based on the setuptools_scm c…

    …reated version file, or otherwise gets it dynamically at runtime (if setuptools_scm is available)
    Caspar van Leeuwen committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    8737cfd View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. See if we can implement a single-source-version approach as in https:…

    …//packaging.python.org/en/latest/guides/single-sourcing-package-version/#single-sourcing-the-version. We then rely on setuptools_scm _only_ for non-release versions if people are running from a git checkout.
    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    950931b View commit details
    Browse the repository at this point in the history
  2. Try the fallback_version config item from setuptools_scm. It seems to…

    … provide a hardcoded fallback if no scm is available, i.e. no .git folder. That's what we'd need. I'd still want a single place to have that fallback version, ideally in eessi.testsuite.__init__.py. That way, the same fallback version will be used to name the installation directory, but also at runtime if you print from eessi.testsuite import __version__; print(__version__)
    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    d3917a1 View commit details
    Browse the repository at this point in the history
  3. Fix syntax

    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    60d4145 View commit details
    Browse the repository at this point in the history
  4. First, try if we can single source from setup.py for new enough setup…

    …tools_Scm
    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    8c9bcf3 View commit details
    Browse the repository at this point in the history
  5. Try with single version for fallback_version in pyproject.toml and pa…

    …rse that in eessi.testsuite.__init__.py
    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    07943e3 View commit details
    Browse the repository at this point in the history
  6. Strip filename of __init__.py file when trying to construct the pypro…

    …ject.toml path
    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    580f664 View commit details
    Browse the repository at this point in the history
  7. Forgot to import os.path

    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    00ecf53 View commit details
    Browse the repository at this point in the history
  8. Also except LookupError

    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    8e29e77 View commit details
    Browse the repository at this point in the history
  9. leave the setuptools version up to setup.py, as it depends on the pyt…

    …hon version
    Caspar van Leeuwen committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    101c40b View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Go back to the last version that passed CI, which specified setuptool…

    …s>=42
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    593c633 View commit details
    Browse the repository at this point in the history
  2. See if this works. Potentially, we can just go for the lowest setupto…

    …ols_scm version in this range...
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    bf82ccc View commit details
    Browse the repository at this point in the history
  3. Fix syntax error

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    503e070 View commit details
    Browse the repository at this point in the history
  4. Fix typo

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    43b370f View commit details
    Browse the repository at this point in the history
  5. Remove specific version requirement so that this also passes with pyt…

    …hon 3.6
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    26a5a62 View commit details
    Browse the repository at this point in the history
  6. Print filename correctly in error message

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    4797e6b View commit details
    Browse the repository at this point in the history
  7. Specify write_to_template specifically if the oldest version of setup…

    …tools-scm is used
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    4b80f96 View commit details
    Browse the repository at this point in the history
  8. Use scm_dict in setup

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    c835884 View commit details
    Browse the repository at this point in the history
  9. Make sure to import the fallback version _first_

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    8eb5e25 View commit details
    Browse the repository at this point in the history
  10. Add missing equal sign

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b375565 View commit details
    Browse the repository at this point in the history
  11. Restructure and also catch other errors when opening the pyproject.to…

    …ml file
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    c7737db View commit details
    Browse the repository at this point in the history
  12. Fix typo

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    3519d59 View commit details
    Browse the repository at this point in the history
  13. Don't set fallback version in __init__.py anymore. We should have alw…

    …ays gotten one with one of the three methods. If not, it's a bug
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    cd318c9 View commit details
    Browse the repository at this point in the history
  14. Don't print the __version__ in the exception messages, as there is no…

    …ne set
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    5dc180d View commit details
    Browse the repository at this point in the history
  15. Merge branch 'setuptools_scm_versioning' of github.com:casparvl/test-…

    …suite into setuptools_scm_versioning
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    4a75e41 View commit details
    Browse the repository at this point in the history
  16. Fix flake8 complaints

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    ed1d1bd View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7a9d16f View commit details
    Browse the repository at this point in the history
  18. Fix typo

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b171330 View commit details
    Browse the repository at this point in the history
  19. Make CI workflow more verbose for easier debugging

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    fffe669 View commit details
    Browse the repository at this point in the history
  20. Enable setuptools_scm debugging output

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    3f1a984 View commit details
    Browse the repository at this point in the history
  21. Actually resolve env var

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    610844c View commit details
    Browse the repository at this point in the history
  22. Make fetch-depth 0, so that setuptools_scm has the full history

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    433c0ca View commit details
    Browse the repository at this point in the history
  23. Check for the presence of the version file

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    f4a8065 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    bac5401 View commit details
    Browse the repository at this point in the history
  25. We don't seem to be able to convince setuptools_scm version 4 to use …

    …the write_to_template correctly in CI, for some reason. That's fine, we'll just also check if 'version' is specified in _version.py
    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    15706fc View commit details
    Browse the repository at this point in the history
  26. Fix flake8

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    a6afd1a View commit details
    Browse the repository at this point in the history
  27. Fixed more flake8

    Caspar van Leeuwen committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    0ad305b View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Configuration menu
    Copy the full SHA
    5bca5bb View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Merge branch 'setuptools_scm_versioning' of github.com:casparvl/test-…

    …suite into setuptools_scm_versioning
    Caspar van Leeuwen committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    ddae92c View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Added CI workflows to check versioning in various ways

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    9aca8a4 View commit details
    Browse the repository at this point in the history
  2. Forgot to add the git+ to git+https

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    72a3698 View commit details
    Browse the repository at this point in the history
  3. Try to debug why the version file doesn't exist...

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    3aec459 View commit details
    Browse the repository at this point in the history
  4. Make the check independent from the current directory

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    3463a78 View commit details
    Browse the repository at this point in the history
  5. Make check independent from current dir

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    5f32c15 View commit details
    Browse the repository at this point in the history
  6. For python 3.6, the version file contains 'version' instead of __vers…

    …ion__'. So import that when importing directly
    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    2bd40a5 View commit details
    Browse the repository at this point in the history
  7. Now really: import version instead of __version__ from versionfile fo…

    …r python3.6
    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    5e98775 View commit details
    Browse the repository at this point in the history
  8. Also for git+https installs, check if the version file matches the ve…

    …rsion imported from eessi.testsuite
    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    2921d6d View commit details
    Browse the repository at this point in the history
  9. fix sytnax for github workflow

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    f65374e View commit details
    Browse the repository at this point in the history
  10. Print setuptools_scm version

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    d994927 View commit details
    Browse the repository at this point in the history
  11. Only do version check, nothing else

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    0199051 View commit details
    Browse the repository at this point in the history
  12. Do not-equal-to comparisons on strings. Versions arent numbers

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    2b98d1e View commit details
    Browse the repository at this point in the history
  13. More clear reporting on version differences

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    603b010 View commit details
    Browse the repository at this point in the history
  14. Make sure to only print the version, nothing else

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    49b2710 View commit details
    Browse the repository at this point in the history
  15. Check why these versions could be different

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    fc438ee View commit details
    Browse the repository at this point in the history
  16. env vars do not carry over between steps. We'll need to get the versi…

    …on again
    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    2c1c3ae View commit details
    Browse the repository at this point in the history
  17. more output to help debugging

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    d10afd3 View commit details
    Browse the repository at this point in the history
  18. Don't checkout, we want to test what happens when we pull a tarball f…

    …rom git
    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    358041f View commit details
    Browse the repository at this point in the history
  19. Maybe PWD isn't set?

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    88451e6 View commit details
    Browse the repository at this point in the history
  20. Print the pythonpath so we can check it

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    1452afa View commit details
    Browse the repository at this point in the history
  21. We need to re-get the fallback_version because env vars don't carry o…

    …ver between steps
    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    18a6019 View commit details
    Browse the repository at this point in the history
  22. Make sure we get the fallback version before changing directory

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    fe8094d View commit details
    Browse the repository at this point in the history
  23. Don't need to store the old dir anymore

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    15e92d1 View commit details
    Browse the repository at this point in the history
  24. Add workflow to check the hardcoded fallback version in pyproject.tom…

    …l against the version used in CI/run_reframe.sh and check against git tags listed
    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    5bea644 View commit details
    Browse the repository at this point in the history
  25. Change where the pyproject.toml is for the grep

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    d608383 View commit details
    Browse the repository at this point in the history
  26. Same for CI/run_reframe.sh

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    dd05330 View commit details
    Browse the repository at this point in the history
  27. Fix the fallback version so that it is the latest tagged version

    Caspar van Leeuwen committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    cbefb7a View commit details
    Browse the repository at this point in the history