-
Notifications
You must be signed in to change notification settings - Fork 11
/
get_source_for_patching.sh
22 lines (17 loc) · 1.09 KB
/
get_source_for_patching.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh
PYTHONVERSION=2.7.13
# Python-$PYTHONVERSION
echo "Downloading Python-$PYTHONVERSION"
mkdir tmp
(cd tmp ; curl -OL https://www.python.org/ftp/python/$PYTHONVERSION/Python-$PYTHONVERSION.tgz ; tar -xvzf Python-$PYTHONVERSION.tgz ; rm Python-$PYTHONVERSION.tgz)
# ffi is not done, because: only one line of change + can't download automatically.
echo "Computing patches for Python-$PYTHONVERSION"
diff -Naur tmp/Python-$PYTHONVERSION/Include Python-$PYTHONVERSION/Include > Python_Include.patch
diff -Naur tmp/Python-$PYTHONVERSION/Lib Python-$PYTHONVERSION/Lib > Python_Lib.patch
diff -Naur tmp/Python-$PYTHONVERSION/Modules Python-$PYTHONVERSION/Modules > Python_Modules.patch
diff -Naur tmp/Python-$PYTHONVERSION/Parser Python-$PYTHONVERSION/Parser > Python_Parser.patch
diff -Naur tmp/Python-$PYTHONVERSION/Objects Python-$PYTHONVERSION/Objects > Python_Objects.patch
diff -Naur tmp/Python-$PYTHONVERSION/Python Python-$PYTHONVERSION/Python > Python_Python.patch
diff -Naur tmp/Python-$PYTHONVERSION/setup.py Python-$PYTHONVERSION/setup.py > Python_setup.patch
echo "Done. Cleanup:"
rm -rf tmp/