forked from rmoorman/django-elfinder
/
setup.py
46 lines (35 loc) · 1.34 KB
/
setup.py
1
2
3
4
5
6
7
8
9
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
38
39
40
41
42
43
44
45
46
# econding=utf8
import os
from distutils.command.build import build
from setuptools.command.egg_info import egg_info
from setuptools import setup, find_packages
from subprocess import check_call
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
README = read('README.rst')
def git_checkout_submodules():
if os.path.exists('.git'):
check_call(['git', 'submodule', 'init'])
check_call(['git', 'submodule', 'update'])
class build_with_submodules(build):
def run(self):
git_checkout_submodules()
build.run(self)
class egg_info_with_submodules(egg_info):
def run(self):
git_checkout_submodules()
egg_info.run(self)
setup(
cmdclass={"build": build_with_submodules, "egg_info": egg_info_with_submodules},
name = 'django-elfinder',
version = '0.3-ext',
description = 'Django connector for elFinder 2 - with support for FS storage and TinyMCE connector',
long_description = README,
author = 'Martin Bohacek',
author_email = 'bohacekm@gmail.com',
url = 'https://github.com/bohyn/django-elfinder/',
download_url = 'https://github.com/bohyn/django-elfinder/tarball/v0.3-ext',
packages = ['elfinder', 'elfinder.volume_drivers'],
include_package_data=True,
requires = ['django (>=1.3)', 'mptt (>=0.5.2)'],
)