Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (27 sloc)
965 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import glob | |
import os.path | |
from distutils.core import setup | |
assert sys.version_info[0]==2 and sys.version_info[1]>=7,\ | |
"you must install and use OCRopus with Python version 2.7 or later, but not Python 3.x" | |
if not os.path.exists("models/en-default.pyrnn.gz"): | |
print() | |
print("You should download the default model 'en-default.pyrnn.gz'") | |
print("and put it into ./models.") | |
print() | |
print("Check https://github.com/tmbdev/ocropy for the location") | |
print("of model files.") | |
print() | |
models = [c for c in glob.glob("models/*pyrnn.gz")] | |
scripts = [c for c in glob.glob("ocropus-*") if "." not in c and "~" not in c] | |
setup( | |
name = 'ocropy', | |
version = 'v1.3.3', | |
author = "Thomas Breuel", | |
description = "The OCRopy RNN-based Text Line Recognizer", | |
packages = ["ocrolib"], | |
data_files= [('share/ocropus', models)], | |
scripts = scripts, | |
) |