summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2014-05-27 12:25:26 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2014-05-27 12:25:26 +0200
commitdb1c6723522198b0010d66130617fb43d1fe2469 (patch)
treef0a7b6470bfd01b1fdb9d86f9058891ccc70f902
parente941b47d50aff6039fd79cd922c5c158112d245b (diff)
downloadpysendfile-db1c6723522198b0010d66130617fb43d1fe2469.tar.gz
add a make command to git-tag a new release
-rw-r--r--Makefile8
-rw-r--r--setup.py5
2 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8981d6a..137e8ad 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,6 @@ clean:
rm -rf .tox
rm -rf build
rm -rf dist
- rm -rf docs/_build
build: clean
$(PYTHON) setup.py build
@@ -52,7 +51,10 @@ pyflakes:
flake8:
@git ls-files | grep \\.py$ | xargs flake8
-
-# Upload source tarball on https://pypi.python.org/pypi/pysendfile.
+# upload source tarball on https://pypi.python.org/pypi/pysendfile.
upload-src: clean
$(PYTHON) setup.py sdist upload
+
+# git-tag a new release
+git-tag-release:
+ git tag -a release-`python -c "import setup; print(setup.VERSION)"` -m `git rev-list HEAD --count`:`git rev-parse --short HEAD`
diff --git a/setup.py b/setup.py
index 6eb3e83..566067f 100644
--- a/setup.py
+++ b/setup.py
@@ -29,10 +29,10 @@ try:
except ImportError:
from distutils.core import setup, Extension
+
NAME = 'pysendfile'
VERSION = '2.0.1'
-
if sys.version_info < (2, 5):
sys.exit('python version not supported (< 2.5)')
@@ -82,4 +82,5 @@ def main():
sources=['sendfilemodule.c'],
libraries=libraries)])
-main()
+if __name__ == '__main__':
+ main()