-
Notifications
You must be signed in to change notification settings - Fork 24
/
setup.py
37 lines (30 loc) · 901 Bytes
/
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
#!/bin/env python
# Copyright (c) 2017 NVIDIA CORPORATION. All rights reserved.
# See the LICENSE file for licensing terms (BSD-style).
from __future__ import print_function
import os
import sys
import urllib
import os.path
from distutils.core import setup # , Extension, Command
assert sys.version_info[0] == 2 and sys.version_info[1] >= 7,\
"requires Python version 2.7 or later, but not Python 3.x"
remote = "https://storage.googleapis.com/tmb-models/"
models = ["lowskew-000000259-011440.pt"]
for model in models:
if not os.path.exists(model):
urllib.URLopener().retrieve(remote+model, model)
scripts = """
ocroseg-train
ocroseg-pred
ocroseg-predlines
""".split()
setup(
name='ocroseg',
version='v0.0',
author="Thomas Breuel",
description="Text line recognition.",
packages=["ocroseg"],
scripts=scripts,
data_files=[("share/ocroseg", models)]
)