diff options
author | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2010-02-17 16:28:17 +0000 |
---|---|---|
committer | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2010-02-17 16:28:17 +0000 |
commit | 18191c43943661b2d61b191ea95a9c9351bd465c (patch) | |
tree | dd426874c830ec029dbd44eec4e469131d4fadc9 /setup.py | |
parent | 494f1de1db6c29a3f5f6d0e5cabc29b86eaf99e8 (diff) | |
download | sos-18191c43943661b2d61b191ea95a9c9351bd465c.tar.gz |
- moved 1.9 to trunkr1.9
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@778 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..d7e13180 --- /dev/null +++ b/setup.py @@ -0,0 +1,64 @@ +#!/usr/bin/python +""" +setup.py - Setup package with the help from Python's DistUtils +""" + +try: + from setuptools import setup, find_packages +except ImportError: + from ez_setup import use_setuptools + from setuptools import setup, find_packages + +import glob +import os + +data_files = [ ('/etc', [ 'sos.conf']), + ('/usr/sbin', ['sosreport', 'extras/sysreport/sysreport.legacy']), + ('/usr/bin', ['extras/rh-upload']), + ('/usr/share/sos/',['gpgkeys/rhsupport.pub']), + ('/usr/share/sysreport', ['extras/sysreport/text.xsl', 'extras/sysreport/functions', 'extras/sysreport/sysreport-fdisk']), + ('/usr/share/man/man1', ['sosreport.1.gz']), + ] + +lang_files = glob.glob('po/*/sos.mo') +for i18n in lang_files: + topdir, basedir, fname = i18n.split('/') + data_files.append(('/usr/share/locale/%s/LC_MESSAGES' % (basedir,) , [i18n])) + +test_sub_dirs = [] +def test_files_add(dir='test',test_dir='/usr/share/sos'): + """ test file dir addition """ + test_sub_dirs.append(dir) + for root, dirs, fname in os.walk(dir): + if '.svn' in dirs: + dirs.remove('.svn') + for name in dirs: + test_sub_dirs.append(os.path.join(dir,name)) + for dr in test_sub_dirs: + files = os.listdir(dr) + for f in files: + if os.path.isfile(os.path.join(dr,f)): + data_files.append((os.path.join(test_dir,dr),[os.path.join(dr,f)])) + + +test_files_add() + +test_requirements = ['nose >= 0.10'] + +setup( + name = 'sos', + version = '1.9', + author = 'Adam Stokes', + author_email = 'ajs@redhat.com', + url = 'http://fedorahosted.org/sos', + description = 'SOS - son of sysreport', + packages = find_packages(exclude=['test*']), + include_package_data = True, + data_files = data_files, + test_suite = "test", + tests_require = test_requirements, + extras_require = { + 'docs' : ['sphinx >= 0.5'], + }, +) + |