forked from openpaperwork/paperwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·188 lines (183 loc) · 6.65 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
#!/usr/bin/env python
import os
import platform
import sys
from setuptools import setup
setup(
name="paperwork",
# if you change the version, don't forget to
# * change it also in
# src/paperwork/frontend/aboutdialog/aboutdialog.glade
# * update the archive list in the README
version="0.2.1-git",
description="Grep for dead trees",
long_description="""
Paperwork is a tool to make papers searchable.
The basic idea behind Paperwork is "scan & forget" : You should be able to
just scan a new document and forget about it until the day you need it
again.
Let the machine do most of the work.
""",
keywords="scanner ocr gui",
url="https://github.com/jflesch/paperwork",
download_url=("https://github.com/jflesch/paperwork"
"/archive/unstable.tar.gz"),
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: X11 Applications :: GTK",
"Intended Audience :: End Users/Desktop",
("License :: OSI Approved ::"
" GNU General Public License v3 or later (GPLv3+)"),
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2.7",
"Topic :: Multimedia :: Graphics :: Capture :: Scanners",
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
"Topic :: Scientific/Engineering :: Image Recognition",
"Topic :: Text Processing :: Indexing",
],
license="GPLv3+",
author="Jerome Flesch",
author_email="[email protected]",
packages=[
'paperwork',
'paperwork.frontend',
'paperwork.frontend.aboutdialog',
'paperwork.frontend.doceditdialog',
'paperwork.frontend.import',
'paperwork.frontend.labeleditor',
'paperwork.frontend.mainwindow',
'paperwork.frontend.multiscan',
'paperwork.frontend.pageeditor',
'paperwork.frontend.settingswindow',
'paperwork.frontend.util',
'paperwork.frontend.util.canvas',
'paperwork.backend',
'paperwork.backend.common',
'paperwork.backend.pdf',
'paperwork.backend.img',
],
package_dir={
'paperwork': 'src/paperwork',
'paperwork.frontend': 'src/paperwork/frontend',
'paperwork.frontend.aboutdialog':
'src/paperwork/frontend/aboutdialog',
'paperwork.frontend.doceditdialog':
'src/paperwork/frontend/doceditdialog',
'paperwork.frontend.import': 'src/paperwork/frontend/import',
'paperwork.frontend.labeleditor':
'src/paperwork/frontend/labeleditor',
'paperwork.frontend.mainwindow': 'src/paperwork/frontend/mainwindow',
'paperwork.frontend.multiscan': 'src/paperwork/frontend/multiscan',
'paperwork.frontend.pageeditor': 'src/paperwork/frontend/pageeditor',
'paperwork.frontend.settingswindow':
'src/paperwork/frontend/settingswindow',
'paperwork.frontend.util': 'src/paperwork/frontend/util',
'paperwork.frontend.util.canvas':
'src/paperwork/frontend/util/canvas',
'paperwork.backend': 'src/paperwork/backend',
'paperwork.backend.common': 'src/paperwork/backend/common',
'paperwork.backend.pdf': 'src/paperwork/backend/pdf',
'paperwork.backend.img': 'src/paperwork/backend/img',
},
data_files=[
# glade files
(
os.path.join(sys.prefix, 'share/paperwork/aboutdialog'),
[
'src/paperwork/frontend/aboutdialog/aboutdialog.glade',
]
),
(
os.path.join(sys.prefix, 'share/paperwork/settingswindow'),
[
'src/paperwork/frontend/settingswindow/settingswindow.glade',
]
),
(
os.path.join(sys.prefix, 'share/paperwork/doceditdialog'),
[
'src/paperwork/frontend/doceditdialog/doceditdialog.glade',
]
),
(
os.path.join(sys.prefix, 'share/paperwork/import'),
[
'src/paperwork/frontend/import/importaction.glade',
'src/paperwork/frontend/import/importfileselector.glade',
]
),
(
os.path.join(sys.prefix, 'share/paperwork/labeleditor'),
[
'src/paperwork/frontend/labeleditor/labeleditor.glade',
]
),
(
os.path.join(sys.prefix, 'share/paperwork/mainwindow'),
[
'src/paperwork/frontend/mainwindow/appmenu.xml',
]
),
(
os.path.join(sys.prefix, 'share/paperwork/mainwindow'),
[
'src/paperwork/frontend/mainwindow/mainwindow.glade',
]
),
(
os.path.join(sys.prefix, 'share/paperwork/multiscan'),
[
'src/paperwork/frontend/multiscan/multiscan.glade',
]
),
(
os.path.join(sys.prefix, 'share/paperwork/pageeditor'),
[
'src/paperwork/frontend/pageeditor/pageeditor.glade',
]
),
(os.path.join(sys.prefix, 'share/locale/fr/LC_MESSAGES'),
['locale/fr/LC_MESSAGES/paperwork.mo']),
(os.path.join(sys.prefix, 'share/locale/de/LC_MESSAGES'),
['locale/de/LC_MESSAGES/paperwork.mo']),
(os.path.join(sys.prefix, 'share/applications'),
['data/paperwork.desktop']),
(os.path.join(sys.prefix, 'share/icons'),
['data/paperwork.svg']),
],
scripts=[
'scripts/paperwork',
'scripts/paperwork-chkdeps',
],
install_requires=[
"Cython",
'joblib',
"Pillow",
"pycountry",
# "pycairo", # doesn't work ?
"pyenchant",
"python-Levenshtein",
"pyinsane >= 1.3.8",
"pyocr >= 0.2.3",
"numpy",
"scipy",
"scikit-learn",
"scikit-image",
"termcolor", # used by paperwork-chkdeps
"Whoosh",
# "PyGObject", # doesn't work with virtualenv
# Missing due to the use of gobject introspection:
# - gtk
# - glade
# - poppler
# Missing because non-python libraries:
# - sane
# - tesseract/cuneiform
],
)
print ("======================================================================")
print ("======================================================================")
print ("|| IMPORTANT ||")
print ("|| Please run 'paperwork-chkdeps' to find any missing dependency ||")
print ("======================================================================")
print ("======================================================================")