From 599bbf1c863175ec564a8d1468e183ff7323fa18 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Thu, 10 Oct 2019 16:24:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20sbb=5Ftextline=5Fdetector:=20Use?= =?UTF-8?q?=20same=20structure=20as=20the=20other=20projects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 ++++--- qurator/__init__.py | 1 + qurator/sbb_textline_detector/__init__.py | 1 + main.py => qurator/sbb_textline_detector/main.py | 0 setup.py | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 qurator/__init__.py create mode 100644 qurator/sbb_textline_detector/__init__.py rename main.py => qurator/sbb_textline_detector/main.py (100%) diff --git a/Dockerfile b/Dockerfile index 020db6f..20681e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ FROM python:3 -ADD main.py / ADD requirements.txt / - RUN pip install --proxy=http-proxy.sbb.spk-berlin.de:3128 -r requirements.txt -ENTRYPOINT ["python", "./main.py"] +COPY . /usr/src/sbb_textline_detector +RUN pip install /usr/src/sbb_textline_detector + +ENTRYPOINT ["sbb_textline_detector"] diff --git a/qurator/__init__.py b/qurator/__init__.py new file mode 100644 index 0000000..b0d6433 --- /dev/null +++ b/qurator/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) \ No newline at end of file diff --git a/qurator/sbb_textline_detector/__init__.py b/qurator/sbb_textline_detector/__init__.py new file mode 100644 index 0000000..15b6a64 --- /dev/null +++ b/qurator/sbb_textline_detector/__init__.py @@ -0,0 +1 @@ +from .main import * diff --git a/main.py b/qurator/sbb_textline_detector/main.py similarity index 100% rename from main.py rename to qurator/sbb_textline_detector/main.py diff --git a/setup.py b/setup.py index 0b0e9df..faff412 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( install_requires=install_requires, entry_points={ 'console_scripts': [ - "text_line_recognition=main:main", + "sbb_textline_detector=qurator.sbb_textline_detector:main", ] }, python_requires='>=3.6.0', @@ -31,4 +31,4 @@ setup( 'Programming Language :: Python :: 3', 'Topic :: Scientific/Engineering :: Artificial Intelligence', ], -) \ No newline at end of file +)