diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-05 08:35:13 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-05 08:35:13 +0200 |
commit | 29c26448113c49a2133ff1410f242bf1aeb6e1dc (patch) | |
tree | c69e0e33c1eb165a55d7a1e72b7e4bcd316a5bcf /pyk8055/setup.py | |
parent | 30dea17ddcc49e3fd3956dcf35232f8cfd4249d1 (diff) | |
download | k8055-29c26448113c49a2133ff1410f242bf1aeb6e1dc.zip k8055-29c26448113c49a2133ff1410f242bf1aeb6e1dc.tar.gz |
fix pyk8055/setup.py
Diffstat (limited to 'pyk8055/setup.py')
-rw-r--r-- | pyk8055/setup.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pyk8055/setup.py b/pyk8055/setup.py index 9b68581..a59e981 100644 --- a/pyk8055/setup.py +++ b/pyk8055/setup.py @@ -3,20 +3,23 @@ import os,sys,string from distutils.core import setup, Extension -__revision__ = "$Id: setup.py,v 1.3 2007/03/28 10:17:57 pjetur Exp $" - if 'VERSION' in os.environ: version=os.environ['VERSION'] else: from subprocess import * try: - version = Popen(["grep ^VERSION ../Makefile | cut -d '=' -f 2 | tr -d '\n'"], stdout=PIPE, shell=True).communicate()[0] + major = Popen(["grep '(VERSION_MAJOR' ../CMakeLists.txt | cut -d '\"' -f 2 | tr -d '\n'"], stdout=PIPE, shell=True).communicate()[0] + minor = Popen(["grep '(VERSION_MINOR' ../CMakeLists.txt | cut -d '\"' -f 2 | tr -d '\n'"], stdout=PIPE, shell=True).communicate()[0] + patch = Popen(["grep '(VERSION_PATCH' ../CMakeLists.txt | cut -d '\"' -f 2 | tr -d '\n'"], stdout=PIPE, shell=True).communicate()[0] + version = "%s.%s.%s" % (major,minor,patch) except: version='?.?' build_modules = [Extension('_pyk8055', define_macros = [('VERSION', "\"%s\"" % str(version))], libraries=["usb"], + extra_compile_args=['-std=c99'], + include_dirs=["/usr/include/libusb-1.0","/usr/local/include/libusb-1.0"], sources=['libk8055.i',"../libk8055/libk8055.c"])] setup( |