File: publish

package info (click to toggle)
python-sse-starlette 2.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 944 kB
  • sloc: python: 1,487; makefile: 134; sh: 57
file content (25 lines) | stat: -rwxr-xr-x 686 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh -e

export VERSION=`cat sse_starlette/__init__.py | grep __version__ | sed "s/__version__ = //" | sed "s/'//g"`
export PREFIX=""
if [ -d 'venv' ] ; then
    export PREFIX="venv/bin/"
fi

if ! command -v "${PREFIX}twine" &>/dev/null ; then
    echo "Unable to find the 'twine' command."
    echo "Install from PyPI, using '${PREFIX}pip install twine'."
    exit 1
fi

find sse_starlette -type f -name "*.py[co]" -delete
find sse_starlette -type d -name __pycache__ -delete

${PREFIX}python setup.py sdist
${PREFIX}twine upload dist/*

echo "You probably want to also tag the version now:"
echo "git tag -a ${VERSION} -m 'version ${VERSION}'"
echo "git push --tags"

rm -r dist