summaryrefslogtreecommitdiffstats
path: root/pyk8055/setup.py
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-02-20 01:35:47 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2011-02-20 01:35:47 +0100
commit48344a71caa1689e22ee33abf3b59d8903d35cad (patch)
tree1f404d6cab4b277d9f98ac1f4bb301dfccfadf17 /pyk8055/setup.py
parentbeaeb2c95856bb89f9aa4ac7b256d1526f60cde9 (diff)
downloadk8055-48344a71caa1689e22ee33abf3b59d8903d35cad.zip
k8055-48344a71caa1689e22ee33abf3b59d8903d35cad.tar.gz
add pyk8055, without install rules
Diffstat (limited to 'pyk8055/setup.py')
-rw-r--r--pyk8055/setup.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/pyk8055/setup.py b/pyk8055/setup.py
index b1a1c85..9b68581 100644
--- a/pyk8055/setup.py
+++ b/pyk8055/setup.py
@@ -5,27 +5,27 @@ 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']
+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]
- except:
- version='?.?'
+ 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"])]
-
+ define_macros = [('VERSION', "\"%s\"" % str(version))],
+ libraries=["usb"],
+ sources=['libk8055.i',"../libk8055/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']
+ 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']
)