Skip to content
Myr

publish

This file

Path

scripts/publish

35 lines · 942 bytes

Last changed by

Build and upload universal wheels to PyPI (#439)Josep Cugatbefore adoption9e1cc26

History of this file

Take it

The walk stopped after 200 commits: lines older than bb70377 point at it.

query_params -> paramsTom Christiebefore adoptionbb70377

lines 1–2why, one step back
1#!/bin/sh -e
2

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

line 3why, one step back
3export PACKAGE="httpx"

Minor tweaks in line with requests behavior (#110)Tom Christiebefore adoptionfe1f9ed

line 4why, one step back
4export VERSION=`cat ${PACKAGE}/__version__.py | grep __version__ | sed "s/__version__ = //" | sed "s/'//g"`

query_params -> paramsTom Christiebefore adoptionbb70377

lines 5–17why, one step back
5export PREFIX=""
6if [ -d 'venv' ] ; then7 export PREFIX="venv/bin/"8fi910scripts/clean1112if ! command -v "${PREFIX}twine" &>/dev/null ; then13 echo "Unable to find the 'twine' command."14 echo "Install from PyPI, using '${PREFIX}pip install twine'."15 exit 116fi17

Document the release process (#363)Florimond Mancabefore adoption1275246

lines 18–23why, one step back
18if ! command -v "${PREFIX}mkdocs" &>/dev/null ; then
19 echo "Unable to find the 'mkdocs' command."20 echo "Install from PyPI, using '${PREFIX}pip install mkdocs'."21 exit 122fi23

query_params -> paramsTom Christiebefore adoptionbb70377

lines 24–26why, one step back
24find ${PACKAGE} -type f -name "*.py[co]" -delete
25find ${PACKAGE} -type d -name __pycache__ -delete26

Build and upload universal wheels to PyPI (#439)Josep Cugatbefore adoption9e1cc26

line 27why, one step back
27${PREFIX}python setup.py sdist bdist_wheel

query_params -> paramsTom Christiebefore adoptionbb70377

line 28why, one step back
28${PREFIX}twine upload dist/*

Document the release process (#363)Florimond Mancabefore adoption1275246

line 29why, one step back
29${PREFIX}mkdocs gh-deploy

query_params -> paramsTom Christiebefore adoptionbb70377

lines 30–35why, one step back
30
31echo "You probably want to also tag the version now:"32echo "git tag -a ${VERSION} -m 'version ${VERSION}'"33echo "git push --tags"3435scripts/clean