From bcb4e921da277ab34ba065c054618a08e1ff96c8 Mon Sep 17 00:00:00 2001 From: Matthias Veit Date: Tue, 27 Dec 2022 15:20:28 +0100 Subject: [PATCH] [resoto][chore] Add files required to run setup (#1362) --- plugins/aws/MANIFEST.in | 2 ++ plugins/aws/setup.py | 12 ++++----- plugins/aws_k8s/MANIFEST.in | 3 +++ plugins/aws_k8s/setup.py | 11 ++++---- plugins/cleanup_aws_alarms/MANIFEST.in | 2 ++ plugins/cleanup_aws_alarms/setup.py | 11 ++++---- plugins/cleanup_aws_loadbalancers/MANIFEST.in | 2 ++ plugins/cleanup_aws_loadbalancers/setup.py | 11 ++++---- plugins/cleanup_aws_vpcs/MANIFEST.in | 2 ++ plugins/cleanup_aws_vpcs/setup.py | 11 ++++---- plugins/cleanup_expired/MANIFEST.in | 2 ++ plugins/cleanup_expired/setup.py | 12 ++++----- plugins/cleanup_untagged/MANIFEST.in | 2 ++ plugins/cleanup_untagged/setup.py | 11 ++++---- plugins/cleanup_volumes/MANIFEST.in | 2 ++ plugins/cleanup_volumes/setup.py | 11 ++++---- plugins/digitalocean/MANIFEST.in | 3 +++ plugins/digitalocean/setup.py | 11 ++++---- plugins/digitalocean_k8s/MANIFEST.in | 3 +++ plugins/digitalocean_k8s/setup.py | 11 ++++---- plugins/dockerhub/MANIFEST.in | 2 ++ plugins/dockerhub/setup.py | 11 ++++---- plugins/example_collector/MANIFEST.in | 2 ++ plugins/example_collector/setup.py | 11 ++++---- plugins/gcp/MANIFEST.in | 2 ++ plugins/gcp/setup.py | 11 ++++---- plugins/github/MANIFEST.in | 2 ++ plugins/github/setup.py | 11 ++++---- plugins/k8s/MANIFEST.in | 2 ++ plugins/k8s/setup.py | 11 ++++---- plugins/onelogin/MANIFEST.in | 2 ++ plugins/onelogin/setup.py | 11 ++++---- plugins/onprem/MANIFEST.in | 2 ++ plugins/onprem/setup.py | 11 ++++---- plugins/posthog/MANIFEST.in | 2 ++ plugins/posthog/setup.py | 11 ++++---- plugins/protector/MANIFEST.in | 2 ++ plugins/protector/setup.py | 11 ++++---- plugins/random/MANIFEST.in | 2 ++ plugins/random/setup.py | 11 ++++---- plugins/scarf/MANIFEST.in | 2 ++ plugins/scarf/setup.py | 11 ++++---- plugins/slack/MANIFEST.in | 2 ++ plugins/slack/setup.py | 11 ++++---- plugins/tagvalidator/MANIFEST.in | 2 ++ plugins/tagvalidator/setup.py | 11 ++++---- plugins/vsphere/MANIFEST.in | 2 ++ plugins/vsphere/setup.py | 11 ++++---- resotocore/MANIFEST.in | 3 ++- resotocore/setup.py | 26 +++++++++---------- resotoeventlog/MANIFEST.in | 1 + resotoeventlog/setup.py | 26 +++++++++---------- resotolib/MANIFEST.in | 3 +++ resotolib/setup.py | 14 +++++----- resotometrics/MANIFEST.in | 2 ++ resotometrics/setup.py | 14 +++++----- resotoshell/MANIFEST.in | 2 ++ resotoshell/setup.py | 15 +++++------ resotoworker/MANIFEST.in | 2 ++ resotoworker/setup.py | 14 +++++----- 60 files changed, 236 insertions(+), 203 deletions(-) create mode 100644 plugins/aws/MANIFEST.in create mode 100644 plugins/aws_k8s/MANIFEST.in create mode 100644 plugins/cleanup_aws_alarms/MANIFEST.in create mode 100644 plugins/cleanup_aws_loadbalancers/MANIFEST.in create mode 100644 plugins/cleanup_aws_vpcs/MANIFEST.in create mode 100644 plugins/cleanup_expired/MANIFEST.in create mode 100644 plugins/cleanup_untagged/MANIFEST.in create mode 100644 plugins/cleanup_volumes/MANIFEST.in create mode 100644 plugins/digitalocean/MANIFEST.in create mode 100644 plugins/digitalocean_k8s/MANIFEST.in create mode 100644 plugins/dockerhub/MANIFEST.in create mode 100644 plugins/example_collector/MANIFEST.in create mode 100644 plugins/gcp/MANIFEST.in create mode 100644 plugins/github/MANIFEST.in create mode 100644 plugins/k8s/MANIFEST.in create mode 100644 plugins/onelogin/MANIFEST.in create mode 100644 plugins/onprem/MANIFEST.in create mode 100644 plugins/posthog/MANIFEST.in create mode 100644 plugins/protector/MANIFEST.in create mode 100644 plugins/random/MANIFEST.in create mode 100644 plugins/scarf/MANIFEST.in create mode 100644 plugins/slack/MANIFEST.in create mode 100644 plugins/tagvalidator/MANIFEST.in create mode 100644 plugins/vsphere/MANIFEST.in create mode 100644 resotoshell/MANIFEST.in create mode 100644 resotoworker/MANIFEST.in diff --git a/plugins/aws/MANIFEST.in b/plugins/aws/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/aws/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/aws/setup.py b/plugins/aws/setup.py index 13c559b57e..49b15d671d 100644 --- a/plugins/aws/setup.py +++ b/plugins/aws/setup.py @@ -1,12 +1,12 @@ import os -from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() +import pkg_resources +from setuptools import setup, find_packages -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -22,7 +22,7 @@ def read(fname): }, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/aws_k8s/MANIFEST.in b/plugins/aws_k8s/MANIFEST.in new file mode 100644 index 0000000000..93c438dd0d --- /dev/null +++ b/plugins/aws_k8s/MANIFEST.in @@ -0,0 +1,3 @@ +include README.md +include requirements.txt +include requirements-test.txt diff --git a/plugins/aws_k8s/setup.py b/plugins/aws_k8s/setup.py index 30acc4bba3..9eb0d27f2d 100644 --- a/plugins/aws_k8s/setup.py +++ b/plugins/aws_k8s/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["aws_k8s_collector = resoto_plugin_aws_k8s:AWSK8sCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/cleanup_aws_alarms/MANIFEST.in b/plugins/cleanup_aws_alarms/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/cleanup_aws_alarms/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/cleanup_aws_alarms/setup.py b/plugins/cleanup_aws_alarms/setup.py index 96cb55a0e5..e13d1427c5 100644 --- a/plugins/cleanup_aws_alarms/setup.py +++ b/plugins/cleanup_aws_alarms/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["cleanup_aws_alarms = resoto_plugin_cleanup_aws_alarms:CleanupAWSAlarmsPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/cleanup_aws_loadbalancers/MANIFEST.in b/plugins/cleanup_aws_loadbalancers/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/cleanup_aws_loadbalancers/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/cleanup_aws_loadbalancers/setup.py b/plugins/cleanup_aws_loadbalancers/setup.py index 81199e7d2c..7817132b37 100644 --- a/plugins/cleanup_aws_loadbalancers/setup.py +++ b/plugins/cleanup_aws_loadbalancers/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -24,7 +23,7 @@ def read(fname): }, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/cleanup_aws_vpcs/MANIFEST.in b/plugins/cleanup_aws_vpcs/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/cleanup_aws_vpcs/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/cleanup_aws_vpcs/setup.py b/plugins/cleanup_aws_vpcs/setup.py index 69a4170cbc..f45a15fa14 100644 --- a/plugins/cleanup_aws_vpcs/setup.py +++ b/plugins/cleanup_aws_vpcs/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["cleanup_aws_vpcs = resoto_plugin_cleanup_aws_vpcs:CleanupAWSVPCsPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/cleanup_expired/MANIFEST.in b/plugins/cleanup_expired/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/cleanup_expired/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/cleanup_expired/setup.py b/plugins/cleanup_expired/setup.py index 1272fde11c..2da51eb514 100644 --- a/plugins/cleanup_expired/setup.py +++ b/plugins/cleanup_expired/setup.py @@ -1,12 +1,10 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +18,7 @@ def read(fname): entry_points={"resoto.plugins": ["cleanup_expired = resoto_plugin_cleanup_expired:CleanupExpiredPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/cleanup_untagged/MANIFEST.in b/plugins/cleanup_untagged/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/cleanup_untagged/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/cleanup_untagged/setup.py b/plugins/cleanup_untagged/setup.py index 585e65e2eb..32d750c4fa 100644 --- a/plugins/cleanup_untagged/setup.py +++ b/plugins/cleanup_untagged/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["cleanup_untagged = resoto_plugin_cleanup_untagged:CleanupUntaggedPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/cleanup_volumes/MANIFEST.in b/plugins/cleanup_volumes/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/cleanup_volumes/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/cleanup_volumes/setup.py b/plugins/cleanup_volumes/setup.py index 43ac52e4e8..53058eac58 100644 --- a/plugins/cleanup_volumes/setup.py +++ b/plugins/cleanup_volumes/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["cleanup_volumes = resoto_plugin_cleanup_volumes:CleanupVolumesPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/digitalocean/MANIFEST.in b/plugins/digitalocean/MANIFEST.in new file mode 100644 index 0000000000..93c438dd0d --- /dev/null +++ b/plugins/digitalocean/MANIFEST.in @@ -0,0 +1,3 @@ +include README.md +include requirements.txt +include requirements-test.txt diff --git a/plugins/digitalocean/setup.py b/plugins/digitalocean/setup.py index f7e6a05ee2..661f2f8043 100644 --- a/plugins/digitalocean/setup.py +++ b/plugins/digitalocean/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -22,7 +21,7 @@ def read(fname): }, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/digitalocean_k8s/MANIFEST.in b/plugins/digitalocean_k8s/MANIFEST.in new file mode 100644 index 0000000000..93c438dd0d --- /dev/null +++ b/plugins/digitalocean_k8s/MANIFEST.in @@ -0,0 +1,3 @@ +include README.md +include requirements.txt +include requirements-test.txt diff --git a/plugins/digitalocean_k8s/setup.py b/plugins/digitalocean_k8s/setup.py index 776c3fd2a0..a438249c2b 100644 --- a/plugins/digitalocean_k8s/setup.py +++ b/plugins/digitalocean_k8s/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -22,7 +21,7 @@ def read(fname): }, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/dockerhub/MANIFEST.in b/plugins/dockerhub/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/dockerhub/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/dockerhub/setup.py b/plugins/dockerhub/setup.py index 5d0f166975..4aa47967e9 100644 --- a/plugins/dockerhub/setup.py +++ b/plugins/dockerhub/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["dockerhub = resoto_plugin_dockerhub:DockerHubCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/example_collector/MANIFEST.in b/plugins/example_collector/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/example_collector/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/example_collector/setup.py b/plugins/example_collector/setup.py index 2d50c5a569..080b9865d2 100644 --- a/plugins/example_collector/setup.py +++ b/plugins/example_collector/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["example_collector = resoto_plugin_example_collector:ExampleCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/gcp/MANIFEST.in b/plugins/gcp/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/gcp/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/gcp/setup.py b/plugins/gcp/setup.py index 818405f6b4..06aa7a6f26 100644 --- a/plugins/gcp/setup.py +++ b/plugins/gcp/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["gcp = resoto_plugin_gcp:GCPCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/github/MANIFEST.in b/plugins/github/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/github/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/github/setup.py b/plugins/github/setup.py index 4be9c0b6ae..c9aea8562a 100644 --- a/plugins/github/setup.py +++ b/plugins/github/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["github = resoto_plugin_github:GithubCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/k8s/MANIFEST.in b/plugins/k8s/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/k8s/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/k8s/setup.py b/plugins/k8s/setup.py index 36d48ddc6e..0889df44b8 100644 --- a/plugins/k8s/setup.py +++ b/plugins/k8s/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["k8s_collector = resoto_plugin_k8s:KubernetesCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/onelogin/MANIFEST.in b/plugins/onelogin/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/onelogin/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/onelogin/setup.py b/plugins/onelogin/setup.py index ace88c7c97..97b31f1031 100644 --- a/plugins/onelogin/setup.py +++ b/plugins/onelogin/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["onelogin = resoto_plugin_onelogin:OneLoginPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/onprem/MANIFEST.in b/plugins/onprem/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/onprem/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/onprem/setup.py b/plugins/onprem/setup.py index d0db27a5a4..3458330e97 100644 --- a/plugins/onprem/setup.py +++ b/plugins/onprem/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["onprem = resoto_plugin_onprem:OnpremCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/posthog/MANIFEST.in b/plugins/posthog/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/posthog/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/posthog/setup.py b/plugins/posthog/setup.py index 32d4e44cd3..d9dab12216 100644 --- a/plugins/posthog/setup.py +++ b/plugins/posthog/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["posthog = resoto_plugin_posthog:PosthogCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/protector/MANIFEST.in b/plugins/protector/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/protector/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/protector/setup.py b/plugins/protector/setup.py index e80cbca719..0c6c21728f 100644 --- a/plugins/protector/setup.py +++ b/plugins/protector/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["protector = resoto_plugin_protector:ProtectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/random/MANIFEST.in b/plugins/random/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/random/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/random/setup.py b/plugins/random/setup.py index 74abf0725a..b2872501ca 100644 --- a/plugins/random/setup.py +++ b/plugins/random/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["random = resoto_plugin_random:RandomCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/scarf/MANIFEST.in b/plugins/scarf/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/scarf/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/scarf/setup.py b/plugins/scarf/setup.py index fa49021867..bb66157a1a 100644 --- a/plugins/scarf/setup.py +++ b/plugins/scarf/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["scarf = resoto_plugin_scarf:ScarfCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/slack/MANIFEST.in b/plugins/slack/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/slack/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/slack/setup.py b/plugins/slack/setup.py index e95c223fdd..3d6f75c144 100644 --- a/plugins/slack/setup.py +++ b/plugins/slack/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -23,7 +22,7 @@ def read(fname): "slack_collector = resoto_plugin_slack:SlackCollectorPlugin", ] }, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], include_package_data=True, zip_safe=False, setup_requires=["pytest-runner"], diff --git a/plugins/tagvalidator/MANIFEST.in b/plugins/tagvalidator/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/tagvalidator/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/tagvalidator/setup.py b/plugins/tagvalidator/setup.py index 86b41b3757..362772ddf6 100644 --- a/plugins/tagvalidator/setup.py +++ b/plugins/tagvalidator/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["tagvalidator = resoto_plugin_tagvalidator:TagValidatorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/plugins/vsphere/MANIFEST.in b/plugins/vsphere/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/plugins/vsphere/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/plugins/vsphere/setup.py b/plugins/vsphere/setup.py index ef582f3e1a..b116749d72 100644 --- a/plugins/vsphere/setup.py +++ b/plugins/vsphere/setup.py @@ -1,12 +1,11 @@ import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -20,7 +19,7 @@ def read(fname): entry_points={"resoto.plugins": ["vsphere = resoto_plugin_vsphere:VSphereCollectorPlugin"]}, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/resotocore/MANIFEST.in b/resotocore/MANIFEST.in index 4bb720df5e..81b183bb08 100644 --- a/resotocore/MANIFEST.in +++ b/resotocore/MANIFEST.in @@ -1,5 +1,6 @@ +include README.md include requirements-dev.txt include requirements-test.txt include requirements.txt include resotocore/static/* -recursive-include resotocore/jupyterlite * \ No newline at end of file +recursive-include resotocore/jupyterlite * diff --git a/resotocore/setup.py b/resotocore/setup.py index 940c073526..8e4f6de014 100644 --- a/resotocore/setup.py +++ b/resotocore/setup.py @@ -5,22 +5,20 @@ from setuptools import setup, find_packages from setuptools.command.develop import develop from subprocess import check_call +import os +import pkg_resources -with open("requirements.txt") as f: - required = f.read().splitlines() -with open("requirements-dev.txt") as f: - dev_required = f.read().splitlines() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() -with open("requirements-test.txt") as f: - test_required = f.read().splitlines() -with open("README.md") as f: - readme = f.read() +def read_requirements(fname): + return [str(requirement) for requirement in pkg_resources.parse_requirements(read(fname))] -setup_requirements = [ - "pytest-runner", -] + +setup_requirements = ["pytest-runner"] class PostDevelopCommand(develop): @@ -46,15 +44,15 @@ def run(self): python_requires=">=3.5", classifiers=["Programming Language :: Python :: 3"], entry_points={"console_scripts": ["resotocore=resotocore.__main__:main"]}, - install_requires=required, + install_requires=read_requirements("requirements.txt"), license="Apache Software License 2.0", - long_description=readme, + long_description=read("README.md"), long_description_content_type="text/markdown", include_package_data=True, packages=find_packages(include=["resotocore", "resotocore.*"]), setup_requires=setup_requirements, test_suite="tests", - tests_require=dev_required + test_required, + tests_require=read_requirements("requirements-dev.txt") + read_requirements("requirements-test.txt"), url="https://github.com/someengineering/resoto/resotocore", cmdclass={ "develop": PostDevelopCommand, diff --git a/resotoeventlog/MANIFEST.in b/resotoeventlog/MANIFEST.in index 0c21decf0a..a15415d286 100644 --- a/resotoeventlog/MANIFEST.in +++ b/resotoeventlog/MANIFEST.in @@ -1,3 +1,4 @@ +include README.md include requirements-dev.txt include requirements-test.txt include requirements.txt diff --git a/resotoeventlog/setup.py b/resotoeventlog/setup.py index 0a0e1dd921..5673d3d675 100644 --- a/resotoeventlog/setup.py +++ b/resotoeventlog/setup.py @@ -3,22 +3,20 @@ """The setup script.""" from setuptools import setup, find_packages +import pkg_resources +import os -with open("requirements.txt") as f: - required = f.read().splitlines() -with open("requirements-dev.txt") as f: - dev_required = f.read().splitlines() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() -with open("requirements-test.txt") as f: - test_required = f.read().splitlines() -with open("README.md") as f: - readme = f.read() +def read_requirements(fname): + return [str(requirement) for requirement in pkg_resources.parse_requirements(read(fname))] -setup_requirements = [ - "pytest-runner", -] + +setup_requirements = ["pytest-runner"] setup( name="resotoeventlog", @@ -27,14 +25,14 @@ python_requires=">=3.5", classifiers=["Programming Language :: Python :: 3"], entry_points={"console_scripts": ["resotoeventlog=resotoeventlog.__main__:main"]}, - install_requires=required, + install_requires=read_requirements("requirements.txt"), license="Apache Software License 2.0", - long_description=readme, + long_description=read("README.md"), long_description_content_type="text/markdown", include_package_data=True, packages=find_packages(include=["resotoeventlog", "resotoeventlog.*"]), setup_requires=setup_requirements, test_suite="tests", - tests_require=dev_required + test_required, + tests_require=read_requirements("requirements-dev.txt") + read_requirements("requirements-test.txt"), url="https://github.com/someengineering/resoto/resotoeventlog", ) diff --git a/resotolib/MANIFEST.in b/resotolib/MANIFEST.in index 477ad937df..96d27d10e0 100644 --- a/resotolib/MANIFEST.in +++ b/resotolib/MANIFEST.in @@ -1 +1,4 @@ +include README.md +include requirements.txt +include requirements-test.txt include resotolib/web/static/* diff --git a/resotolib/setup.py b/resotolib/setup.py index cbcb3744c3..b0c344c015 100644 --- a/resotolib/setup.py +++ b/resotolib/setup.py @@ -1,12 +1,12 @@ +import os import resotolib +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -with open("README.md") as f: - readme = f.read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -16,11 +16,11 @@ license=resotolib.__license__, packages=find_packages(), package_data={"resotolib": ["py.typed"]}, - long_description=readme, + long_description=read("README.md"), long_description_content_type="text/markdown", include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/resotometrics/MANIFEST.in b/resotometrics/MANIFEST.in index 4b64f4d209..e0cdbee5d0 100644 --- a/resotometrics/MANIFEST.in +++ b/resotometrics/MANIFEST.in @@ -1 +1,3 @@ +include README.md +include requirements.txt include resotometrics/default_metrics.yaml diff --git a/resotometrics/setup.py b/resotometrics/setup.py index c7166b0bf1..0bd23ee620 100644 --- a/resotometrics/setup.py +++ b/resotometrics/setup.py @@ -1,12 +1,12 @@ +import os +import pkg_resources import resotometrics from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -with open("README.md") as f: - readme = f.read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -15,7 +15,7 @@ description=resotometrics.__description__, license=resotometrics.__license__, packages=find_packages(), - long_description=readme, + long_description=read("README.md"), long_description_content_type="text/markdown", entry_points={ "console_scripts": [ @@ -24,7 +24,7 @@ }, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/resotoshell/MANIFEST.in b/resotoshell/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/resotoshell/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/resotoshell/setup.py b/resotoshell/setup.py index 46ea3bf98e..5586ca6df7 100644 --- a/resotoshell/setup.py +++ b/resotoshell/setup.py @@ -1,13 +1,12 @@ +import os +import pkg_resources import resotoshell from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -with open("README.md") as f: - readme = f.read() - +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( name=resotoshell.__title__, @@ -15,7 +14,7 @@ description=resotoshell.__description__, license=resotoshell.__license__, packages=find_packages(), - long_description=readme, + long_description=read("README.md"), long_description_content_type="text/markdown", entry_points={ "console_scripts": [ @@ -24,7 +23,7 @@ }, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[ diff --git a/resotoworker/MANIFEST.in b/resotoworker/MANIFEST.in new file mode 100644 index 0000000000..8afbefe8d8 --- /dev/null +++ b/resotoworker/MANIFEST.in @@ -0,0 +1,2 @@ +include README.md +include requirements.txt diff --git a/resotoworker/setup.py b/resotoworker/setup.py index 7bf0bf96b9..d5290bc069 100644 --- a/resotoworker/setup.py +++ b/resotoworker/setup.py @@ -1,12 +1,12 @@ import resotoworker +import os +import pkg_resources from setuptools import setup, find_packages -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -with open("README.md") as f: - readme = f.read() +def read(file_name: str) -> str: + with open(os.path.join(os.path.dirname(__file__), file_name)) as of: + return of.read() setup( @@ -15,7 +15,7 @@ description=resotoworker.__description__, license=resotoworker.__license__, packages=find_packages(), - long_description=readme, + long_description=read("README.md"), long_description_content_type="text/markdown", entry_points={ "console_scripts": [ @@ -24,7 +24,7 @@ }, include_package_data=True, zip_safe=False, - install_requires=requirements, + install_requires=[str(requirement) for requirement in pkg_resources.parse_requirements(read("requirements.txt"))], setup_requires=["pytest-runner"], tests_require=["pytest"], classifiers=[