Browse Source

Added pipbuild

main
Jarrod Chesney 8 years ago
parent
commit
5a729fa439
2 changed files with 57 additions and 1 deletions
  1. +54
    -0
      pipbuild.sh
  2. +3
    -1
      setup.py

+ 54
- 0
pipbuild.sh View File

@@ -0,0 +1,54 @@
#!/usr/bin/env bash

PACKAGE="SOAPpy-py3"

set -o nounset
set -o errexit
#set -x

if [ -n "$(git status --porcelain)" ]; then
echo "There are uncomitted changes, please make sure all changes are comitted" >&2
exit 1
fi

if ! [ -f "setup.py" ]; then
echo "setver.sh must be run in the directory where setup.py is" >&2
exit 1
fi

VER="${1:?You must pass a version of the format 0.0.0 as the only argument}"

if git tag | grep -q "${VER}"; then
echo "Git tag for version ${VER} already exists." >&2
exit 1
fi

echo "Setting version to $VER"

# Update the setup.py
sed -i "s;^package_version.*=.*;package_version = '${VER}';" setup.py

## Update the package version
#sed -i "s;.*version.*;__version__ = '${VER}';" ${PACKAGE}/__init__.py

# Upload to test pypi
if [[ ${VER} == *"dev"* ]]; then
python setup.py sdist
git reset --hard

else
python setup.py sdist upload -r pypitest
# Reset the commit, we don't want versions in the commit
git commit -a -m "Updated to version ${VER}"

git tag ${VER}
git push
git push --tags
fi



echo "If you're happy with this you can now run :"
echo
echo "python setup.py sdist upload -r pypi"
echo

+ 3
- 1
setup.py View File

@@ -8,6 +8,8 @@ import os

from setuptools import setup, find_packages

package_version = '0.52.23'


def read(*rnames):
return "\n" + open(
@@ -22,7 +24,7 @@ long_description = "SOAPpy-py3 provides tools for building SOAP clients and serv
setup(
name="SOAPpy-py3",
provides=['SOAPpy'],
version='0.52.23', # Add 0.40.0 for the SOAPpy-py3 port
version=package_version, # Add 0.40.0 for the SOAPpy-py3 port
description="SOAP Services for Python",
maintainer="Synerty",
maintainer_email="contact@synerty.com",


Loading…
Cancel
Save