diff options
author | Sergey Shepelev <temotor@gmail.com> | 2020-05-20 15:32:51 +0300 |
---|---|---|
committer | Sergey Shepelev <temotor@gmail.com> | 2020-05-20 15:54:48 +0300 |
commit | 9fef207e85eef0534574d71fe1338c01874eba46 (patch) | |
tree | 4057dd8ffcb2f15627e880782e920d221aefc982 | |
parent | a1457cc31f3206cf691d11d2bf34e98865873e9e (diff) | |
download | httplib2-9fef207e85eef0534574d71fe1338c01874eba46.tar.gz |
pyproject.toml
package version in double quotes for black formatter
-rw-r--r-- | pyproject.toml | 5 | ||||
-rwxr-xr-x | script/release | 18 |
2 files changed, 14 insertions, 9 deletions
diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e8698a9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +requires = ["setuptools", "wheel"] + +[tool.black] +line-length = 121 diff --git a/script/release b/script/release index 0f98e3e..2403275 100755 --- a/script/release +++ b/script/release @@ -45,9 +45,9 @@ auto_prepare_release() { last_tag=$(git tag --sort=-version:refname |head -n1) last_tag=${last_tag##v} version_replace="${last_tag}.post$(date -u +%y%m%d%H%M)" - update_version "setup.py" "s/VERSION =.+/VERSION = '$version_replace'/" - update_version "python2/httplib2/__init__.py" "s/__version__ =.+/__version__ = '$version_replace'/" - update_version "python3/httplib2/__init__.py" "s/__version__ =.+/__version__ = '$version_replace'/" + update_version "setup.py" "s/VERSION =.+/VERSION = \"$version_replace\"/" + update_version "python2/httplib2/__init__.py" "s/__version__ =.+/__version__ = \"$version_replace\"/" + update_version "python3/httplib2/__init__.py" "s/__version__ =.+/__version__ = \"$version_replace\"/" version_check "$version_replace" fi } @@ -132,9 +132,9 @@ bump_version() { fi echo "Next version: '$version_next'" >&2 - update_version "python3/httplib2/__init__.py" "s/__version__ =.+/__version__ = '$version_next'/" - update_version "python2/httplib2/__init__.py" "s/__version__ =.+/__version__ = '$version_next'/" - update_version "setup.py" "s/VERSION =.+/VERSION = '$version_next'/" + update_version "python3/httplib2/__init__.py" "s/__version__ =.+/__version__ = \"$version_next\"/" + update_version "python2/httplib2/__init__.py" "s/__version__ =.+/__version__ = \"$version_next\"/" + update_version "setup.py" "s/VERSION =.+/VERSION = \"$version_next\"/" confirm "Confirm changes? [yN] " || exit 1 } @@ -142,8 +142,8 @@ bump_version() { update_version() { local path="$1" local sed_expr="$2" - # sed -E --in-place='' -e "s/VERSION =.+/VERSION = '$version_replace'/" setup.py - # sed -E --in-place='' -e "s/__version__ =.+/__version__ = '$version_replace'/" python2/httplib2/__init__.py python3/httplib2/__init__.py + # sed -E --in-place='' -e "s/VERSION =.+/VERSION = \"$version_replace\"/" setup.py + # sed -E --in-place='' -e "s/__version__ =.+/__version__ = \"$version_replace\"/" python2/httplib2/__init__.py python3/httplib2/__init__.py echo "Updating file '$path'" >&2 if ! sed -E --in-place='' -e "$sed_expr" "$path" ; then echo "sed error $?" >&2 @@ -209,7 +209,7 @@ assert_tree_clean() { version_check() { local need=$1 - local version_setup=$(fgrep 'VERSION =' setup.py |tr -d " '" |cut -d\= -f2) + local version_setup=$(fgrep 'VERSION =' setup.py |tr -d " '\"" |cut -d\= -f2) local version_py2=$(cd python2 ; python2 -Es -c 'import httplib2;print(httplib2.__version__)') local version_py3=$(cd python3 ; python3 -Es -c 'import httplib2;print(httplib2.__version__)') if [[ "$version_setup" != "$need" ]] ; then |