ADDED build/upload-to-pypi Index: build/upload-to-pypi ================================================================== --- /dev/null +++ build/upload-to-pypi @@ -0,0 +1,46 @@ +#! /usr/bin/env bash + +target="$1" + +for command in twine python3 mktemp gzip tar fossil rm; do + if [ -z "$(command -v "${command}" 2>/dev/null)" ]; then + echo "error: Unable to find command \"${command}\"" >&2 + exit 1 + fi +done + +rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +workdir='' + +function cleanup() { + if [ -n "${workdir}" ]; then + workdir='' + cd / + rm -rf "${workdir}" + fi + + return +} +trap cleanup EXIT + +set -e + +workdir="$(mktemp -d)" + +cd "${rootdir}" + +fossil tarball current - --name '' | gzip -dc | ( + set -e + + cd "${workdir}" + + tar -vxf - + + python3 setup.py sdist bdist_wheel +) + +( + set -e + cd "${workdir}" + python3 -m twine upload --repository "${target:-testpypi}" dist/* +) Index: setup.py ================================================================== --- setup.py +++ setup.py @@ -2,12 +2,12 @@ with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( - name="lt8900_spi-rkeene", # Replace with your own username - version="0.9", + name="lt8900_spi", # Replace with your own username + version="1.0", author="Roy Keene", author_email="pypi@rkeene.org", description="Python interface to an LT8900 connected via SPI", long_description=long_description, long_description_content_type="text/markdown",