python/setup.py | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
New commits:
commit fab9a1a860bdad60df90e0eae66cd722e0b06650
Author: Sandro Bonazzola <sbonazzo(a)redhat.com>
Date: Fri Aug 9 17:07:30 2013 +0200
setup: aligned with rpm package
- set name, description and version to the same used by the
rpm package allowing commands like
pkg_resources.require('python-sanlock >= 2.8')
do the right thing.
- pep8 style fixes
diff --git a/python/setup.py b/python/setup.py
index 3adbdc9..efc7eff 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -7,13 +7,17 @@
from distutils.core import setup, Extension
sanlocklib = ['sanlock']
-sanlock = Extension(name = 'sanlock',
- sources = ['sanlock.c'],
- include_dirs = ['../src'],
- library_dirs = ['../src'],
- libraries = sanlocklib)
+sanlock = Extension(name='sanlock',
+ sources=['sanlock.c'],
+ include_dirs=['../src'],
+ library_dirs=['../src'],
+ libraries=sanlocklib)
-setup(name = 'Sanlock',
- version = '1.0',
- description = 'Sanlock python package',
- ext_modules = [sanlock])
+version = None
+with open('../VERSION') as f:
+ version = f.readline()
+
+setup(name='sanlock-python',
+ version=version,
+ description='Python bindings for the sanlock library',
+ ext_modules=[sanlock])
Show replies by date