Skip to content

Commit e5e2c15

Browse files
committed
Script for making final installation package, pip requirents
1 parent 33bc079 commit e5e2c15

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

.github/workflows/build_installation_package.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ jobs:
1515
sudo apt update && sudo apt install -y libcurl4-gnutls-dev
1616
$(which python3) --version
1717
bash download_dependencies.sh
18-
rm -rf .git
19-
mkdir -p /tmp/dqmgui
20-
tar -cf /tmp/dqmgui/dqmgui_installation_package.tar.gz . -I "gzip --best"
18+
bash build_installation_package.sh
2119
- name: Archive package artifact
2220
uses: actions/upload-artifact@v3
2321
with:

build_installation_package.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Script for creating a single compressed archive, after download_dependencies.sh
4+
# has been executed.
5+
# It will create an archive in the $TARGET_DIRECTORY, named $ARCHIVE_NAME.
6+
7+
TARGET_DIRECTORY="/tmp/dqmgui"
8+
ARCHIVE_NAME="dqmgui_installation_package.tar.gz"
9+
10+
mkdir -p "$TARGET_DIRECTORY"
11+
tar -cf "$TARGET_DIRECTORY/$ARCHIVE_NAME" . -I "gzip --best" --exclude "./git" --exclude "./github"

download_dependencies.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
# Script that downloads all online dependencies for [Legacy] DQMGUI
44
# in order to install them at P5, where there is no access to neither GitHub,
55
# nor PyPI. This script is to be called whenever those packages are to be recreated, e.g
6+
# new PyPI packages version, new DQMGUI repo version, new DMQM/deployment version.
67
#
8+
# For every element in the repos_to_download array, the equivalent repo and tag/ref are
9+
# cloned and compressed under a directory of the same name.
10+
# All PyPI packages (see requirements.txt) are compressed together, under pip/.
11+
#
12+
# To change any of the package versions, edit config.sh
13+
#
14+
# Dependency: libcurl4-gnutls-dev for curl-config
715

816
set -ex
917

@@ -81,12 +89,11 @@ download_repos() {
8189
}
8290

8391
download_python_packages() {
84-
declare -a pypi_requirements=(pip sphinx wheel cherrypy jsmin pycurl numpy matplotlib pillow Cheetah3 virtualenv)
8592
PIP_TEMP_DIR=/tmp/pip
8693
mkdir -p $PIP_TEMP_DIR
8794
mkdir -p "$SCRIPT_DIR/pypi"
8895
python_exe=$(which python3)
89-
eval "$python_exe -m pip download ${pypi_requirements[*]} --destination-directory $PIP_TEMP_DIR"
96+
eval "$python_exe -m pip download -r requirements.txt --destination-directory $PIP_TEMP_DIR"
9097
tar -cf "$SCRIPT_DIR/pypi/pypi.tar.gz" --directory=/tmp pip -I "gzip --best"
9198
rm -rf $PIP_TEMP_DIR
9299
}

requirements.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# A duplicate of DQMGUI's requirements.txt,
2+
# we could probably use the one inside the repo too,
3+
# but well.
4+
pip
5+
sphinx<8.0.0
6+
wheel
7+
cherrypy<19.0.0
8+
jsmin<4.0.0
9+
pycurl<8.0.0
10+
numpy<1.25.0
11+
matplotlib<3.8.0
12+
pillow<11.0.0
13+
Cheetah3<3.3.0
14+
virtualenv

0 commit comments

Comments
 (0)