Skip to content

Commit

Permalink
merge requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
s-westphal committed Jun 21, 2024
1 parent cf4bb3c commit 6db93a5
Show file tree
Hide file tree
Showing 32 changed files with 715 additions and 3,808 deletions.
16 changes: 1 addition & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,36 +79,22 @@ ADD . ${GRR_SOURCE}
WORKDIR ${GRR_SOURCE}

RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes \
-r grr/proto/requirements/ubuntu.txt
-r travis/requirements/ubuntu.txt
RUN ${VIRTUAL_ENV}/bin/python -m pip install --no-deps --no-index \
-e grr/proto

RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes \
-r grr/core/requirements/ubuntu.txt
RUN ${VIRTUAL_ENV}/bin/python -m pip install --no-deps --no-index \
-e grr/core

RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes \
-r grr/client/requirements/ubuntu.txt
RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes \
-r grr/client/requirements/ubuntu_only.txt
RUN ${VIRTUAL_ENV}/bin/python -m pip install --no-deps --no-index \
-e grr/client

RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes \
-r grr/server/requirements/ubuntu.txt
RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes \
-r grr/server/requirements/ubuntu_only.txt
RUN ${VIRTUAL_ENV}/bin/python -m pip install --no-deps --no-index \
-e grr/server

RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes \
-r grr/client_builder/requirements/ubuntu.txt
RUN ${VIRTUAL_ENV}/bin/python -m pip install --no-deps --no-index \
-e grr/client_builder

RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes \
-r api_client/python/requirements/ubuntu.txt
RUN ${VIRTUAL_ENV}/bin/python -m pip install --no-deps --no-index \
-e api_client/python

Expand Down
326 changes: 0 additions & 326 deletions api_client/python/requirements/centos.txt

This file was deleted.

267 changes: 0 additions & 267 deletions api_client/python/requirements/osx.txt

This file was deleted.

263 changes: 0 additions & 263 deletions api_client/python/requirements/ubuntu.txt

This file was deleted.

322 changes: 0 additions & 322 deletions api_client/python/requirements/windows.txt

This file was deleted.

44 changes: 22 additions & 22 deletions appveyor/windows_templates/build_windows_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def MakeProtoSdist(self):
])
return glob.glob(
os.path.join(args.build_dir, "grr_response_proto-*.zip")
).pop(), [os.path.join(args.grr_src, "grr", "proto", "requirements", "windows.txt")]
).pop()

def MakeCoreSdist(self):
os.chdir(os.path.join(args.grr_src, "grr/core"))
Expand All @@ -203,7 +203,7 @@ def MakeCoreSdist(self):
])
return glob.glob(
os.path.join(args.build_dir, "grr_response_core-*.zip")
).pop(), [os.path.join(args.grr_src, "grr", "core", "requirements", "windows.txt")]
).pop()

def MakeClientSdist(self):
os.chdir(os.path.join(args.grr_src, "grr/client/"))
Expand All @@ -216,10 +216,7 @@ def MakeClientSdist(self):
])
return glob.glob(
os.path.join(args.build_dir, "grr_response_client-*.zip")
).pop(), [
os.path.join(args.grr_src, "grr", "client", "requirements", "windows.txt"),
os.path.join(args.grr_src, "grr", "client", "requirements", "windows_only.txt"),
]
).pop()

def MakeClientBuilderSdist(self):
os.chdir(os.path.join(args.grr_src, "grr/client_builder/"))
Expand All @@ -232,15 +229,14 @@ def MakeClientBuilderSdist(self):
])
return glob.glob(
os.path.join(args.build_dir, "grr_response_client_builder-*.zip")
).pop(), [os.path.join(args.grr_src, "grr", "client_builder", "requirements", "windows.txt")]
).pop()

def InstallGRR(self, path: str, requirements_files: Optional[List[str]] = None):
"""Installs GRR."""
if requirements_files:
for req_file in requirements_files:
install_requirements_cmd = ["pip", "install", "--require-hashes", "-r", req_file]
subprocess.check_call(install_requirements_cmd)
def InstallRequirements(self, requirements_file: str) -> None:
install_requirements_cmd = ["pip", "install", "--require-hashes", "-r", requirements_file]
subprocess.check_call(install_requirements_cmd)

def InstallGRR(self, path: str):
"""Installs GRR."""
cmd64 = ["pip", "install", "--no-deps", "--no-index"]

if args.wheel_dir:
Expand Down Expand Up @@ -429,15 +425,19 @@ def Build(self):

if not os.path.exists(args.grr_src):
self.GitCheckoutGRR()
proto_sdist, proto_requirements = self.MakeProtoSdist()
core_sdist, core_requirements = self.MakeCoreSdist()
client_sdist, client_requirements = self.MakeClientSdist()
client_builder_sdist, client_builder_requirements = self.MakeClientBuilderSdist()

self.InstallGRR(proto_sdist, proto_requirements)
self.InstallGRR(core_sdist, core_requirements)
self.InstallGRR(client_sdist, client_requirements)
self.InstallGRR(client_builder_sdist, client_builder_requirements)
proto_sdist = self.MakeProtoSdist()
core_sdist = self.MakeCoreSdist()
client_sdist = self.MakeClientSdist()
client_builder_sdist = self.MakeClientBuilderSdist()

self.InstallRequirements(os.path.join(
args.grr_src, "travis/requirements/windows.txt"
))

self.InstallGRR(proto_sdist)
self.InstallGRR(core_sdist)
self.InstallGRR(client_sdist)
self.InstallGRR(client_builder_sdist)
self.BuildTemplates()
if args.test_repack_install:
self._RepackTemplates()
Expand Down
94 changes: 0 additions & 94 deletions grr/client/requirements/centos.txt

This file was deleted.

29 changes: 0 additions & 29 deletions grr/client/requirements/osx.txt

This file was deleted.

71 changes: 0 additions & 71 deletions grr/client/requirements/osx_only.txt

This file was deleted.

Loading

0 comments on commit 6db93a5

Please sign in to comment.