File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changes here will be overwritten by Copier
2- _commit : 0.8.1
2+ _commit : 0.9.2
33_src_path : gh:pawamoy/copier-pdm
44author_email : pawamoy@pm.me
5- author_fullname : " Timoth \xE9 e Mazzucotelli"
5+ author_fullname : Timothée Mazzucotelli
66author_username : pawamoy
77copyright_date : ' 2021'
8- copyright_holder : " Timoth \xE9 e Mazzucotelli"
8+ copyright_holder : Timothée Mazzucotelli
99copyright_holder_email : pawamoy@pm.me
1010copyright_license : ISC License
1111project_description : A legacy Python handler for mkdocstrings.
@@ -17,3 +17,4 @@ repository_name: python-legacy
1717repository_namespace : mkdocstrings
1818repository_provider : github.com
1919use_precommit : false
20+
Original file line number Diff line number Diff line change 2828 uses : actions/checkout@v2
2929
3030 - name : Set up PDM
31- uses : pdm-project/setup-pdm@v2.5
31+ uses : pdm-project/setup-pdm@v2.6
3232 with :
3333 python-version : " 3.8"
3434
8686 uses : actions/checkout@v2
8787
8888 - name : Set up PDM
89- uses : pdm-project/setup-pdm@v2.5
89+ uses : pdm-project/setup-pdm@v2.6
9090 with :
9191 python-version : ${{ matrix.python-version }}
9292
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ plugins:
7070 nav_file : SUMMARY.md
7171- section-index
7272- coverage
73+ - section-index
7374- mkdocstrings :
7475 handlers :
7576 python :
Original file line number Diff line number Diff line change 33
44PYTHON_VERSIONS=" ${PYTHON_VERSIONS-3.7 3.8 3.9 3.10 3.11} "
55
6+ restore_previous_python_version () {
7+ if pdm use -f " $1 " & > /dev/null; then
8+ echo " > Restored previous Python version: ${1##*/ } "
9+ fi
10+ }
11+
612if [ -n " ${PYTHON_VERSIONS} " ]; then
13+ old_python_version=" $( pdm config python.path) "
14+ echo " > Currently selected Python version: ${old_python_version##*/ } "
15+ trap " restore_previous_python_version ${old_python_version} " EXIT
716 for python_version in ${PYTHON_VERSIONS} ; do
817 if pdm use -f " python${python_version} " & > /dev/null; then
9- echo " > pdm run $@ (Python ${python_version} )"
18+ echo " > pdm run $@ (python ${python_version} )"
1019 pdm run " $@ "
1120 else
1221 echo " > pdm use -f python${python_version} : Python interpreter not available?" >&2
You can’t perform that action at this time.
0 commit comments