build Py wheel with alternate name in testing forks

This commit is contained in:
Kenneth Bingham 2023-12-14 18:03:58 -05:00
parent 417d6273ec
commit 96e5e145d0
No known key found for this signature in database
GPG Key ID: 31709281860130B6
3 changed files with 14 additions and 7 deletions

2
.flake8 Normal file
View File

@ -0,0 +1,2 @@
[flake8]
max-line-length = 120

View File

@ -35,6 +35,7 @@ jobs:
- name: Build distro - name: Build distro
env: env:
ZROK_VERSION: ${{ github.event.release.tag_name }} ZROK_VERSION: ${{ github.event.release.tag_name }}
ZROK_PY_NAME: ${{ vars.ZROK_PY_NAME || null }}
run: | run: |
python setup.py sdist python setup.py sdist

View File

@ -1,16 +1,20 @@
from setuptools import setup, find_packages # noqa: H301
import os import os
NAME = "zrok_sdk" from setuptools import find_packages, setup # noqa: H301
VERSION = "0.4.0.dev"
try: # optionally upload to TestPyPi with alternative name in testing repo
VERSION = os.environ['ZROK_VERSION'] NAME = os.getenv('ZROK_PY_NAME', "zrok_sdk")
except KeyError: # inherit zrok version from environment or default to dev version
pass VERSION = os.getenv('ZROK_VERSION', "0.4.0.dev")
# To install the library, run the following # To install the library, run the following
# #
# python setup.py install # python setup.py install
# #
# or
#
# pip install --editable .
#
# prerequisite: setuptools # prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools # http://pypi.python.org/pypi/setuptools