2 # vim: set fileencoding=utf-8 :
3 # Copyright (C) 2006-2011 Guido Günther <agx@sigxcpu.org>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 from setuptools import setup, find_packages
26 """Get version from debian changelog and write it to gbp/version.py"""
30 popen = subprocess.Popen('dpkg-parsechangelog', stdout=subprocess.PIPE)
31 out, ret = popen.communicate()
32 for line in out.split('\n'):
33 if line.startswith('Version:'):
34 version = line.split(' ')[1].strip()
37 pass # Failing is fine, we just can't print the version then
39 with open('gbp/version.py', 'w') as f:
40 f.write('"The current gbp version number"\n')
41 f.write('gbp_version="%s"\n' % version)
47 with open('README') as file:
51 version = fetch_version(),
52 author = u'Guido Günther',
53 author_email = 'agx@sigxcpu.org',
54 url = 'https://honk.sigxcpu.org/piki/projects/git-buildpackage/',
55 description = 'Suite to help with Debian packages in Git repositories',
57 long_description = readme(),
59 'Environment :: Console',
60 'Programming Language :: Python :: 2',
61 'Topic :: Software Development :: Version Control :: Git',
62 'Operating System :: POSIX :: Linux',
64 scripts = [ 'bin/git-buildpackage',
66 'bin/git-import-orig',
68 'bin/git-import-dscs',
72 'bin/gbp-create-remote-repo',
74 packages = find_packages(exclude=['tests', 'tests.*']),
75 data_files = [("/etc/git-buildpackage/", ["gbp.conf"]),],
76 setup_requires=['nose>=0.11.1', 'coverage>=2.85'] if \
77 os.getenv('WITHOUT_NOSETESTS') is None else [],
79 'console_scripts': [ 'gbp = gbp.scripts.supercommand:supercommand' ],