forked from mayan-edms/Mayan-EDMS
-
Notifications
You must be signed in to change notification settings - Fork 67
/
setup.py
151 lines (136 loc) · 3.96 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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import mayan
PACKAGE_NAME = 'mayan-edms'
PACKAGE_DIR = 'mayan'
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
def fullsplit(path, result=None):
"""
Split a pathname into components (the opposite of os.path.join) in a
platform-neutral way.
"""
if result is None:
result = []
head, tail = os.path.split(path)
if head == '':
return [tail] + result
if head == path:
return result
return fullsplit(head, [tail] + result)
def find_packages(directory):
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir != '':
os.chdir(root_dir)
for dirpath, dirnames, filenames in os.walk(directory):
if not dirpath.startswith('mayan/media'):
# Ignore dirnames that start with '.'
if os.path.basename(dirpath).startswith('.'):
continue
if '__init__.py' in filenames:
packages.append('.'.join(fullsplit(dirpath)))
elif filenames:
data_files.append(
[
dirpath, [
os.path.join(dirpath, filename) for filename in filenames
]
]
)
return packages
install_requires = """
django==2.2.23
Pillow==7.1.2
PyPDF2==1.26.0
PyYAML==5.3.1
Whoosh==2.7.4
bleach==3.1.5
celery==4.4.7
django-activity-stream==0.8.0
django-celery-beat==2.0.0
django-colorful==1.3
django-cors-headers==3.2.1
django-formtools==2.2
django-mathfilters==1.0.0
django-model-utils==4.0.0
django-mptt==0.12.0
django-pure-pagination==0.3.0
django-qsstats-magic==1.1.0
django-solo==1.1.5
django-stronghold==0.4.0
django-widget-tweaks==1.4.8
djangorestframework==3.11.2
djangorestframework-recursive==0.1.2
drf-yasg==1.17.1
extract-msg==0.23.3
flanker==0.9.11
flex==6.14.1
furl==2.1.0
fusepy==3.0.1
gevent==20.4.0
graphviz==0.14
gunicorn==20.0.4
jsonschema==3.2.0
mock==4.0.2
node-semver==0.8.0
packaging==20.3
pycountry==20.7.3
pycryptodome==3.9.7
python-dateutil==2.8.1
python-magic==0.4.22
python_gnupg==0.4.6
pytz==2020.1
requests==2.25.1
sh==1.14.1
swagger-spec-validator==2.5.0
whitenoise==5.0.1
""".split()
with open(file='README.rst') as file_object:
readme = file_object.read()
with open(file='HISTORY.rst') as file_object:
history = file_object.read()
setup(
author='Roberto Rosario',
author_email='[email protected]',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Education',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
'Topic :: Communications :: File Sharing',
],
description=mayan.__description__,
include_package_data=True,
install_requires=install_requires,
license='Apache 2.0',
long_description=readme + '\n\n' + history,
name=PACKAGE_NAME,
packages=find_packages(PACKAGE_DIR),
platforms=['any'],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
scripts=['mayan/bin/mayan-edms.py'],
url='https://gitlab.com/mayan-edms/mayan-edms',
version=mayan.__version__,
zip_safe=False,
)