blob: 66c7cc95b12936a428c41173084e0ed6feaa4c0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
import os
import sys
import uwsgiconfig as uc
import shutil
from setuptools import setup
from setuptools.dist import Distribution
from setuptools.command.install import install
from setuptools.command.build_ext import build_ext
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):
# hack, hack and still hack. We need to find a solution for 0.9.6
if self.record:
record_file = open(self.record,'w')
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.6',
description='The uWSGI server',
author='Unbit',
author_email='info@unbit.it',
url='http://projects.unbit.it/uwsgi/',
license='GPL2',
distclass = uWSGIDistribution,
)
|