-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
147 lines (134 loc) · 5.06 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
# -*- coding: utf-8 -*-
#
# RERO EBOOKS
# Copyright (C) 2020 RERO
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Ebooks repository for RERO."""
import os
from setuptools import find_packages, setup
from setuptools.command.egg_info import egg_info
class EggInfoWithCompile(egg_info):
def run(self):
from babel.messages.frontend import compile_catalog
compiler = compile_catalog()
option_dict = self.distribution.get_option_dict('compile_catalog')
if option_dict.get('domain'):
compiler.domain = [option_dict['domain'][1]]
else:
compiler.domain = ['messages']
compiler.use_fuzzy = True
compiler.directory = option_dict['directory'][1]
compiler.run()
super().run()
readme = open('README.rst').read()
INVENIO_VERSION = "3.4.1"
packages = find_packages()
# Get the version string. Cannot be done with import!
g = {}
with open(os.path.join('rero_ebooks', 'version.py'), 'rt') as fp:
exec(fp.read(), g)
version = g['__version__']
setup(
name='rero-ebooks',
version=version,
description=__doc__,
long_description=readme,
keywords='rero-ebooks Invenio',
license='MIT',
author='RERO',
author_email='[email protected]',
url='https://github.com/rero/rero-ebooks',
packages=packages,
zip_safe=False,
include_package_data=True,
platforms='any',
entry_points={
'console_scripts': [
'rero-ebooks = invenio_app.cli:cli',
],
'invenio_assets.webpack': [
'rero_ebooks_theme = rero_ebooks.theme.webpack:theme',
],
'invenio_base.apps': [
'rero_ebooks = rero_ebooks:ReroEBooks',
],
'invenio_base.blueprints': [
'rero_ebooks = rero_ebooks.theme.views:blueprint',
],
'invenio_base.api_blueprints': [
'api_rero_ebooks = rero_ebooks.theme.views:api_blueprint',
],
'invenio_config.module': [
'rero_ebooks = rero_ebooks.config',
],
'invenio_i18n.translations': [
'messages = rero_ebooks',
],
'invenio_pidstore.minters': [
'ebook = rero_ebooks.minters:ebook_pid_minter',
],
'invenio_pidstore.fetchers': [
'ebook = rero_ebooks.fetchers:ebook_pid_fetcher',
],
'invenio_search.mappings': [
'ebooks = rero_ebooks.mappings',
],
'dojson.cli.rule': [
'tomarc21 = dojson.contrib.to_marc21:to_marc21',
'cantookmarc21 = rero_ebooks.dojson.marc21:marc21',
'cantookjson = rero_ebooks.dojson.json.model:cantook_json'
],
'dojson.cli.dump': [
'pjson = rero_ebooks.dojson.utils:dump'
],
'flask.commands': [
'oaiharvester = rero_ebooks.cli:oaiharvester',
'apiharvester = rero_ebooks.apiharvester.cli:apiharvester'
],
'rero_ebooks.marc21': [
'bdleader = rero_ebooks.dojson.marc21.fields.bdleader',
'bd00x = rero_ebooks.dojson.marc21.fields.bd00x',
'bd01x09x = rero_ebooks.dojson.marc21.fields.bd01x09x',
'bd1xx = rero_ebooks.dojson.marc21.fields.bd1xx',
'bd20x24x = rero_ebooks.dojson.marc21.fields.bd20x24x',
'bd25x28x = rero_ebooks.dojson.marc21.fields.bd25x28x',
'bd3xx = rero_ebooks.dojson.marc21.fields.bd3xx',
'bd4xx = rero_ebooks.dojson.marc21.fields.bd4xx',
'bd5xx = rero_ebooks.dojson.marc21.fields.bd5xx',
'bd6xx = rero_ebooks.dojson.marc21.fields.bd6xx',
'bd70x75x = rero_ebooks.dojson.marc21.fields.bd70x75x',
'bd76x78x = rero_ebooks.dojson.marc21.fields.bd76x78x',
'bd80x83x = rero_ebooks.dojson.marc21.fields.bd80x83x',
'bd84188x = rero_ebooks.dojson.marc21.fields.bd84188x'
],
'invenio_db.models': [
'apiharvester = rero_ebooks.apiharvester.models'
],
'invenio_celery.tasks': [
'rero_ebooks = rero_ebooks.tasks',
'apiharvester = rero_ebooks.apiharvester.tasks'
]
},
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GPL License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Development Status :: 3 - Alpha',
],
)