summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2012-05-21 16:13:37 +0100
committerAsk Solem <ask@celeryproject.org>2012-05-21 16:13:37 +0100
commit8755cadc1aebb2571779433e327e15daef7595c3 (patch)
tree6ef836d85d5aa57da37fefbf568bf54b356f8e21 /setup.py
parentef0019190997d23e5d5e27b7857b344b57552919 (diff)
downloadlibrabbitmq-8755cadc1aebb2571779433e327e15daef7595c3.tar.gz
seutp.py install, now calls build
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index e3a4359..dc58a16 100644
--- a/setup.py
+++ b/setup.py
@@ -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",