Skip to content

Commit

Permalink
pylint 2.16.4 python 3.11.1 (#49)
Browse files Browse the repository at this point in the history
musl -> gnu

```
   File "/lib/python3.10/site-packages/dill/_dill.py", line 1854, in <module>
     _PyCapsule_New = ctypes.pythonapi.PyCapsule_New
 AttributeError: 'NoneType' object has no attribute 'PyCapsule_New'
```
  • Loading branch information
hemnstill authored Mar 6, 2023
1 parent 87760da commit 54f117a
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
toolset:
required: false
type: string
default: 'glibc'
default: 'gnu'
version:
required: false
type: string
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
secrets:
_WORKFLOW: ${{ secrets._CURRENT_TOOL }}

alpine-musl:
ubuntu-gnu:
needs: prejob
if: ${{ needs.prejob.outputs.workflow == github.workflow }}
uses: ./.github/workflows/build-alpine.yml
uses: ./.github/workflows/build-ubuntu.yml
with:
workflow: ${{ github.workflow }}

Expand All @@ -26,18 +26,18 @@ jobs:
toolset: msvc

test-ubuntu:
needs: alpine-musl
needs: ubuntu-gnu
uses: ./.github/workflows/test-ubuntu.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl
artifact: build-gnu

test-alpine:
needs: alpine-musl
needs: ubuntu-gnu
uses: ./.github/workflows/test-alpine.yml
with:
workflow: ${{ github.workflow }}
artifact: build-musl
artifact: build-gnu

test-windows-msvc:
needs: windows-msvc
Expand All @@ -54,14 +54,14 @@ jobs:
artifact: build-msvc

release:
needs: [test-alpine, test-ubuntu, test-windows-msvc, test-nanoserver-msvc]
needs: [test-ubuntu, test-alpine, test-windows-msvc, test-nanoserver-msvc]
uses: ./.github/workflows/release.yml
with:
workflow: ${{ github.workflow }}
tool_version: '2.15.9'
tool_version: '2.16.4'
prepare_body: |
bsdtar -Oxf ./build-musl/build-musl.tar.gz build-musl.md >> body.md
bsdtar -Oxf ./build-gnu/build-gnu.tar.gz build-gnu.md >> body.md
bsdtar -Oxf ./build-msvc/build-msvc.tar.gz build-msvc.md >> body.md
artifacts: ./build-musl/build-musl.tar.gz, ./build-msvc/build-msvc.tar.gz
artifacts: ./build-gnu/build-gnu.tar.gz, ./build-msvc/build-msvc.tar.gz
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .tools/install_alpine_glibc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

is_alpine_os=false && [[ -f "/etc/alpine-release" ]] && is_alpine_os=true

if [[ "$is_alpine_os" == true ]]; then
apk add --no-cache gcompat

{ printf '%s' "-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m
1QIDAQAB
-----END PUBLIC KEY-----"
} > "/etc/apk/keys/sgerrand.rsa.pub"
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk
apk add --force-overwrite glibc-2.35-r0.apk glibc-bin-2.35-r0.apk glibc-i18n-2.35-r0.apk
/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
export LC_ALL=en_US.UTF-8
fi
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/busybox-1.35.0-FRP-4784/total?label=⭳%20busybox-1.35.0-FRP-4784)](https://github.com/hemnstill/StandaloneTools/releases/tag/busybox-1.35.0-FRP-4784) | [![GitHub Repo stars](https://img.shields.io/github/stars/rmyorston/busybox-w32?style=social&label=busybox-w32)](https://github.com/rmyorston/busybox-w32) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/rmyorston/busybox-w32)](https://frippery.org/busybox/release-notes/current.html) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/python-3.11.1/total?label=⭳%20python-3.11.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/python-3.11.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/indygreg/python-build-standalone?style=social&label=python-build-standalone)](https://github.com/indygreg/python-build-standalone) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/indygreg/python-build-standalone)](https://python-build-standalone.readthedocs.io/en/latest/) <br> [![GitHub Repo stars](https://img.shields.io/github/stars/python/cpython?style=social&label=python)](https://github.com/python/cpython) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python/cpython)](https://docs.python.org/3/) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/poetry-1.3.1/total?label=⭳%20poetry-1.3.1)](https://github.com/hemnstill/StandaloneTools/releases/tag/poetry-1.3.1) | [![GitHub Repo stars](https://img.shields.io/github/stars/python-poetry/poetry?style=social&label=poetry)](https://github.com/python-poetry/poetry) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python-poetry/poetry)](https://python-poetry.org/docs/) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/pylint-2.15.9/total?label=⭳%20pylint-2.15.9)](https://github.com/hemnstill/StandaloneTools/releases/tag/pylint-2.15.9) | [![GitHub Repo stars](https://img.shields.io/github/stars/PyCQA/pylint?style=social&label=pylint)](https://github.com/PyCQA/pylint) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/PyCQA/pylint)](https://pylint.pycqa.org/en/latest/) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/pylint-2.16.4/total?label=⭳%20pylint-2.16.4)](https://github.com/hemnstill/StandaloneTools/releases/tag/pylint-2.16.4) | [![GitHub Repo stars](https://img.shields.io/github/stars/PyCQA/pylint?style=social&label=pylint)](https://github.com/PyCQA/pylint) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/PyCQA/pylint)](https://pylint.pycqa.org/en/latest/) |
| [![GitHub release (by tag)](https://img.shields.io/github/downloads/hemnstill/StandaloneTools/mypy-0.991/total?label=⭳%20mypy-0.991)](https://github.com/hemnstill/StandaloneTools/releases/tag/mypy-0.991) | [![GitHub Repo stars](https://img.shields.io/github/stars/python/mypy?style=social&label=mypy)](https://github.com/python/mypy) [![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/python/mypy)](https://mypy.readthedocs.io/en/latest/) |


26 changes: 13 additions & 13 deletions pylint/build_musl.sh → pylint/build_gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
dp0="$(realpath "$(dirname "$0")")"
set -e

apt update
apt install -y wget

tool_name="pylint"
tool_version="2.15.9"
self_name="python-3.10.9"
tool_version="2.16.4"
self_name="python-3.11.1"
self_toolset_name="build-gnu"
echo "::set-output name=tool_name::$tool_name"

release_version_dirpath="$dp0/release/$tool_name-$tool_version"
mkdir -p "$release_version_dirpath" && cd "$dp0/release"

echo "download python install script ..."
python_bin_download_url="https://github.com/hemnstill/StandaloneTools/releases/download/$self_name/build-musl.tar.gz"
python_bin_download_url="https://github.com/hemnstill/StandaloneTools/releases/download/$self_name/$self_toolset_name.tar.gz"
python_download_zip="$dp0/release/$self_name.tar.gz"
[[ ! -f "$python_download_zip" ]] && wget "$python_bin_download_url" -O "$python_download_zip"

Expand All @@ -27,11 +31,6 @@ bsdtar="$dp0/release/bsdtar"
cpython_bin="$release_version_dirpath/Scripts/bin/python3"
[[ ! -f "$cpython_bin" ]] && tar -xf "$python_download_zip" -C "$release_version_dirpath"

# File "/lib/python3.10/site-packages/dill/_dill.py", line 1854, in <module>
# _PyCapsule_New = ctypes.pythonapi.PyCapsule_New
# AttributeError: 'NoneType' object has no attribute 'PyCapsule_New'
"$cpython_bin" -m pip install "dill==0.3.5.1" --no-binary :all:

"$cpython_bin" -m pip install "$tool_name==$tool_version"

cp -f "$dp0/release/pylint.sh" "$release_version_dirpath/"
Expand All @@ -40,14 +39,15 @@ cp -f "$dp0/release/__main__pylint.py" "$release_version_dirpath/"
echo "creating archive ..."

cd "$release_version_dirpath"
{ printf '%s
' "$(./"$tool_name.sh" --version)"
} > build-musl.md
{ printf '### %s
%s
' "$self_toolset_name.tar.gz" "$(./"$tool_name.sh" --version)"
} > $self_toolset_name.md

cat build-musl.md
cat $self_toolset_name.md

"$bsdtar" \
--exclude="__pycache__" \
--exclude="Scripts/Scripts" \
--exclude="*.whl" \
-czvf ../build-musl.tar.gz .
-czvf ../$self_toolset_name.tar.gz .
18 changes: 10 additions & 8 deletions pylint/build_msvc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ dp0="$(realpath "$(dirname "$0")")"
set -e

tool_name="pylint"
tool_version="2.15.9"
self_name="python-3.10.9"
tool_version="2.16.4"
self_name="python-3.11.1"
self_toolset_name="build-msvc"
echo "::set-output name=tool_name::$tool_name"

release_version_dirpath="$dp0/release/$tool_name-$tool_version"
mkdir -p "$release_version_dirpath" && cd "$dp0/release"

echo "download python install script ..."
python_bin_download_url="https://github.com/hemnstill/StandaloneTools/releases/download/$self_name/build-msvc.tar.gz"
python_bin_download_url="https://github.com/hemnstill/StandaloneTools/releases/download/$self_name/$self_toolset_name.tar.gz"
python_download_zip="$dp0/release/$self_name.tar.gz"
[[ ! -f "$python_download_zip" ]] && wget "$python_bin_download_url" -O "$python_download_zip"

Expand All @@ -35,14 +36,15 @@ cp -f "$dp0/release/__main__pylint.py" "$release_version_dirpath/"
echo "creating archive ..."

cd "$release_version_dirpath"
{ printf 'Python %s
' "$("$cpython_bin" -c "import sys; print(sys.version)")"
} > build-msvc.md
{ printf '### %s
%s
' "$self_toolset_name.tar.gz" "$(./"$tool_name.bat" --version)"
} > $self_toolset_name.md

cat build-msvc.md
cat $self_toolset_name.md

"$bsdtar" \
--exclude="__pycache__" \
--exclude="Scripts/Scripts" \
--exclude="*.whl" \
-czvf ../build-msvc.tar.gz .
-czvf ../$self_toolset_name.tar.gz .
8 changes: 5 additions & 3 deletions pylint/test_linux.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

../.tools/install_alpine_glibc.sh

test_version() {
assertEquals "pylint 2.15.9
astroid 2.12.13
Python 3.10.9 (main, Dec 21 2022, 04:01:57) [Clang 14.0.3 ]" "$(../bin/pylint.sh --version)"
assertEquals "pylint 2.16.4
astroid 2.15.0
Python 3.11.1 (main, Jan 16 2023, 22:40:32) [Clang 15.0.7 ]" "$(../bin/pylint.sh --version)"
}

# Load and run shUnit2.
Expand Down
6 changes: 3 additions & 3 deletions pylint/test_windows.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

test_version() {
assertEquals "pylint 2.15.9
astroid 2.12.13
Python 3.10.9 (main, Dec 21 2022, 04:16:31) [MSC v.1929 64 bit (AMD64)]" "$(../bin/pylint.bat --version | dos2unix )"
assertEquals "pylint 2.16.4
astroid 2.15.0
Python 3.11.1 (main, Jan 16 2023, 20:56:10) [MSC v.1929 64 bit (AMD64)]" "$(../bin/pylint.bat --version | dos2unix )"
}

# Load and run shUnit2.
Expand Down

0 comments on commit 54f117a

Please sign in to comment.