From 3068d808d9862f47b3fb5f0c24fcbb2a02c9ae74 Mon Sep 17 00:00:00 2001 From: Peter Baumgartner Date: Mon, 10 Sep 2018 12:10:41 -0600 Subject: [PATCH 1/3] Publish as pyuwsgi not uWSGI --- setup.pyuwsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.pyuwsgi.py b/setup.pyuwsgi.py index 07cb3660bf..919b9f0c91 100644 --- a/setup.pyuwsgi.py +++ b/setup.pyuwsgi.py @@ -97,7 +97,7 @@ def uwsgi_build(self): setup( - name='uWSGI', + name='pyuwsgi', license='GPL2', version=uwsgiconfig.uwsgi_version, author='Unbit', From d053cd472f382c9bfdae352514a35f16cf77ea21 Mon Sep 17 00:00:00 2001 From: Peter Baumgartner Date: Mon, 10 Sep 2018 12:13:35 -0600 Subject: [PATCH 2/3] Install with entry_point It is recommended over scripts: https://packaging.python.org/guides/distributing-packages-using-setuptools/#scripts --- bin/pyuwsgi | 4 ---- setup.pyuwsgi.py | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) delete mode 100755 bin/pyuwsgi diff --git a/bin/pyuwsgi b/bin/pyuwsgi deleted file mode 100755 index e30bc84945..0000000000 --- a/bin/pyuwsgi +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python - -import pyuwsgi -pyuwsgi.run() diff --git a/setup.pyuwsgi.py b/setup.pyuwsgi.py index 919b9f0c91..39864cc9b2 100644 --- a/setup.pyuwsgi.py +++ b/setup.pyuwsgi.py @@ -112,5 +112,7 @@ def uwsgi_build(self): ext_modules=[ Extension(uWSGIBuildExt.UWSGI_NAME, sources=[]), ], - scripts=['bin/pyuwsgi'], + entry_points={ + 'console_scripts': ['pyuwsgi=%s:run' % uWSGIBuildExt.UWSGI_NAME], + }, ) From 639261bd2bf6970c17e3ff096f1279349a1af1bd Mon Sep 17 00:00:00 2001 From: Peter Baumgartner Date: Mon, 10 Sep 2018 12:19:57 -0600 Subject: [PATCH 3/3] Hard-code package name to pyuwsgi --- setup.pyuwsgi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.pyuwsgi.py b/setup.pyuwsgi.py index 39864cc9b2..a61b7ac9c5 100644 --- a/setup.pyuwsgi.py +++ b/setup.pyuwsgi.py @@ -110,9 +110,9 @@ def uwsgi_build(self): 'uwsgidecorators', ], ext_modules=[ - Extension(uWSGIBuildExt.UWSGI_NAME, sources=[]), + Extension('pyuwsgi', sources=[]), ], entry_points={ - 'console_scripts': ['pyuwsgi=%s:run' % uWSGIBuildExt.UWSGI_NAME], + 'console_scripts': ['pyuwsgi=pyuwsgi:run'], }, )