mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-10-03 15:38:36 +00:00
setup.py new try
This commit is contained in:
@@ -3,15 +3,23 @@ import sys
|
||||
import uwsgiconfig as uc
|
||||
import shutil
|
||||
|
||||
print "SETUP.PY"
|
||||
print sys.argv
|
||||
print "SETUP.PY"
|
||||
from distutils.core import setup, Distribution
|
||||
from distutils.command.install import install
|
||||
|
||||
from distutils.core import setup
|
||||
|
||||
uc.build_uwsgi(uc.UWSGI_BIN_NAME, uc.uver, uc.cflags, uc.ldflags)
|
||||
|
||||
shutil.copy(uc.UWSGI_BIN_NAME, sys.prefix + '/bin')
|
||||
class uWSGIInstall(install):
|
||||
|
||||
def run(self):
|
||||
uc.build_uwsgi(sys.prefix + '/bin/' + uc.UWSGI_BIN_NAME, uc.uver, uc.cflags, uc.ldflags)
|
||||
|
||||
class uWSGIDistribution(Distribution):
|
||||
|
||||
def __init__(self, *attrs):
|
||||
Distribution.__init__(self, *attrs)
|
||||
self.cmdclass['install'] = uWSGIInstall
|
||||
|
||||
|
||||
|
||||
setup(name='uWSGI',
|
||||
version='0.9.5',
|
||||
@@ -20,6 +28,7 @@ setup(name='uWSGI',
|
||||
author_email='info@unbit.it',
|
||||
url='http://projects.unbit.it/uwsgi/',
|
||||
license='GPL2',
|
||||
distclass = uWSGIDistribution,
|
||||
)
|
||||
|
||||
|
||||
|
||||
+3
-1
@@ -65,7 +65,9 @@ def build_uwsgi(bin_name, version, cflags, ldflags):
|
||||
print("*** error linking uWSGI ***")
|
||||
sys.exit(1)
|
||||
|
||||
print("*** uWSGI is ready, launch it with ./%s ***" % bin_name)
|
||||
if bin_name.find("/") < 0:
|
||||
bin_name = './' + bin_name
|
||||
print("*** uWSGI is ready, launch it with %s ***" % bin_name)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user