forked from infolabs/django-edw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
85 lines (76 loc) · 2.64 KB
/
Copy pathsetup.py
File metadata and controls
85 lines (76 loc) · 2.64 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from setuptools.command.install import install as st_install
import os
import shutil
try:
from pypandoc import convert
except ImportError:
def convert(filename, fmt):
with open(filename) as fd:
return fd.read()
class install(st_install):
def _post_install(self, lib_dir):
packages = ('edw', 'email_auth', 'social_extra')
backend_dir = os.path.join(lib_dir, 'backend')
if os.path.exists(backend_dir):
for package in packages:
src_dir = os.path.join(backend_dir, package)
dst_dir = os.path.join(lib_dir, package)
if os.path.exists(dst_dir):
shutil.rmtree(dst_dir)
shutil.copytree(src_dir, dst_dir, symlinks=True)
if os.path.exists(backend_dir):
shutil.rmtree(backend_dir)
def run(self):
st_install.run(self)
self.execute(self._post_install, (self.install_lib,),
msg="Running post install task")
CLASSIFIERS = [
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
]
setup(
author="InfoLabs LLC",
author_email="team@infolabs.ru",
name="django-edw",
version='0.2.0',
description="A RESTful Django Enterprise Data Warehouse",
long_description=convert('README.md', 'rst'),
url='https://bitbucket.org/info-labs/django-edw.git',
license='GPL v3 License',
platforms=['OS Independent'],
classifiers=CLASSIFIERS,
packages=find_packages(exclude=['docs', 'requirements']),
package_dir={
'edw': 'backend/edw',
'email_auth': 'backend/email_auth',
'social_extra': 'backend/social_extra',
},
include_package_data=True,
zip_safe=False,
cmdclass={'install': install},
install_requires=[
'Django>=1.9,<1.10',
'djangorestframework>=3.3',
'beautifulsoup4>=4.4.0',
'django-post-office>=2.0.5',
'django-filer>=1.0.6',
'django-fsm>=2.4.0',
'django-rest-auth>=0.5.0',
'django-select2>=5.5.0',
'djangorestframework-recursive==0.1.1',
'djangorestframework-filters==0.8.0',
'django-polymorphic==1.1',
'social-auth-app-django==2.1.0',
'M2Crypto==0.31.0',
],
)