From 9b4839d95e2cac25ee282a2fa788812d967905d1 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Sep 20 2017 06:34:18 +0000 Subject: Install executables via entry_points Fix #134 Signed-off-by: Chenxiong Qi --- diff --git a/bin/fedpkg b/bin/fedpkg deleted file mode 100755 index bc2846d..0000000 --- a/bin/fedpkg +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/python -# fedpkg - a script to interact with the Fedora Packaging system -# -# Copyright (C) 2011 Red Hat Inc. -# Author(s): Jesse Keating -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. See http://www.gnu.org/copyleft/gpl.html for -# the full text of the license. - -from fedpkg.__main__ import main - -if __name__ == "__main__": - main() diff --git a/bin/fedpkg-stage b/bin/fedpkg-stage deleted file mode 100644 index b7bdb34..0000000 --- a/bin/fedpkg-stage +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/python -# fedpkg-stage - a script to interact with the Fedora Packaging system -# -# Copyright (C) 2016 Red Hat Inc. -# Author(s): Chenxiong Qi -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. See http://www.gnu.org/copyleft/gpl.html for -# the full text of the license. - -from fedpkg.__main__ import main - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/setup.py b/setup.py index 773b070..c1f755e 100755 --- a/setup.py +++ b/setup.py @@ -23,10 +23,6 @@ setup( license="GPLv2+", url="https://pagure.io/fedpkg", packages=find_packages(), - scripts=[ - 'bin/fedpkg', - 'bin/fedpkg-stage', - ], data_files=[(bash_completion_dir(), ['conf/bash-completion/fedpkg.bash']), ('/etc/rpkg', ['conf/etc/rpkg/fedpkg.conf', 'conf/etc/rpkg/fedpkg-stage.conf']), @@ -35,4 +31,11 @@ setup( tests_require=['nose', 'mock'], test_suite='nose.collector', + + entry_points={ + 'console_scripts': [ + 'fedpkg = fedpkg.__main__:main', + 'fedpkg-stage = fedpkg.__main__:main', + ], + } )