d4abc962b1835f89d5b268556bb4dbc4e907aa8f
[fnpdeploy.git] / setup.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 #
4 import os
5 from setuptools import setup, find_packages
6 import sys
7
8
9 # Fabric needs Python 2.
10 if sys.version_info[0] > 2:
11     from subprocess import check_call
12
13     ve = os.environ.get('VIRTUAL_ENV')
14     if not ve:
15         print('Not in virtualenv!')
16         sys.exit()
17     subve = os.path.join(ve, 'fnpdeploy_ve')
18     check_call(['virtualenv', '--python', '/usr/bin/python2.7', subve])
19     check_call([os.path.join(subve, 'bin/python')] + sys.argv)
20
21     install_requires = []
22     packages = []
23     package_data = {}
24     scripts = ['bin/fab']
25 else:
26     packages = ['fnpdeploy']
27     package_data = {
28         'fnpdeploy': ['templates/*.template'],
29         }
30     scripts = ['bin/git-archive-all.sh']
31     install_requires = ['Fabric']
32
33
34 setup(
35     name='fnpdeploy',
36     version='0.1',
37     author='Radek Czajka',
38     author_email='radekczajka@nowoczesnapolska.org.pl',
39     url = '',
40     packages=packages,
41     package_data=package_data,
42     scripts=scripts,
43     install_requires=install_requires,
44     test_suite='nose.collector',
45     tests_require=['nose'],
46     license='LICENSE',
47     description='.',
48     long_description="",
49 )