diff options
author | Ask Solem <ask@celeryproject.org> | 2012-05-21 16:13:37 +0100 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2012-05-21 16:13:37 +0100 |
commit | 8755cadc1aebb2571779433e327e15daef7595c3 (patch) | |
tree | 6ef836d85d5aa57da37fefbf568bf54b356f8e21 /setup.py | |
parent | ef0019190997d23e5d5e27b7857b344b57552919 (diff) | |
download | librabbitmq-8755cadc1aebb2571779433e327e15daef7595c3.tar.gz |
seutp.py install, now calls build
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -2,6 +2,7 @@ import os import sys from setuptools import setup, Extension, find_packages from distutils.command.build import build as _build +from distutils.command.install import install as _install # --with-librabbitmq=<dir>: path to librabbitmq package if needed @@ -73,15 +74,25 @@ class build(_build): def run(self): here = os.path.abspath(os.getcwd()) + H = lambda *x: os.path.join(here, *x) try: - os.chdir(os.path.join(here, "rabbitmq-c")) + os.chdir(H("rabbitmq-c")) if not os.path.isfile("config.h"): - os.system(os.path.join(here, "rabbitmq-c", "configure")) + print("- configure rabbitmq-c...") + os.system(H("rabbitmq-c", "configure")) + print("- make rabbitmq-c...") os.system(find_make()) finally: os.chdir(here) _build.run(self) + +class install(_install): + + def run(self): + build(self.distribution).run() + _install.run(self) + setup( name="pylibrabbitmq", version=version, @@ -94,7 +105,7 @@ setup( test_suite="nose.collector", zip_safe=False, packages=find_packages(exclude=['ez_setup', 'tests', 'tests.*']), - cmdclass={"build": build}, + cmdclass={"build": build, "install": install}, classifiers=[ "Development Status :: 3 - Alpha", "Operating System :: OS Independent", |