update setup files

Signed-off-by: Maciej Barć <xgqt@protonmail.com>
This commit is contained in:
Maciej Barć 2021-02-26 19:04:36 +01:00
parent be2d26bfd9
commit 962f26ae05
No known key found for this signature in database
GPG Key ID: 031C9FE65BED714A
3 changed files with 21 additions and 16 deletions

View File

@ -17,25 +17,22 @@ all:
@echo "To do user installation use target: install-user" @echo "To do user installation use target: install-user"
clean:
sh clean.sh
install-user: install-user:
python setup.py -v install --user python setup.py -v install --user
install-user-test: install-user-test:
python setup.py -v install --user test pip install --user .'[test]'
install-user-web: install-user-web:
python setup.py -v install --user web pip install --user .'[web]'
install: install-user install: install-user
clean:
sh clean.sh
uninstall: uninstall:
pip uninstall -v -y $(BIN) pip uninstall -v -y $(BIN)
distclean: clean uninstall
distclean: uninstall
distclean: clean

View File

@ -5,3 +5,5 @@ rm -drv build
rm -drv dist rm -drv dist
find . -name "*.egg*" -exec rm -drv {} \; find . -name "*.egg*" -exec rm -drv {} \;
find . -name "*__pycache__*" -exec rm -drv {} \; find . -name "*__pycache__*" -exec rm -drv {} \;
exit 0

View File

@ -1,18 +1,24 @@
#!/usr/bin/env python #!/usr/bin/env python
import re """
import sys Python setup script
from distutils import log """
try: try:
from setuptools import setup, Command from setuptools import setup, Command
except ImportError: except ImportError:
from distutils.core import setup, Command from distutils.core import setup, Command
from glob import glob from glob import glob
import os
from os.path import join, dirname
import io 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')) 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__.""" """Set python __version__ to our __version__."""
description = "hardcode scripts' version using VERSION from environment" description = "hardcode scripts' version using VERSION from environment"
user_options = [] # [(long_name, short_name, desc),] user_options = [] # [(long_name, short_name, desc),]
@ -114,7 +120,7 @@ setup(
# glob('man/*')), # glob('man/*')),
# ), # ),
cmdclass={ cmdclass={
'set_version': set_version, 'set_version': SetVersion,
}, },
tests_require=tests_require, tests_require=tests_require,
extras_require={ extras_require={