Commit dd8ead6e authored by nimrod's avatar nimrod
Browse files

Use the module docstring as the package description.

Workaround missing imported packages in some cases (like pre-commit) so
the module can still be imported.
parent cc2d3c11
Loading
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -15,16 +15,13 @@ try:
    import botocore.session
    import botocore.exceptions
except ImportError:
    print("Failed to import botocore.")
    sys.exit(3)
    pass
try:
    import pytz
except ImportError:
    print("Failed to import pytz.")
    sys.exit(3)
    pass

__version__ = "0.2.6"
NOW = datetime.datetime.now(pytz.utc)


def get_file_list(conn, bucket, prefix=""):
@@ -160,4 +157,16 @@ def main(): # noqa: C901


if __name__ == "__main__":
    if "botocore" not in dir():
        print(
            "Failed to import botocore, is the package installed?",
            file=sys.stderr,
        )
        sys.exit(3)
    if "pytz" not in dir():
        print(
            "Failed to import pytz, is the package installed?", file=sys.stderr
        )
        sys.exit(3)
    NOW = datetime.datetime.now(pytz.utc)
    main()
+2 −2
Original line number Diff line number Diff line
#!/usr/bin/env python
# pylint: disable=missing-docstring
from setuptools import setup, find_packages
from check_s3_bucket import __doc__ as description

setup(
    name="check_s3_bucket",
    version="0.2.6",
    description="""Check that a file was added to an S3 bucket in the given
    time window and is of a reasonable size.""",
    description=description,
    long_description=open("README.rst", "r").read(),
    url="https://git.shore.co.il/nimrod/check_s3_bucket",
    author="Nimrod Adar",