From fab9a1a860bdad60df90e0eae66cd722e0b06650 Mon Sep 17 00:00:00 2001 From: Sandro Bonazzola Date: Feb 26 2014 17:50:26 +0000 Subject: 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])