|
47 | 47 | run: | |
48 | 48 | sudo apt-get update |
49 | 49 | sudo apt-get install -y gawk sed shtool \ |
50 | | - libffi-dev yasm texinfo libgnutls28-dev gcc-multilib jq |
| 50 | + libffi-dev yasm texinfo libgnutls28-dev gcc-multilib jq patchelf |
51 | 51 | - name: Build dependencies |
52 | 52 | run: | |
53 | 53 | export CC=gcc-11 |
@@ -159,24 +159,27 @@ jobs: |
159 | 159 | CURRENT_VERSION="$(python setup_t_encrypt.py --version)" |
160 | 160 | sed -i "s/${CURRENT_VERSION}/${PACKAGE_VERSION}/g" setup_t_encrypt.py |
161 | 161 | python setup_t_encrypt.py sdist bdist_wheel |
162 | | - wheel="$(ls -t dist/*.whl | head -n1)" |
163 | | - [[ "${wheel}" != *-py3-none-any.whl ]] || \ |
164 | | - { echo "Wheel bundling libencrypt.so must be platform-tagged: ${wheel}" >&2; exit 1; } |
165 | | - auditwheel show "${wheel}" |
| 162 | + raw_wheel="$(ls -t dist/*.whl | head -n1)" |
| 163 | + [[ "${raw_wheel}" != *-py3-none-any.whl ]] || \ |
| 164 | + { echo "Wheel bundling libencrypt.so must be platform-tagged: ${raw_wheel}" >&2; exit 1; } |
| 165 | + auditwheel show "${raw_wheel}" |
| 166 | + auditwheel repair "${raw_wheel}" -w wheelhouse |
| 167 | + wheel="$(ls -t wheelhouse/*.whl | head -n1)" |
| 168 | + [[ "${wheel}" == *manylinux*.whl ]] || { echo "Repaired wheel must be manylinux-tagged: ${wheel}" >&2; exit 1; } |
166 | 169 | python -m zipfile -e "${wheel}" wheel-check |
167 | 170 | shared_library="wheel-check/t_encrypt/libencrypt.so" |
168 | 171 | [[ -f "${shared_library}" ]] || { echo "libencrypt.so was not found in ${wheel}" >&2; exit 1; } |
169 | 172 | ! readelf -d "${shared_library}" | grep -Eq 'lib(ssl|crypto)\.so\.1\.1' || \ |
170 | 173 | { echo "${shared_library} depends on OpenSSL 1.1" >&2; exit 1; } |
171 | | - python -m twine check dist/* |
| 174 | + python -m twine check dist/*.tar.gz wheelhouse/*.whl |
172 | 175 |
|
173 | 176 | - name: Publish t-encrypt to PyPI |
174 | 177 | working-directory: python |
175 | 178 | env: |
176 | 179 | TWINE_USERNAME: ${{ secrets.PIP_USERNAME }} |
177 | 180 | TWINE_PASSWORD: ${{ secrets.PIP_PASSWORD }} |
178 | 181 | run: | |
179 | | - python -m twine upload dist/* |
| 182 | + python -m twine upload dist/*.tar.gz wheelhouse/*.whl |
180 | 183 |
|
181 | 184 | - name: Publish on npm |
182 | 185 | if: github.ref != 'refs/heads/stable' |
|
0 commit comments