From ce06efbf9e301d325155e704c38bdaa7de9c19c3 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Tue, 2 Mar 2021 16:50:21 -0800 Subject: [PATCH] Tell setuptools-scm where to find the repo root --- .github/workflows/python-publish.yaml | 5 ++++- lib/py/setup.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yaml b/.github/workflows/python-publish.yaml index 867988e..eeb98d4 100644 --- a/.github/workflows/python-publish.yaml +++ b/.github/workflows/python-publish.yaml @@ -6,6 +6,10 @@ on: jobs: deploy: + defaults: + run: + working-directory: lib/py/ + runs-on: ubuntu-latest steps: @@ -26,7 +30,6 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: | - cd lib/py/ python setup.py sdist bdist_wheel twine upload dist/* diff --git a/lib/py/setup.py b/lib/py/setup.py index 011bc96..07cb1ff 100644 --- a/lib/py/setup.py +++ b/lib/py/setup.py @@ -12,7 +12,10 @@ }, author="reddit", license="BSD", - use_scm_version=True, + use_scm_version={ + "root": "../../", + "relative_to": __file__, + }, packages=find_packages(), python_requires=">=3.7", setup_requires=["setuptools_scm"],