From a3254cebee24a4555719656c1fc77663a81582ec Mon Sep 17 00:00:00 2001 From: "Jules Lasne (jlasne - seluj78)" Date: Mon, 18 Nov 2019 14:59:05 +0100 Subject: [PATCH] Added setup.py and moved files --- padpo/__init__.py | 5 +++++ padpo/__main__.py | 3 +++ padpo.py => padpo/padpo.py | 2 +- setup.py | 39 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 padpo/__init__.py create mode 100644 padpo/__main__.py rename padpo.py => padpo/padpo.py (99%) create mode 100644 setup.py diff --git a/padpo/__init__.py b/padpo/__init__.py new file mode 100644 index 0000000..ea4760c --- /dev/null +++ b/padpo/__init__.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 + +__author__ = """Vincent Poulailleau""" +__email__ = "vpoulailleau@gmail.com" +__version__ = "0.0.1" diff --git a/padpo/__main__.py b/padpo/__main__.py new file mode 100644 index 0000000..68347ea --- /dev/null +++ b/padpo/__main__.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +__import__("padpo.padpo").padpo.main() diff --git a/padpo.py b/padpo/padpo.py similarity index 99% rename from padpo.py rename to padpo/padpo.py index c7d4d9d..f0a4e54 100644 --- a/padpo.py +++ b/padpo/padpo.py @@ -432,7 +432,7 @@ def pull_request_files(pull_request): return temp_dir, pr -if __name__ == "__main__": +def main(): parser = argparse.ArgumentParser(description="Linter for *.po files.") parser.add_argument("-v", "--verbose", action="count", default=0) files = parser.add_mutually_exclusive_group() diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..399540f --- /dev/null +++ b/setup.py @@ -0,0 +1,39 @@ +import setuptools + +with open("README.md", "r") as fh: + + long_description = fh.read() + +setuptools.setup( + + name='padpo', + + version='0.1', + + author="Vincent Poulailleau", + + author_email="vpoulailleau@gmail.com", + + description="Linter for gettext files", + + long_description=long_description, + + long_description_content_type="text/markdown", + + url="https://github.com/vpoulailleau/padpo", + + packages=["padpo"], + package_dir={"padpo": "padpo"}, + entry_points={"console_scripts": ["padpo=padpo.padpo:main"]}, + + install_requires=[ + 'simplelogging', 'wheel', 'requests' + ], + + classifiers=[ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + # TODO: Add more + ], + +) \ No newline at end of file