setup.py 1.04 KB
Newer Older
1
import os
2
3
4
5
6
7
8
9
from setuptools import setup, find_packages
from pip.req import parse_requirements

install_reqs = parse_requirements('requirements.txt', session='hack')
# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
reqs = [str(ir.req) for ir in install_reqs]

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
if os.name == "posix":

    setup(
        name='dgenies',
        version='0.9',
        packages=find_packages('src'),
        package_dir={'dgenies': 'src/dgenies'},
        include_package_data=True,
        zip_safe=False,
        install_requires=reqs,
        data_files=[('/etc/dgenies', ['application.properties']),
                    ('/var/www/dgenies', ['dgenies.wsgi'])],
        scripts=['src/bin/dgenies'],
    )

else:

    setup(
        name='dgenies',
        version='0.9',
        packages=find_packages('src'),
        package_dir={'dgenies': 'src/dgenies'},
        include_package_data=True,
        zip_safe=False,
        install_requires=reqs,
        data_files=[('.dgenies', ['application.properties'])],
        scripts=['src/bin/dgenies'],
    )