summaryrefslogtreecommitdiff
path: root/cli.py
diff options
context:
space:
mode:
authorJuergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com>2017-07-13 13:53:10 +0200
committerJuergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com>2017-07-13 13:53:10 +0200
commitcc6169ac2238cf32fe120790c9fb639bfa2d4c96 (patch)
treeb7f8c9bfb1a0dd410c4a2120762212bcf9b3b080 /cli.py
parent62185cb8d52bba55a2e3eeb0da2a7597fffb0e1b (diff)
downloadqtivi-qface-cc6169ac2238cf32fe120790c9fb639bfa2d4c96.tar.gz
Fixed some smaller issues with named filters and how the
setup tools are working
Diffstat (limited to 'cli.py')
-rwxr-xr-xcli.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/cli.py b/cli.py
index 09863a2..39ca71a 100755
--- a/cli.py
+++ b/cli.py
@@ -14,13 +14,13 @@ import logging.config
from livereload import Server, shell
-here = os.path.dirname(__file__)
+here = Path(__file__).abspath().dirname()
-logging.config.dictConfig(yaml.load(open(os.path.join(here, 'log.yaml'))))
+logging.config.dictConfig(yaml.load((here / 'log.yaml').open()))
logger = logging.getLogger(__name__)
-os.environ['PYTHONPATH'] = os.getcwd()
+os.environ['PYTHONPATH'] = Path.getcwd()
def sh(cmd, all=False, **kwargs):
@@ -167,16 +167,19 @@ def uninstall():
@cli.command()
def upload():
- Path('build').rmtree_p()
- dist = Path('dist')
- dist.rmtree_p()
- dist.makedirs_p()
- sh('python3 setup.py bdist_wheel')
sh('twine upload dist/*')
Path('build').rmtree_p()
@cli.command()
+def pack():
+ Path('build').rmtree_p()
+ Path('dist').rmtree_p()
+ sh('python3 setup.py bdist_wheel')
+ sh('unzip -l dist/*.whl')
+
+
+@cli.command()
def docs_serve():
server = Server()
server.watch('docs/*.rst', shell('make html', cwd='docs'))