forked from sympy/sympy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_requirements.sh
executable file
·56 lines (49 loc) · 1.08 KB
/
update_requirements.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
#
# Run as
#
# $ ./update_requirements.sh python
#
# where python is the name of the (on PATH) interpreter to use. This will
# create a virtual environment with venv, rerun the pip install command to get
# latest versions meeting the constraints and then use pip list to recreate
# requirements.txt with updated versions.
#
# This will overwrite the requirements.txt file and show the diff
if [ -z $1 ];
then
python=python3
else
python=$1
fi
tmp_dir=$(mktemp -d -t venv-XXXX)
venv_dir=$tmp_dir/venv
$python -m venv $venv_dir
. $venv_dir/bin/activate
pip install -U pip wheel
# Installing tensorflow needs a lot of memory. Give at least 2GiB memory for a
# VM or it will fail printing "Collecting tensorflow... Killed"
pip install\
mpmath\
matplotlib\
numpy\
scipy\
aesara\
ipython\
symengine\
tensorflow\
cython\
llvmlite\
wurlitzer\
numexpr\
'antlr4-python3-runtime==4.7.*'\
sphinx\
sphinx-math-dollar\
furo\
sphinx-copybutton\
sphinx-reredirects\
myst-parser\
linkify-it-py\
#
pip freeze > requirements.txt
git diff requirements.txt