[GH-ISSUE #1389] Submodule and setuptools-scm #735

Closed
opened 2026-03-01 21:45:56 +03:00 by kerem · 2 comments
Owner

Originally created by @bpiwowar on GitHub (Oct 14, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1389

Bug report info

act version:            0.2.26
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 40
Docker host:            unix:///run/user/1000/docker.sock
Sockets found:
	/var/run/docker.sock
	/run/user/1000/docker.sock
Config files:           
	/home/bpiwowar/.actrc:
		-P ubuntu-latest=nektos/act-environments-ubuntu:18.04
Docker Engine:
	Engine version:        20.10.18
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         systemd
	Storage driver:        btrfs
	Registry URI:          https://index.docker.io/v1/
	OS:                    Ubuntu 22.04.1 LTS
	OS type:               linux
	OS version:            22.04
	OS arch:               x86_64
	OS kernel:             5.17.0-1019-oem
	OS CPU:                40
	OS memory:             64051 MB
	Security options:
		name=seccomp,profile=default
		name=rootless
		name=cgroupns

Command used with act

act

Describe issue

The project itself is a submodule - the docker cp does not work since the .git file is a file (and not a directory) containing

gitdir: ../.git/modules/subproject

where subproject is the project in which act is ran.

Combined with setuptools-scm that tries to detect the version from the git tags, this gives the error

LookupError: setuptools-scm was unable to detect version

No response

Workflow content

name: Python package

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7, 3.8, 3.9]

    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install flake8 pytest pytest-timeout
          if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
          pip install .
      - name: Lint with flake8
        if: false
        run: |
          # stop the build if there are Python syntax errors or undefined names
          flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
          # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
          flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
      - name: Test with pytest
        run: |
          pytest

Relevant log output

The only important information is the last one:


...
LookupError: setuptools-scm was unable to detect version


### Additional information

_No response_
Originally created by @bpiwowar on GitHub (Oct 14, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1389 ### Bug report info ```plain text act version: 0.2.26 GOOS: linux GOARCH: amd64 NumCPU: 40 Docker host: unix:///run/user/1000/docker.sock Sockets found: /var/run/docker.sock /run/user/1000/docker.sock Config files: /home/bpiwowar/.actrc: -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 Docker Engine: Engine version: 20.10.18 Engine runtime: runc Cgroup version: 2 Cgroup driver: systemd Storage driver: btrfs Registry URI: https://index.docker.io/v1/ OS: Ubuntu 22.04.1 LTS OS type: linux OS version: 22.04 OS arch: x86_64 OS kernel: 5.17.0-1019-oem OS CPU: 40 OS memory: 64051 MB Security options: name=seccomp,profile=default name=rootless name=cgroupns ``` ### Command used with act ```sh act ``` ### Describe issue The project itself is a submodule - the docker cp does not work since the .git file is a file (and not a directory) containing ``` gitdir: ../.git/modules/subproject ``` where `subproject` is the project in which `act` is ran. Combined with setuptools-scm that tries to detect the version from the git tags, this gives the error ``` LookupError: setuptools-scm was unable to detect version ``` ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Python package on: push: branches: [master] pull_request: branches: [master] jobs: build: runs-on: ubuntu-latest strategy: matrix: python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install flake8 pytest pytest-timeout if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install . - name: Lint with flake8 if: false run: | # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | pytest ``` ### Relevant log output ```sh The only important information is the last one: ... LookupError: setuptools-scm was unable to detect version ``` ``` ### Additional information _No response_
kerem 2026-03-01 21:45:56 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 14, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1312866394 --> @github-actions[bot] commented on GitHub (Nov 14, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@bpiwowar commented on GitHub (Nov 29, 2022):

Just as a note (maybe to be included in the documentation), an easy workaround nowadays is to use the following code in pyproject.toml

[tool.setuptools_scm]
fallback_version = "0.0.0-dev"
<!-- gh-comment-id:1330179243 --> @bpiwowar commented on GitHub (Nov 29, 2022): Just as a note (maybe to be included in the documentation), an easy workaround nowadays is to use the following code in `pyproject.toml` ```toml [tool.setuptools_scm] fallback_version = "0.0.0-dev" ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#735
No description provided.