File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,16 +20,15 @@ jobs:
2020 - name : Set up Python
2121 uses : actions/setup-python@v2
2222 with :
23- python-version : ' 3.x'
23+ python-version : " 3.x"
2424 - name : Install Python dependencies
2525 run : |
2626 python -m pip install --upgrade pip
27- pip install -U setuptools wheel twine
27+ pip install -U -r requirements_release.txt
2828 - name : Build and publish release
2929 env :
3030 TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
3131 TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
3232 run : |
33- if [ -z ${{ github.event.inputs.version }} ]; then VERSION=${{ github.event.release.tag_name }}; else VERSION=${{ github.event.inputs.version }}; fi
34- python setup.py sdist bdist_wheel $VERSION
35- twine upload dist/*
33+ python setup.py sdist bdist_wheel
34+ twine upload dist/*
Original file line number Diff line number Diff line change 1- requests
1+ requests >= 2.32.3
Original file line number Diff line number Diff line change 1+ setuptools >= 74.1.0
2+ setuptools_git_versioning >= 2.0.0
3+ twine >= 5.1.1
4+ wheel >= 0.44.0
Original file line number Diff line number Diff line change 1- import sys
2- from setuptools import setup
1+ import setuptools
32from pathlib import Path
43
54# read the contents of your README file
65current_directory = Path (__file__ ).parent
76long_description = (current_directory / "README.md" ).read_text ()
87
9- version = sys .argv [3 :]
10- if version :
11- version = str (version [0 ])
12- sys .argv .remove (version )
13- else :
14- raise Exception ("Version is not set" )
15-
16- setup (
8+ setuptools .setup (
179 name = "ThermiaOnlineAPI" ,
1810 packages = [
1911 "ThermiaOnlineAPI" ,
2214 "ThermiaOnlineAPI.model" ,
2315 "ThermiaOnlineAPI.utils" ,
2416 ],
25- version = version ,
17+ setuptools_git_versioning = {
18+ "enabled" : True ,
19+ "dev_template" : "{tag}" ,
20+ },
2621 license = "GPL-3.0" ,
2722 description = "A Python API for Thermia heat pumps using https://online.thermia.se" ,
2823 long_description = long_description ,
3328 download_url = "https://github.com/klejejs/python-thermia-online-api/releases" ,
3429 keywords = ["Thermia" , "Online" ],
3530 install_requires = [],
31+ setup_requires = ["setuptools-git-versioning" ],
3632 classifiers = [],
3733)
You can’t perform that action at this time.
0 commit comments