diff --git a/Makefile b/Makefile index 40b0e02..8dc62c3 100644 --- a/Makefile +++ b/Makefile @@ -17,25 +17,22 @@ all: @echo "To do user installation use target: install-user" -clean: - sh clean.sh - - install-user: python setup.py -v install --user install-user-test: - python setup.py -v install --user test + pip install --user .'[test]' install-user-web: - python setup.py -v install --user web + pip install --user .'[web]' install: install-user +clean: + sh clean.sh + uninstall: pip uninstall -v -y $(BIN) - -distclean: uninstall -distclean: clean +distclean: clean uninstall diff --git a/clean.sh b/clean.sh index 779ab86..c2be441 100755 --- a/clean.sh +++ b/clean.sh @@ -5,3 +5,5 @@ rm -drv build rm -drv dist find . -name "*.egg*" -exec rm -drv {} \; find . -name "*__pycache__*" -exec rm -drv {} \; + +exit 0 diff --git a/setup.py b/setup.py index 4c617a2..12d6701 100755 --- a/setup.py +++ b/setup.py @@ -1,18 +1,24 @@ #!/usr/bin/env python -import re -import sys -from distutils import log +""" +Python setup script +""" + + try: from setuptools import setup, Command except ImportError: from distutils.core import setup, Command from glob import glob -import os -from os.path import join, dirname import io +import os +import re +import sys + +from os.path import join, dirname +from distutils import log sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'pym')) @@ -33,7 +39,7 @@ python_scripts = [os.path.join(cwd, path) for path in ( )] -class set_version(Command): +class SetVersion(Command): """Set python __version__ to our __version__.""" description = "hardcode scripts' version using VERSION from environment" user_options = [] # [(long_name, short_name, desc),] @@ -114,7 +120,7 @@ setup( # glob('man/*')), # ), cmdclass={ - 'set_version': set_version, + 'set_version': SetVersion, }, tests_require=tests_require, extras_require={