Skip to content

Commit

Permalink
Modify to use setuptools_scm for package build
Browse files Browse the repository at this point in the history
Signed-off-by: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
  • Loading branch information
thombashi committed May 18, 2024
1 parent 83fd4d4 commit 4b4e6d5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
34 changes: 28 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,49 @@ jobs:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref_name }}-build
cancel-in-progress: true
timeout-minutes: 20
container:
image: ghcr.io/thombashi/python-ci:3.11

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
setup.py
**/*requirements.txt
tox.ini
- run: make setup-ci

- run: make build

lint:
runs-on: ubuntu-latest
permissions:
contents: read
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref_name }}-lint
cancel-in-progress: true
timeout-minutes: 20
container:
image: ghcr.io/thombashi/python-ci:3.11

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
setup.py
**/*requirements.txt
tox.ini
- run: make setup-ci

- run: make check

Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=61.0"]
requires = [
"setuptools>=64",
"setuptools_scm>=8",
]

[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"

[tool.black]
exclude = '''
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def get_release_command_class() -> Dict[str, Type[setuptools.Command]]:

setuptools.setup(
name=MODULE_NAME,
version=pkg_info["__version__"],
url=REPOSITORY_URL,
author=pkg_info["__author__"],
author_email=pkg_info["__email__"],
Expand Down

0 comments on commit 4b4e6d5

Please sign in to comment.