This repository has been archived by the owner on Jan 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
setup.py
354 lines (325 loc) · 11.7 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# Invenio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Invenio; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
"""Invenio is a framework for digital libraries and data repositories.
Invenio enables you to run your own digital library or document
repository on the web. Invenio covers all aspects of digital library
management, from document ingestion, through classification, indexing
and further processing, to curation, archiving, and dissemination.
The flexibility and performance of Invenio make it a comprehensive
solution for management of document repositories of moderate to large
sizes (several millions of records).
Links
-----
* `website <http://invenio-software.org/>`_
* `documentation <http://invenio.readthedocs.org/en/latest/>`_
* `development <https://github.com/inveniosoftware/invenio>`_
"""
import os
import sys
from distutils.command.build import build
from setuptools import find_packages, setup
from setuptools.command.install_lib import install_lib
class _build(build): # noqa
"""Compile catalog before building the package."""
sub_commands = [('compile_catalog', None)] + build.sub_commands
class _install_lib(install_lib): # noqa
"""Custom install_lib command."""
def run(self):
"""Compile catalog before running installation command."""
install_lib.run(self)
self.run_command('compile_catalog')
install_requires = [
"alembic>=0.6.6,<0.7",
"Babel>=1.3",
"bagit>=1.5.1",
"BeautifulSoup>=3.2.1",
"BeautifulSoup4>=4.3.2",
"celery>=3.1.8",
# Cerberus>=0.7.1 api changes and is not yet supported
"Cerberus>=0.7,<0.7.1",
"chardet>=2.3.0",
"datacite>=0.1.0",
"dictdiffer>=0.0.3",
"feedparser>=5.1",
"fixture>=1.5",
"Flask>=0.10.1",
"Flask-Admin>=1.0.9",
"Flask-Assets>=0.10",
"Flask-Babel>=0.9",
"Flask-Breadcrumbs>=0.2",
"Flask-Cache>=0.12",
"Flask-Collect>=1.1.1",
"Flask-Email>=1.4.4",
"Flask-Gravatar>=0.4.2",
"Flask-Login>=0.2.7",
"Flask-Menu>=0.2",
"Flask-OAuthlib>=0.6.0,<0.7", # quick fix for issue #2158
"Flask-Principal>=0.4",
"Flask-Registry>=0.2",
"Flask-RESTful>=0.2.12",
"Flask-Script>=2.0.5",
# Development version is used, will switch to >=2.0 once released.
"Flask-SQLAlchemy>=2.0",
"Flask-WTF>=0.10.2",
"fs>=0.4",
"idutils>=0.1.0",
"intbitset>=2.0",
"invenio-client>=0.1.0",
"jellyfish>=0.3.2",
"Jinja2>=2.7",
"libmagic>=1.0",
"lxml>=3.3",
"mechanize>=0.2.5",
"mistune>=0.4.1",
"msgpack-python>=0.3",
"MySQL-python>=1.2.5",
"numpy>=1.7",
"nydus>=0.10.8",
# pyparsing>=2.0.2 has a new api and is not compatible yet
"pyparsing>=2.0.1,<2.0.2",
"python-twitter>=2.0",
"pyPDF>=1.13",
"pyPDF2>=1.17",
"PyLD>=0.5.2",
"pyStemmer>=1.3",
"python-dateutil>=1.5",
"python-magic>=0.4.6",
"pytz>=2014.1",
"rauth>=0.7.0",
"raven>=5.0.0",
"rdflib>=4.1.2",
"redis>=2.8.0",
"reportlab>=2.7,<3.2",
"requests>=2.3,<2.4",
"setuptools>=2.2",
"six>=1.7.2",
"Sphinx>=1.3",
"SQLAlchemy>=0.9.9,<1.0",
"SQLAlchemy-Utils[encrypted]>=0.28.2,<0.30",
"unidecode>=0.04.1",
"workflow>=1.2.0,<2.0.0",
"WTForms>=2.0.1",
"WTForms-Alchemy>=0.12.6,<0.13.1",
"WTForms-SQLAlchemy>=0.1"
]
extras_require = {
"docs": [
"sphinx_rtd_theme>=0.1.7"
],
"development": [
"Flask-DebugToolbar==0.9.0",
"watchdog==0.8.3",
],
"dropbox": [
"dropbox>=2.1.0"
],
"elasticsearch": [
"pyelasticsearch>=0.6.1"
],
"googledrive": [
"google-api-python-client>=1.2",
"apiclient>=1.0.0",
"oauth2client>=1.4.0",
"urllib3>=1.8.3"
],
"iiif": [
"Flask-IIIF>=0.2.0",
],
"img": [
"qrcode>=5.1",
"Pillow>=2.7.0"
],
"mongo": [
"pymongo>=3.0"
],
"misc": [ # was requirements-extras
"gnuplot-py==1.8",
"flake8>=2.0.0", # extra=kwalitee?
"pychecker==0.8.19", # extra=kwalitee?
"pylint>=1.4.0", # extra=kwalitee?
"nosexcover>=1.0.0", # test?
"python-onedrive>=15.0.0", # extra=cloud?
"python-openid>=2.2.0", # extra=sso?
],
"mixer": [
"mixer>=5.1.0",
],
"sso": [
"Flask-SSO>=0.2"
],
"postgresql": [
"psycopg2>=2.5",
],
# Alternative XML parser
#
# For pyRXP, the version on PyPI many not be the right one.
#
# $ pip install
# > https://www.reportlab.com/ftp/pyRXP-1.16-daily-unix.tar.gz#egg=pyRXP
#
"pyrxp": [
# Any other versions are not supported.
"pyRXP==1.16-daily-unix"
],
"rabbitmq": [
"amqp>=1.4.5",
],
"github": [
"github3.py>=0.9"
],
}
extras_require["docs"] += extras_require["elasticsearch"]
extras_require["docs"] += extras_require["img"]
extras_require["docs"] += extras_require["mongo"]
extras_require["docs"] += extras_require["sso"]
extras_require["docs"] += extras_require["github"]
# FIXME extras_require["docs"] += extras_require["dropbox"]
# FIXME extras_require["docs"] += extras_require["googledrive"]
tests_require = [
"httpretty>=0.8.4",
"Flask-Testing>=0.4.1",
"mock>=1.0.0",
"nose>=1.3.0",
"selenium>=2.45.0",
"unittest2>=0.5",
]
setup_requires = [
'Babel>=1.3',
]
# Add `tests` dependencies to `extras_require` so that developers
# could install test dependencies also with pip:
extras_require["tests"] = tests_require
# Compatibility with Python 2.6
if sys.version_info < (2, 7):
install_requires += [
"argparse>=1.3.0",
"importlib>=1.0.0"
]
# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join("invenio", "version.py"), "rt") as fp:
exec(fp.read(), g)
version = g["__version__"]
packages = find_packages(exclude=['docs'])
packages.append('invenio_docs')
setup(
name='invenio',
version=version,
url='https://github.com/inveniosoftware/invenio',
license='GPLv2',
author='CERN',
author_email='[email protected]',
description='Invenio digital library framework',
long_description=__doc__,
packages=packages,
package_dir={'invenio_docs': 'docs'},
include_package_data=True,
zip_safe=False,
platforms='any',
entry_points={
'console_scripts': [
'inveniomanage = invenio.base.manage:main',
'plotextractor = invenio.utils.scripts.plotextractor:main',
# Legacy
'alertengine = invenio.legacy.webalert.scripts.alertengine:main',
'batchuploader = invenio.legacy.bibupload.scripts.batchuploader',
'bibcheck = invenio.legacy.bibcheck.scripts.bibcheck:main',
'bibcircd = invenio.legacy.bibcirculation.scripts.bibcircd:main',
'bibauthorid = '
' invenio.legacy.bibauthorid.scripts.bibauthorid:main',
'bibcatalog = invenio.legacy.bibcatalog.scripts.bibcatalog:main',
'bibclassify = invenio.modules.classifier.scripts.classifier:main',
'bibconvert = invenio.legacy.bibconvert.scripts.bibconvert:main',
'bibdocfile = invenio.legacy.bibdocfile.scripts.bibdocfile:main',
'bibedit = invenio.legacy.bibedit.scripts.bibedit:main',
'bibencode = invenio.modules.encoder.scripts.encoder:main',
'bibexport = invenio.legacy.bibexport.scripts.bibexport:main',
'bibindex = invenio.legacy.bibindex.scripts.bibindex:main',
'bibmatch = invenio.legacy.bibmatch.scripts.bibmatch:main',
'bibrank = invenio.legacy.bibrank.scripts.bibrank:main',
'bibrankgkb = invenio.legacy.bibrank.scripts.bibrankgkb:main',
'bibreformat = invenio.legacy.bibformat.scripts.bibreformat:main',
'bibsort = invenio.legacy.bibsort.scripts.bibsort:main',
'bibsched = invenio.legacy.bibsched.scripts.bibsched:main',
'bibstat = invenio.legacy.bibindex.scripts.bibstat:main',
'bibtaskex = invenio.legacy.bibsched.scripts.bibtaskex:main',
'bibtasklet = invenio.legacy.bibsched.scripts.bibtasklet:main',
'bibtex = invenio.modules.sequencegenerator.scripts.bibtex:main',
'bibupload = invenio.legacy.bibupload.scripts.bibupload:main',
'convert_journals = '
' invenio.legacy.docextract.scripts.convert_journals:main',
'dbexec = invenio.legacy.miscutil.scripts.dbexec:main',
'dbdump = invenio.legacy.miscutil.scripts.dbdump:main',
'docextract = invenio.legacy.docextract.scripts.docextract:main',
'elmsubmit = invenio.legacy.elmsubmit.scripts.elmsubmit:main',
'gotoadmin = invenio.modules.redirector.scripts.redirector:main',
'hepdataharvest = '
' invenio.utils.hepdata.scripts.hepdataharvest:main',
'inveniocfg = invenio.legacy.inveniocfg:main',
'inveniogc = invenio.legacy.websession.scripts.inveniogc:main',
'inveniounoconv = '
' invenio.legacy.websubmit.scripts.inveniounoconv:main',
'oaiharvest = invenio.legacy.oaiharvest.scripts.oaiharvest:main',
'oairepositoryupdater = '
' invenio.legacy.oairepository.scripts.oairepositoryupdater:main',
'arxiv-pdf-checker = invenio.legacy.pdfchecker:main',
'refextract = invenio.legacy.refextract.scripts.refextract:main',
'textmarc2xmlmarc = '
' invenio.legacy.bibrecord.scripts.textmarc2xmlmarc:main',
'webaccessadmin = '
' invenio.modules.access.scripts.webaccessadmin:main',
'webauthorprofile = '
' invenio.legacy.webauthorprofile.scripts.webauthorprofile:main',
'webcoll = invenio.legacy.websearch.scripts.webcoll:main',
'webmessageadmin = '
' invenio.legacy.webmessage.scripts.webmessageadmin:main',
'webstatadmin = invenio.legacy.webstat.scripts.webstatadmin:main',
'websubmitadmin = '
' invenio.legacy.websubmit.scripts.websubmitadmin:main',
'xmlmarc2textmarc = '
' invenio.legacy.bibrecord.scripts.xmlmarc2textmarc:main',
'xmlmarclint = invenio.legacy.bibrecord.scripts.xmlmarclint:main',
],
"distutils.commands": [
"inveniomanage = invenio.base.setuptools:InvenioManageCommand",
]
},
setup_requires=setup_requires,
install_requires=install_requires,
extras_require=extras_require,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2'
' or later (GPLv2+)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
test_suite='invenio.testsuite.suite',
tests_require=tests_require,
cmdclass={
'build': _build,
'install_lib': _install_lib,
},
)