Files
uwsgi/setup.py
T
roberto@sirius 5f285eef56 pip hack [2]
2010-05-01 07:29:07 +02:00

52 lines
1.0 KiB
Python

import os
import sys
import uwsgiconfig as uc
import shutil
from distutils.core import setup, Distribution
from distutils.command.install import install
from distutils.command.build_ext import build_ext
# hack for distutils/pip
try:
print sys.argv
sys.argv.remove('--single-version-externally-managed')
print sys.argv
except:
pass
class uWSGIBuilder(build_ext):
def run(self):
uc.parse_vars()
uc.build_uwsgi(sys.prefix + '/bin/' + uc.UWSGI_BIN_NAME)
class uWSGIInstall(install):
def run(self):
uc.parse_vars()
uc.build_uwsgi(sys.prefix + '/bin/' + uc.UWSGI_BIN_NAME)
class uWSGIDistribution(Distribution):
def __init__(self, *attrs):
Distribution.__init__(self, *attrs)
self.cmdclass['install'] = uWSGIInstall
self.cmdclass['build_ext'] = uWSGIBuilder
setup(name='uWSGI',
version='0.9.5',
description='The uWSGI server',
author='Unbit',
author_email='info@unbit.it',
url='http://projects.unbit.it/uwsgi/',
license='GPL2',
distclass = uWSGIDistribution,
)