diff --git a/.github/workflows/build-aarch64.yml b/.github/workflows/build-aarch64.yml index b3c0d94d..638ebc7f 100644 --- a/.github/workflows/build-aarch64.yml +++ b/.github/workflows/build-aarch64.yml @@ -20,6 +20,8 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Prepare cibuildwheel run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19f773b9..fc3c3bbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,8 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + with: + fetch-depth: 0 - uses: actions/setup-python@v2 name: Install Python diff --git a/setup.py b/setup.py index e84f7fdc..9c73a4a3 100644 --- a/setup.py +++ b/setup.py @@ -258,6 +258,7 @@ def build_extensions(self): ext_modules=ext_modules, cmdclass={"build_ext": BuildExt}, zip_safe=False, + use_scm_version={"fallback_version": "unknown-no-.git-directory"}, ) else: build.sub_commands.append(("build_hook", lambda x: True)) # type: ignore @@ -279,4 +280,5 @@ def build_extensions(self): build_ext=CMakeBuild, install_hook=install_hook, build_hook=build_hook ), zip_safe=False, + use_scm_version={"fallback_version": "unknown-no-.git-directory"}, )