Skip to content
Snippets Groups Projects
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
Branches
No related tags found
No related merge requests found
Pipeline #855 passed
......@@ -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()
#!/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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment