Project

General

Profile

Download (1.71 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / setup.py @ 919fe94c

1 111b2d34 Benjamin Dauvergne
#!/usr/bin/python
2
from setuptools import setup, find_packages
3
import os
4
5 92aecf93 Jérôme Schneider
def get_version():
6 75f0588d Jérôme Schneider
    from calebasse import __version__
7
    version = __version__
8 92aecf93 Jérôme Schneider
    if os.path.exists('.git'):
9
        import subprocess
10 d009115d Jérôme Schneider
        p = subprocess.Popen(['git','describe','--dirty','--match=v*'],
11 92aecf93 Jérôme Schneider
                stdout=subprocess.PIPE)
12
        result = p.communicate()[0]
13
        assert p.returncode == 0, 'git returned non-zero'
14 d009115d Jérôme Schneider
        new_version = result.split()[0][1:]
15 92aecf93 Jérôme Schneider
        assert new_version.split('-')[0] == version, '__version__ must match the last git annotated tag'
16
        version = new_version.replace('-', '.')
17
    return version
18
19
20 333a39ca Benjamin Dauvergne
setup(name='calebasse',
21 92aecf93 Jérôme Schneider
        version=get_version(),
22 111b2d34 Benjamin Dauvergne
        license='AGPLv3',
23
        description='',
24 333a39ca Benjamin Dauvergne
        url='http://dev.entrouvert.org/projects/calebasse/',
25
        download_url='http://repos.entrouvert.org/calebasse.git/',
26 111b2d34 Benjamin Dauvergne
        author="Entr'ouvert",
27
        author_email="info@entrouvert.com",
28
        packages=find_packages(os.path.dirname(__file__) or '.'),
29
        install_requires=[
30 37ddb00d Jérôme Schneider
            'Django >= 1.5, < 1.6',
31 a9efa997 Jérôme Schneider
            'south >= 0.8.4',
32 96fa15ac Jérôme Schneider
            'django-reversion == 1.6.6',
33
            'python-dateutil >= 2.2, < 2.3',
34
            'django-model-utils >= 1.5.0',
35 7b28c0b2 Benjamin Dauvergne
            'django-ajax-selects < 1.3.0',
36 7f9269be Benjamin Dauvergne
            'django-widget-tweaks < 1.2.0',
37 96fa15ac Jérôme Schneider
            'django-tastypie == 0.9.14',
38 78bae9a3 Jérôme Schneider
            'django-select2 < 4.3',
39 7a0a30d7 Benjamin Dauvergne
            'interval == 1.0.0',
40 8e6a3c86 Serghei MIHAI
            'python-entrouvert >= 1.3',
41 7b955828 Serghei MIHAI
            'django-localflavor',
42 37ddb00d Jérôme Schneider
            'xhtml2pdf',
43
            'M2Crypto',
44 8e6a3c86 Serghei MIHAI
            'django_journal',
45 111b2d34 Benjamin Dauvergne
        ],
46
        dependency_links = [
47
            'http://django-swingtime.googlecode.com/files/django-swingtime-0.2.1.tar.gz#egg=django-swingtime-0.2.1',
48
        ],
49
)