File tree Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Expand file tree Collapse file tree 5 files changed +73
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ description-file = "README.md"
18
18
# `typing.NoReturn` function signature support. (Also, many other `typing` module
19
19
# items were only introduced post-release in 3.6 and version restrictions on these
20
20
# versions ensure that those are all available as well.)
21
+ #
22
+ # Maintain this concurrently with verify.sh
21
23
requires-python = " >=3.6.2,!=3.7.0,!=3.7.1"
22
24
requires = [
23
25
" multiaddr (>=0.0.7)" ,
Original file line number Diff line number Diff line change
1
+ ARG PYTHON_VERSION
2
+
3
+ FROM python:${PYTHON_VERSION}
4
+
5
+ RUN pip install --upgrade pip
6
+ RUN pip install tox
7
+
8
+ # Mount the source code here, instead of to /usr/src/app.
9
+ # Otherwise, tox will fail due to folder being read-only.
10
+ # Mount only the source code; avoid mounting working folders.
11
+
12
+ RUN mkdir /source
13
+ ADD entrypoint.sh /
14
+
15
+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ cp -r /source/* /usr/src/app/
4
+
5
+ exec $@
6
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ python_version=$1
6
+ script_path=$( dirname $0 )
7
+ source=$( realpath " $script_path /../.." )
8
+ tag=py-ipfs-http-client-verify:$python_version
9
+
10
+ pushd " $script_path "
11
+
12
+ echo " Building validator for Python $python_version ..."
13
+
14
+ docker build --build-arg PYTHON_VERSION=" $python_version " -t " $tag " .
15
+
16
+ echo " Validating version $python_version "
17
+
18
+ docker run \
19
+ -it \
20
+ -v " $source /docs" :/source/docs:ro \
21
+ -v " $source /ipfshttpclient" :/source/ipfshttpclient:ro \
22
+ -v " $source /test" :/source/test:ro \
23
+ -v " $source /pyproject.toml" :/source/pyproject.toml:ro \
24
+ -v " $source /README.md" :/source/README.md:ro \
25
+ -v " $source /tox.ini" :/source/tox.ini:ro \
26
+ -w /usr/src/app \
27
+ " $tag " \
28
+ tox -e styleck -e typeck
29
+
30
+ popd
31
+
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ function validate() {
6
+ ./tools/verify/validate.sh " $1 "
7
+ }
8
+
9
+ if [ -z " $1 " ]; then
10
+ echo " Validating minimum point release of each supported minor version..."
11
+
12
+ # Maintain this concurrently with [tool.flit.metadata].requires-python in pyproject.toml.
13
+ validate 3.6.2
14
+ validate 3.7.2
15
+ validate 3.8.0
16
+ else
17
+ echo " Validating only $1 ..."
18
+ validate " $1 "
19
+ fi
You can’t perform that action at this time.
0 commit comments