Use urlparse.parse_qs rather than deprecated cgi.parse_qs.
[jelmer/dulwich-libgit2.git] / setup.py
1 #!/usr/bin/python
2 # Setup file for bzr-git
3 # Copyright (C) 2008-2010 Jelmer Vernooij <jelmer@samba.org>
4
5 try:
6     from setuptools import setup, Extension
7 except ImportError:
8     from distutils.core import setup, Extension
9 from distutils.core import Distribution
10
11 dulwich_version_string = '0.5.1'
12
13 include_dirs = []
14 # Windows MSVC support
15 import sys
16 if sys.platform == 'win32':
17     include_dirs.append('dulwich')
18
19
20 class DulwichDistribution(Distribution):
21
22     def is_pure(self):
23         if self.pure:
24             return True
25
26     def has_ext_modules(self):
27         return not self.pure
28
29     global_options = Distribution.global_options + [
30         ('pure', None, 
31             "use pure (slower) Python code instead of C extensions")]
32
33     pure = False
34
35         
36 setup(name='dulwich',
37       description='Pure-Python Git Library',
38       keywords='git',
39       version=dulwich_version_string,
40       url='http://samba.org/~jelmer/dulwich',
41       download_url='http://samba.org/~jelmer/dulwich/dulwich-%s.tar.gz' % dulwich_version_string,
42       license='GPLv2 or later',
43       author='Jelmer Vernooij',
44       author_email='jelmer@samba.org',
45       long_description="""
46       Simple Pure-Python implementation of the Git file formats and
47       protocols. Dulwich is the place where Mr. and Mrs. Git live
48       in one of the Monty Python sketches.
49       """,
50       packages=['dulwich', 'dulwich.tests'],
51       scripts=['bin/dulwich', 'bin/dul-daemon', 'bin/dul-web'],
52       ext_modules = [
53           Extension('dulwich._objects', ['dulwich/_objects.c'],
54                     include_dirs=include_dirs),
55           Extension('dulwich._pack', ['dulwich/_pack.c'],
56               include_dirs=include_dirs),
57           ],
58       distclass=DulwichDistribution,
59       )