Skip to content

Commit

Permalink
Build saithrift with python3.9 in bullseye (#1541) (#1544)
Browse files Browse the repository at this point in the history
* Build saithrift with python3.9 in bullseye

Bullseye upgrade the python to python3.9 and other image, like buster still using python 2.7.
To build with different python in different image, add a condition for copy differernt install file in different type of image.

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* change the release name to version number and reuse existing files

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

Co-authored-by: richardyu <richardyu@contoso.com>

Co-authored-by: richardyu <richardyu@contoso.com>
  • Loading branch information
richardyu-ms and richardyu committed Jul 26, 2022
1 parent f79004c commit 6a9def5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
14 changes: 10 additions & 4 deletions debian/copy_installer.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
if [[ x"$1" =~ x"v2" ]]
then
echo "Copy python-saithriftv2.install as python-saithrift.install"
cp ./debian/installerFiles/python-saithriftv2.install ./debian/python-saithrift.install
echo "Copy python3-saithrift.install as python-saithrift.install"
cp ./debian/installerFiles/python3-saithrift.install ./debian/python-saithrift.install
else
echo "Copy python-saithriftv1.install as python-saithrift.install"
cp ./debian/installerFiles/python-saithriftv1.install ./debian/python-saithrift.install
if [ $(lsb_release -sr) -ge 11 ]
then
echo "Copy python3-saithrift.install as python-saithrift.install after Ver.11 releases"
cp ./debian/installerFiles/python3-saithrift.install ./debian/python-saithrift.install
else
echo "Copy python2.7-saithrift.install as python-saithrift.install"
cp ./debian/installerFiles/python2.7-saithrift.install ./debian/python-saithrift.install
fi
fi
2 changes: 2 additions & 0 deletions debian/installerFiles/python-saithriftv1-bullseye.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#compatiable with bullseye python 3.9 environment
debian/usr/local/lib/python3.9/site-packages/* /usr/lib/python3/dist-packages/
1 change: 0 additions & 1 deletion debian/installerFiles/python-saithriftv2.install

This file was deleted.

2 changes: 2 additions & 0 deletions debian/installerFiles/python3-saithrift.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#compatiable with bullseye python 3.9 environment and saithriftv2 build with python3
debian/usr/local/lib/python3*/site-packages/* /usr/lib/python3/dist-packages/

0 comments on commit 6a9def5

Please sign in to comment.