Skip to content

using as action fails due to missing version #86

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

Closed
ricardogsilva opened this issue Apr 24, 2025 · 0 comments · Fixed by #87, #88, #89, #90 or #91
Closed

using as action fails due to missing version #86

ricardogsilva opened this issue Apr 24, 2025 · 0 comments · Fixed by #87, #88, #89, #90 or #91
Labels
bug Something isn't working

Comments

@ricardogsilva
Copy link
Contributor

After switching to dynamic versioning using cite-runner as a GitHub action does not work anymore, with errors like this:

Failed to build `cite-runner @
  │ file:///home/runner/work/_actions/OSGeo/cite-runner/v0.1.4`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `hatchling.build.build_editable` failed (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 11, in <module>
          wheel_filename =
      backend.build_editable("/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpn72fxP",
      {}, None)
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpTdaitY/lib/python3.13/site-packages/hatchling/build.py",
      line 83, in build_editable
          return os.path.basename(next(builder.build(directory=wheel_directory,
      versions=['editable'])))
      
      ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpTdaitY/lib/python3.13/site-packages/hatchling/builders/plugin/interface.py",
      line 90, in build
          self.metadata.validate_fields()
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpTdaitY/lib/python3.13/site-packages/hatchling/metadata/core.py",
      line 265, in validate_fields
          _ = self.version
              ^^^^^^^^^^^^
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpTdaitY/lib/python3.13/site-packages/hatchling/metadata/core.py",
      line 149, in version
          self._version = self._get_version()
                          ~~~~~~~~~~~~~~~~~^^
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpTdaitY/lib/python3.13/site-packages/hatchling/metadata/core.py",
      line 248, in _get_version
          version = self.hatch.version.cached
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
        File
      "/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmpTdaitY/lib/python3.13/site-packages/hatchling/metadata/core.py",
      line 1456, in cached
          raise type(e)(message) from None
      LookupError: Error getting the version from source
      `vcs`: setuptools-scm was unable to detect version for
      /home/runner/work/_actions/OSGeo/cite-runner/v0.1.4.

      Make sure you're either building from a fully intact git repository
      or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git
      checkout without the .git folder) don't contain the necessary metadata
      and will not work.

      For example, if you're using pip, instead of
      https://github.com/user/proj/archive/master.zip use
      git+https://github.com/user/proj.git#egg=proj

      Alternatively, set the version with the environment variable
      SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME} as described
      in https://setuptools-scm.readthedocs.io/en/latest/config.

      hint: This usually indicates a problem with the package or the build
      environment.
@ricardogsilva ricardogsilva added the bug Something isn't working label Apr 24, 2025
@ricardogsilva ricardogsilva reopened this Apr 24, 2025
@ricardogsilva ricardogsilva reopened this Apr 24, 2025
ricardogsilva added a commit to ricardogsilva/cite-runner that referenced this issue Apr 24, 2025
@ricardogsilva ricardogsilva reopened this Apr 24, 2025
@ricardogsilva ricardogsilva reopened this Apr 24, 2025
@ricardogsilva ricardogsilva reopened this Apr 24, 2025
ricardogsilva added a commit to ricardogsilva/cite-runner that referenced this issue Apr 24, 2025
ricardogsilva added a commit to ricardogsilva/cite-runner that referenced this issue Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment