diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-02-18 17:39:44 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-02-18 17:39:44 +0100 |
commit | 9bfdbb1d569eea229fd9f10823891234c8676145 (patch) | |
tree | d12cc47a398d1c3684fc3a6709a55f959d085527 /pyk8055/setup.py | |
download | k8055-9bfdbb1d569eea229fd9f10823891234c8676145.zip k8055-9bfdbb1d569eea229fd9f10823891234c8676145.tar.gz |
initial commit, version 0.4.1 from http://sourceforge.net/projects/libk8055
Diffstat (limited to 'pyk8055/setup.py')
-rw-r--r-- | pyk8055/setup.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pyk8055/setup.py b/pyk8055/setup.py new file mode 100644 index 0000000..b1a1c85 --- /dev/null +++ b/pyk8055/setup.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +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 os.environ.has_key('VERSION'): + 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] + except: + version='?.?' + +build_modules = [Extension('_pyk8055', + define_macros = [('VERSION', "\"%s\"" % str(version))], + libraries=["usb"], + sources=['libk8055.i',"../libk8055.c"])] + +setup( + name='pyk8055', + version=version, + author='Pjetur G. Hjaltason', + author_email='pjetur@pjetur.net', + description='K8055 library wrapper', + url='http://libk8055.sourceforge.net/', + ext_modules =build_modules, + py_modules=['pyk8055'] +) |