Skip to content

Commit

Permalink
add platform specific dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
s-westphal committed Jun 18, 2024
1 parent 4b124e0 commit 4624ccb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
3 changes: 1 addition & 2 deletions grr/core/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ python-dateutil==2.8.2
pytz==2022.7.1
PyYAML==6.0.1
requests==2.25.1
yara-python==4.2.3
fleetspeak-server-bin==0.1.13
yara-python==4.2.3
11 changes: 5 additions & 6 deletions grr/server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import configparser
import itertools
import os
import platform
import shutil
import subprocess

Expand Down Expand Up @@ -150,7 +151,7 @@ def make_release_tree(self, base_dir, files):
"grr_response_server/gui/local/static", ignore_dirs=IGNORE_GUI_DIRS
),
[REL_INI_PATH],
["requirements.in"],
["requirements.in", "requirements_lib.in"],
)
)

Expand Down Expand Up @@ -199,13 +200,11 @@ def make_release_tree(self, base_dir, files):
# Ubuntu Jammy, see
# https://packages.ubuntu.com/en/jammy/python3-mysqldb
"mysqldatastore": ["mysqlclient>=1.3.10,<=1.4.6"],
# TODO: We currently release fleetspeak-server-bin packages
# for Linux only.
':sys_platform=="linux"': [
"fleetspeak-server-bin==0.1.13",
],
},
data_files=data_files,
)

if platform.system() == "Linux":
setup_args["install_requires"].extend(parse_requirements("requirements_lin.in"))

setup(**setup_args)
9 changes: 9 additions & 0 deletions travis/compile_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -ex
DIR="$(dirname "$(which "$0")")"

OUT_FOLDER=$1
OS=$2

mkdir "$OUT_FOLDER"

Expand All @@ -17,10 +18,18 @@ pip-compile --generate-hashes "$DIR/../grr/core/requirements.in" \
-o "$OUT_FOLDER/core_requirements.txt"
pip-compile --generate-hashes "$DIR/../grr/server/requirements.in" \
-o "$OUT_FOLDER/server_requirements.txt"
if OS == "ubuntu"; then
pip-compile --generate-hashes "$DIR/../grr/server/requirements_lin.in" \
-o "$OUT_FOLDER/server_requirements_lin.txt"
fi
pip-compile --generate-hashes "$DIR/../grr/proto/requirements.in" \
-o "$OUT_FOLDER/proto_requirements.txt"
pip-compile --generate-hashes "$DIR/../grr/client/requirements.in" \
-o "$OUT_FOLDER/client_requirements.txt"
if OS == "win"; then
pip-compile --generate-hashes "$DIR/../grr/server/requirements_win.in" \
-o "$OUT_FOLDER/client_requirements_win.txt"
fi
pip-compile --generate-hashes "$DIR/../grr/client_builder/requirements.in" \
-o "$OUT_FOLDER/client_builder_requirements.txt"
pip-compile --generate-hashes "$DIR/../grr/test/requirements.in" \
Expand Down

0 comments on commit 4624ccb

Please sign in to comment.