added some functionality for versioned release process

This commit is contained in:
2012-10-01 15:49:24 +02:00
parent d5311440f2
commit 7f357e7a59
6 changed files with 41 additions and 3 deletions
+5 -1
View File
@@ -1,4 +1,3 @@
*~
*.py[cod]
# C extensions
@@ -14,3 +13,8 @@ sdist
# Installer logs
pip-log.txt
# editor files
*~
.ropeproject
+4
View File
@@ -0,0 +1,4 @@
include bin/ldapuserdir-ctl
include etc/ldapuserdir-ctl.cfg
recursive-include ldapuserdir
+11 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/python
import logging
from ldapuserdir import LdapUserDir
from ldapuserdir import LdapUserDir, __version__ as libversion
import ldap
import sys
import os
@@ -175,6 +175,12 @@ parser.add_option('--no-msSFU',
help = 'do not restrict to entries with unix (msSFU) mappings',
default = False
)
parser.add_option('-V',
action = 'store_true',
dest = 'flag_version',
help = 'show version information',
default = False
)
(options, args) = parser.parse_args()
@@ -187,6 +193,10 @@ if len(args) > 0:
if options.flag_debug:
ch.setLevel(logging.DEBUG)
if options.flag_version:
sys.stdout.write('Library version: ' + libversion + '\n')
sys.exit(0)
cfgfile = None
if(options.cfgfile != ''):
cfgfile = options.cfgfile
+1
View File
@@ -1 +1,2 @@
from ldapuserdir import LdapUserDir
from version import __version__
-1
View File
@@ -4,7 +4,6 @@
#
# Author: Derek Feichtinger <derek.feichtinger@psi.ch>
#
# Version info: $Id: ldapgroupmng.py 65 2012-09-25 15:35:38Z feichtinger $
######################################################################
""" This module provides the LdapUserDir class. It is used to interact
+20
View File
@@ -0,0 +1,20 @@
[build]
/usr/bin/python
[install]
prefix=/usr
[bdist_rpm]
Release=1.el6
Group=Applications/Internet
Vendor=PSI
Packager=Derek Feichtinger
#Provides
Requires=python-ldap
License=PSI
#Conflicts
#Obsoletes
#Distribution
#BuildRequires
#Icon