Skip to content

Commit

Permalink
Merge pull request #124 from abap34/bug/#116
Browse files Browse the repository at this point in the history
環境変数ではなくファイル経由でバージョン情報を共有するように変更
  • Loading branch information
abap34 authored May 18, 2024
2 parents 5fe7c8b + 960654c commit 8b4da2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
pip install setuptools wheel twine pybind11
- name: Build package
run: env VERSION=$(git describe --tags --abbrev=0) python setup.py sdist
run: |
git describe --tags --abbrev=0 > version.txt
python setup.py sdist
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include src/*
include scripts/setup.sh
include version.txt
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from setuptools import setup

os.system("bash scripts/setup.sh")
__version__ = os.getenv("VERSION")
with open("version.txt") as f:
__version__ = f.read().strip()

ext_modules = [
Pybind11Extension(
Expand Down

0 comments on commit 8b4da2a

Please sign in to comment.