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
Tags v0.1.0
No related merge requests found
Pipeline #855 passed
...@@ -15,16 +15,13 @@ try: ...@@ -15,16 +15,13 @@ try:
import botocore.session import botocore.session
import botocore.exceptions import botocore.exceptions
except ImportError: except ImportError:
print("Failed to import botocore.") pass
sys.exit(3)
try: try:
import pytz import pytz
except ImportError: except ImportError:
print("Failed to import pytz.") pass
sys.exit(3)
__version__ = "0.2.6" __version__ = "0.2.6"
NOW = datetime.datetime.now(pytz.utc)
def get_file_list(conn, bucket, prefix=""): def get_file_list(conn, bucket, prefix=""):
...@@ -160,4 +157,16 @@ def main(): # noqa: C901 ...@@ -160,4 +157,16 @@ def main(): # noqa: C901
if __name__ == "__main__": 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() main()
#!/usr/bin/env python #!/usr/bin/env python
# pylint: disable=missing-docstring # pylint: disable=missing-docstring
from setuptools import setup, find_packages from setuptools import setup, find_packages
from check_s3_bucket import __doc__ as description
setup( setup(
name="check_s3_bucket", name="check_s3_bucket",
version="0.2.6", version="0.2.6",
description="""Check that a file was added to an S3 bucket in the given description=description,
time window and is of a reasonable size.""",
long_description=open("README.rst", "r").read(), long_description=open("README.rst", "r").read(),
url="https://git.shore.co.il/nimrod/check_s3_bucket", url="https://git.shore.co.il/nimrod/check_s3_bucket",
author="Nimrod Adar", author="Nimrod Adar",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment