From cc6169ac2238cf32fe120790c9fb639bfa2d4c96 Mon Sep 17 00:00:00 2001 From: Juergen Bocklage-Ryannel Date: Thu, 13 Jul 2017 13:53:10 +0200 Subject: Fixed some smaller issues with named filters and how the setup tools are working --- cli.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'cli.py') 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,15 +167,18 @@ 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() -- cgit v1.2.1