Skip to content

Commit 0e7076a

Browse files
committed
Update the Python versions
1 parent 5e16e06 commit 0e7076a

File tree

10 files changed

+78
-18
lines changed

10 files changed

+78
-18
lines changed

.travis/script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ wrapped_run() {
1818

1919
wrapped_run plugin
2020
wrapped_run python python2.7.17
21-
wrapped_run python python3.7.5
22-
wrapped_run python python3.8.0
21+
wrapped_run python python3.7.6
22+
wrapped_run python python3.8.1
2323
wrapped_run python scipy
2424
wrapped_run python xonsh

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ are located on the [wiki][WIKI_DEVS].
1717
Ready to use [AppImage][APPIMAGE] distributions of [Python][PYTHON] are provided
1818
[below](##Downloads) or in the [release][RELEASE] area. A one liner example is:
1919
```
20-
wget -cq https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/python3.8.0-x86_64.AppImage && chmod u+x python3.8.0-x86_64.AppImage && ./python3.8.0-x86_64.AppImage
20+
wget -cq https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/python3.8.1-x86_64.AppImage && chmod u+x python3.8.1-x86_64.AppImage && ./python3.8.1-x86_64.AppImage
2121
```
2222
which will install and run a [Python][PYTHON] instance. See the instructions on
2323
the [wiki][WIKI_USERS] for more detailed usage.
2424

2525
## Downloadable AppImages
2626

2727
[![Python 2.7](https://img.shields.io/badge/python2.7-x86_64-blue.svg)](https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/python2.7.17-x86_64.AppImage)
28-
[![Python 3.7](https://img.shields.io/badge/python3.7-x86_64-blue.svg)](https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/python3.7.5-x86_64.AppImage)
29-
[![Python 3.8](https://img.shields.io/badge/python3.8-x86_64-blue.svg)](https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/python3.8.0-x86_64.AppImage)
28+
[![Python 3.7](https://img.shields.io/badge/python3.7-x86_64-blue.svg)](https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/python3.7.6-x86_64.AppImage)
29+
[![Python 3.8](https://img.shields.io/badge/python3.8-x86_64-blue.svg)](https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/python3.8.1-x86_64.AppImage)
3030
[![Scipy](https://img.shields.io/badge/scipy-x86_64-blue.svg)](https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/scipy-x86_64.AppImage)
3131
[![Xonsh](https://img.shields.io/badge/xonsh-x86_64-blue.svg)](https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/xonsh-x86_64.AppImage)
3232
[![Plugin](https://img.shields.io/badge/plugin-x86_64-blue.svg)](https://github.com/niess/linuxdeploy-plugin-python/releases/download/continuous/linuxdeploy-plugin-python-x86_64.AppImage)

appimage/recipes/python3.7.5.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

appimage/recipes/python3.7.6.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export PYTHON_VERSION="3.7.6"
2+
export PIP_REQUIREMENTS=

appimage/recipes/python3.8.0.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

appimage/recipes/python3.8.1.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export PYTHON_VERSION="3.8.1"
2+
export PIP_REQUIREMENTS=

appimage/recipes/scipy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export PYTHON_VERSION="3.7.5"
1+
export PYTHON_VERSION="3.7.6"
22
export PIP_REQUIREMENTS="numpy scipy matplotlib sympy pandas"
33

44
export LD_LIBRARY_PATH="AppDir/usr/python/lib/python3.7/site-packages/numpy/.libs:${LD_LIBRARY_PATH}"

appimage/recipes/xonsh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export PYTHON_VERSION="3.8.0"
1+
export PYTHON_VERSION="3.8.1"
22
export PIP_REQUIREMENTS="xonsh prompt_toolkit gnureadline Pygments"
33
export PYTHON_ENTRYPOINT='"-u" "-c" "from xonsh.main import main; main()"'

appimage/update-version.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#! /bin/bash
2+
3+
set -e
4+
5+
6+
# Parse the CLI
7+
show_usage () {
8+
echo "Usage: $(basename $0) <old version tag> <new version tag>"
9+
echo
10+
echo "Update a Python version tag."
11+
echo ""
12+
}
13+
14+
15+
while [ ! -z "$1" ]; do
16+
case "$1" in
17+
-h)
18+
show_usage
19+
exit 0
20+
;;
21+
-*)
22+
echo "Invalid option: $1."
23+
echo
24+
show_usage
25+
exit 1
26+
;;
27+
*)
28+
break
29+
esac
30+
done
31+
32+
if [ "$#" -ne 2 ]; then
33+
echo "Invalid number of arguments. Got $#, expected 2."
34+
echo
35+
show_usage
36+
exit 1
37+
fi
38+
39+
40+
# Process the version tag
41+
match_and_replace() {
42+
local prefix="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
43+
if [ ! -f "${prefix}/appimage/recipes/python$1.sh" ]; then
44+
echo "Error: invalid version tag: $1. Aborting."
45+
exit 1
46+
fi
47+
48+
local files=".travis/script.sh README.md appimage/recipes/python$1.sh tests/test_plugin.py"
49+
50+
local file
51+
for file in ${files}; do
52+
echo "updating tag in ${file}"
53+
sed -i -- "s/$1/$2/g" "${prefix}/${file}"
54+
done
55+
56+
git mv "${prefix}/appimage/recipes/python$1.sh" \
57+
"${prefix}/appimage/recipes/python$2.sh"
58+
}
59+
60+
match_and_replace "$@"

tests/test_plugin.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77

88

9-
TAGS = ("python2.7.17", "python3.7.5", "python3.8.0")
9+
TAGS = ("python2.7.17", "python3.7.6", "python3.8.1")
1010

1111
TESTDIR = "/tmp/test-linuxdeploy-plugin-python"
1212
ROOTDIR = os.path.realpath(os.path.dirname(__file__) + "/..").strip()
@@ -81,37 +81,37 @@ def __init__(self, *args, **kwargs):
8181
def test_python38_base(self):
8282
"""Test the base functionalities of a Python 3 AppImage
8383
"""
84-
self.check_base("python3.8.0")
84+
self.check_base("python3.8.1")
8585

8686

8787
def test_python38_modules(self):
8888
"""Test the modules availability of a Python 3 AppImage
8989
"""
90-
self.check_modules("python3.8.0")
90+
self.check_modules("python3.8.1")
9191

9292

9393
def test_python38_venv(self):
9494
"""Test venv from a Python 3 AppImage
9595
"""
96-
self.check_venv("python3.8.0")
96+
self.check_venv("python3.8.1")
9797

9898

9999
def test_python37_base(self):
100100
"""Test the base functionalities of a Python 3 AppImage
101101
"""
102-
self.check_base("python3.7.5")
102+
self.check_base("python3.7.6")
103103

104104

105105
def test_python37_modules(self):
106106
"""Test the modules availability of a Python 3 AppImage
107107
"""
108-
self.check_modules("python3.7.5")
108+
self.check_modules("python3.7.6")
109109

110110

111111
def test_python37_venv(self):
112112
"""Test venv from a Python 3 AppImage
113113
"""
114-
self.check_venv("python3.7.5")
114+
self.check_venv("python3.7.6")
115115

116116

117117
def test_python2_base(self):

0 commit comments

Comments
 (0)