File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 - name : Install dependencies
2525 run : |
2626 python -m pip install --upgrade pip
27- pip install setuptools wheel twine
27+ pip install setuptools setuptools_scm wheel twine
2828 - name : Publish to Pypi
2929 run : |
30- rm -rf dist; VERSION=${{ env.glustercli_version }} python3 setup.py sdist bdist_wheel;
30+ rm -rf dist; python3 setup.py sdist bdist_wheel;
3131 TWINE_PASSWORD=${{ secrets.TWINE_PASSWORD }} twine upload --username aravindavk dist/*
Original file line number Diff line number Diff line change @@ -8,5 +8,6 @@ pycscope.*
88build
99dist
1010docs /_build
11+ glustercli /_version.py
1112.DS_Store
1213_build
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" setuptools>=45" , " setuptools_scm[toml]>=6.2" ]
3+ build-backend = " setuptools.build_meta"
4+
5+ [tool .setuptools_scm ]
6+ write_to = " glustercli/_version.py"
Original file line number Diff line number Diff line change 11import os
22import re
33from setuptools import setup
4+ from importlib .metadata import version , PackageNotFoundError
45
5- VERSION = os .environ .get ("VERSION" , "master" )
6-
6+ try :
7+ __version__ = version ('glustercli' )
8+ except PackageNotFoundError :
9+ __version__ = "unknown"
710
811setup (
912 name = 'glustercli' ,
10- version = VERSION ,
13+ version = __version__ ,
1114 description = 'Python bindings for GlusterFS CLI and Metrics collection' ,
1215 license = 'GPLv2 or LGPLv3+' ,
1316 author = 'Aravinda Vishwanathapura' ,
You can’t perform that action at this time.
0 commit comments