From fe03345e487b054af644a08684c5c2154910da48 Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Tue, 23 Jan 2018 16:07:16 -0500 Subject: [PATCH 1/3] Moves from `scripts` to `entry_points`. This likely breaks autocompletion. --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ac3196f..cc38048 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,11 @@ setup( 'pubs.templates', 'pubs.plugs', 'pubs.plugs.alias'], - scripts=['pubs/pubs'], + entry_points={ + 'console_scripts': [ + 'pubs=pubs.pubs_cmd:execute', + ], + }, install_requires=['pyyaml', 'bibtexparser', 'python-dateutil', 'requests', 'configobj', From ac536269e3e5719fe04ab54a0359dcb65498bcfe Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Tue, 23 Jan 2018 16:17:04 -0500 Subject: [PATCH 2/3] Removes script since unused with entry_points method --- pubs/pubs | 8 -------- 1 file changed, 8 deletions(-) delete mode 100755 pubs/pubs diff --git a/pubs/pubs b/pubs/pubs deleted file mode 100755 index 68fd3d7..0000000 --- a/pubs/pubs +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python -# -*- coding:utf-8 -*- -# PYTHON_ARGCOMPLETE_OK - -from pubs import pubs_cmd - - -pubs_cmd.execute() From 26f0b4dc04d0f8d275cd7b033319e2b58b841ff7 Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Thu, 25 Jan 2018 16:09:30 -0500 Subject: [PATCH 3/3] Adds argcomplete command to pubs_cmd so that is now used as entry-point. --- pubs/pubs_cmd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pubs/pubs_cmd.py b/pubs/pubs_cmd.py index 2edfd65..2018ef8 100644 --- a/pubs/pubs_cmd.py +++ b/pubs/pubs_cmd.py @@ -1,3 +1,5 @@ +# PYTHON_ARGCOMPLETE_OK + import sys import argparse import collections