From 110733866f75520fb61b21b4aa37d51e383af27f Mon Sep 17 00:00:00 2001 From: Gokul NC Date: Tue, 10 Nov 2020 13:13:58 +0530 Subject: [PATCH] [apps] Add packaging files --- .gitignore | 5 ++++- apps/MANIFEST.in | 2 ++ apps/dependencies.txt | 6 ++++++ apps/setup.py | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 apps/MANIFEST.in create mode 100644 apps/dependencies.txt create mode 100644 apps/setup.py diff --git a/.gitignore b/.gitignore index 87a9387..457ab9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ .vscode data/* hypotheses/* -apps/models/* +apps/ai4bharat/transliteration/models/*/* +*.egg-info/ +build/ +dist/ logs *.log temp* diff --git a/apps/MANIFEST.in b/apps/MANIFEST.in new file mode 100644 index 0000000..d9f46b2 --- /dev/null +++ b/apps/MANIFEST.in @@ -0,0 +1,2 @@ +include ai4bharat/transliteration/models/* +include dependencies.txt diff --git a/apps/dependencies.txt b/apps/dependencies.txt new file mode 100644 index 0000000..c5d28b2 --- /dev/null +++ b/apps/dependencies.txt @@ -0,0 +1,6 @@ +torch +numpy +pydload +flask +flask_cors +gevent \ No newline at end of file diff --git a/apps/setup.py b/apps/setup.py new file mode 100644 index 0000000..c8c9cc5 --- /dev/null +++ b/apps/setup.py @@ -0,0 +1,32 @@ +import pathlib +from setuptools import setup, find_packages +import pkg_resources + +# The directory containing this file +HERE = pathlib.Path(__file__).parent + +# The text of the README file +README = (HERE / "README.md").read_text(encoding='utf-8') + +with pathlib.Path('dependencies.txt').open() as requirements_txt: + install_requires = [ + str(requirement) + for requirement + in pkg_resources.parse_requirements(requirements_txt) + ] + +# This call to setup() does all the work +setup( + name="ai4bharat-transliteration", + version="0.5.0", + description="Deep Transliteration for Indic Languages", + long_description=README, + long_description_content_type="text/markdown", + url="https://github.com/AI4Bharat/IndianNLP-Transliteration", + author="AI4Bharat", + author_email="opensource@ai4bharat.org", + packages=["ai4bharat.transliteration"], + # packages=find_packages(exclude=("tests",)), + include_package_data=True, + install_requires=install_requires, +)