diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2014-05-27 12:25:26 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2014-05-27 12:25:26 +0200 |
commit | db1c6723522198b0010d66130617fb43d1fe2469 (patch) | |
tree | f0a7b6470bfd01b1fdb9d86f9058891ccc70f902 | |
parent | e941b47d50aff6039fd79cd922c5c158112d245b (diff) | |
download | pysendfile-db1c6723522198b0010d66130617fb43d1fe2469.tar.gz |
add a make command to git-tag a new release
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | setup.py | 5 |
2 files changed, 8 insertions, 5 deletions
@@ -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` @@ -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() |