forked from scientificlinux/python-rpmpatch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_and_fix_venv.sh
More file actions
executable file
·22 lines (19 loc) · 965 Bytes
/
create_and_fix_venv.sh
File metadata and controls
executable file
·22 lines (19 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
virtualenv -p /usr/bin/python3 venv
. venv/bin/activate
# pip install -r ./requirements.txt
#
# This sucks - we have to manually copy rpm package :/ to venv
#
echo "Installing rpm from host site-packages"
cp -Rv /usr/lib64/python3*/site-packages/rpm ./venv/lib64/python3*/site-packages
echo "Installing libdnf from host site-packages"
cp -Rv /usr/lib64/python3*/site-packages/libdnf ./venv/lib64/python3*/site-packages
echo "Installing libcomps from host site-packages"
cp -Rv /usr/lib64/python3*/site-packages/libcomps ./venv/lib64/python3*/site-packages
echo "Installing gpg from host site-packages"
cp -Rv /usr/lib64/python3*/site-packages/gpg ./venv/lib64/python3*/site-packages
echo "Installing hawkey from host site-packages"
cp -Rv /usr/lib64/python3*/site-packages/hawkey ./venv/lib64/python3*/site-packages
echo "Installing dnf from host site-packages"
cp -Rv /usr/lib/python3*/site-packages/dnf* ./venv/lib64/python3*/site-packages