Skip to content

Commit

Permalink
chore(dockerfiles): build python-coverage manually again
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Apr 26, 2024
1 parent 1192339 commit 281f674
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ RUN echo ">>>> Installing opt deps:" && \
#RUN sudo -u user python -u maintenance_scripts/pidowngrade.py python-coverage '6.5.0-5'
RUN echo ">>>> Installing test deps using Pikaur itself:" && \
sudo -u user pikaur -S --noconfirm --needed --color=always iputils python-virtualenv \
flake8 python-pylint mypy vulture bandit shellcheck python-coveralls
flake8 python-pylint mypy vulture bandit shellcheck # @TODO: python-coveralls is temporary broken
#RUN sudo -u user python -u maintenance_scripts/pidowngrade.py python-pycodestyle '2.9.1-2' # @TODO: remove it when it fixed

COPY ./pikaur_test /opt/app-build/pikaur_test
COPY ./maintenance_scripts /opt/app-build/maintenance_scripts/
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile_export
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ RUN git clone https://github.com/actionless/pikaur.git /opt/app-build/
RUN echo ">>>> Starting the build:" && \
sudo -u user makepkg -fsi --noconfirm && \
rm -fr ./src/ ./pkg/
#RUN sudo -u user python -u maintenance_scripts/pidowngrade.py python-coverage '6.5.0-5'
RUN echo ">>>> Installing test deps using Pikaur itself:" && \
sudo -u user pikaur -S --noconfirm --mflags=--skippgpcheck --color=always python-coveralls
#RUN sudo -u user python -u maintenance_scripts/pidowngrade.py python-coverage '7.4.1-1' # up to 7.4.4
#RUN echo ">>>> Installing test deps using Pikaur itself:" && \
# sudo -u user pikaur -S --noconfirm --mflags=--skippgpcheck --color=always python-coveralls
# Workaround for broken coveralls:
ADD ./maintenance_scripts/coveralls_PKGBUILD ./coveralls_PKGBUILD
RUN sudo -u user pikaur -Pi --noconfirm --color=always coveralls_PKGBUILD

# vim: set ft=dockerfile :
48 changes: 48 additions & 0 deletions maintenance_scripts/coveralls_PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: GI_Jack <[email protected]>

pkgname=python-coveralls
pkgver=3.3.1
pkgrel=99
_commit=8fb36645bf5f06466e1950a0656d86c533db1573
pkgdesc="Python integration with coveralls.io"
url="https://github.com/thekevjames/coveralls-python"
arch=('any')
license=('MIT')
depends=('python-coverage' 'python-docopt' 'python-requests')
optdepends=('python-yaml')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel' 'python-poetry')
checkdepends=('git' 'python-mock' 'python-pytest' 'python-responses')
source=(
"$pkgname::git+$url#commit=$_commit"
)
#"https://patch-diff.githubusercontent.com/raw/TheKevJames/coveralls-python/pull/340.patch"
sha256sums=(
'SKIP'
)
#'2f1e835253a9e9d2b515b8c139a844cacf53b38b0009a3c2b09bbfa50f4c1581'

prepare() {
cd "$pkgname"
#patch -p1 < "$srcdir/340.patch"
}

build() {
cd "$pkgname"
python -m build --wheel --no-isolation
}

#check() {
# cd "$pkgname"
# pytest -x
#}

package() {
cd "$pkgname"
PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl
local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
install -d "$pkgdir/usr/share/licenses/$pkgname/"
ln -s "$_site/$_pkg-$pkgver.dist-info/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/"
}

# vim: set ft=PKGBUILD:

0 comments on commit 281f674

Please sign in to comment.