Package Details: python-flake8-quotes 3.4.0-1

Git Clone URL: https://aur.archlinux.org/python-flake8-quotes.git (read-only, click to copy)
Package Base: python-flake8-quotes
Description: Flake8 lint for quotes
Upstream URL: https://github.com/zheller/flake8-quotes
Licenses: MIT
Submitter: acxz
Maintainer: dmitmel
Last Packager: dmitmel
Votes: 4
Popularity: 0.003189
First Submitted: 2020-05-30 22:42 (UTC)
Last Updated: 2025-01-20 21:43 (UTC)

Latest Comments

« First ‹ Previous 1 2

gesh commented on 2024-03-26 16:43 (UTC)

This is what I had in mind:

diff --git a/PKGBUILD b/PKGBUILD
index 8723a35..97a314d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,24 +4,29 @@
 pkgname=python-flake8-quotes
 _pkgname=flake8-quotes
 pkgver=3.3.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Flake8 lint for quotes"
 arch=('any')
 url="https://github.com/zheller/${_pkgname}"
 license=('MIT')
 depends=('flake8')
-makedepends=('python-setuptools')
+makedepends=(python-build python-installer python-wheel)
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/zheller/${_pkgname}/archive/${pkgver}.tar.gz")
 sha256sums=('884d027b6126b6216bdb9fa95a9841c4f07f600569a4a41f3d0cdbf71afe6bcb')

 build() {
-    cd "${_pkgname}-${pkgver}"
-    python setup.py build
+    cd "$_pkgname-$pkgver"
+    python -m build --wheel --no-isolation
+}
+
+check() {
+    cd "$_pkgname-$pkgver"
+    python -m unittest
 }

 package() {
-    cd "${_pkgname}-${pkgver}"
-    python setup.py install --root="${pkgdir}" --optimize=1
+    cd "$_pkgname-$pkgver"
+    python -m installer --destdir="$pkgdir" dist/*.whl

     install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }

gesh commented on 2024-03-25 21:40 (UTC)

https://wiki.archlinux.org/title/Python_packaging_guidelines#Standards_based_(PEP_517)

Python decided to change the way they recommend installing packages a short while back, and so even if the project doesn't have a pyproject.toml the instructions from the wiki should be followed - that is, using

makedepends=(python-build python-installer python-wheel)

build() {
    cd $_name-$pkgver
    python -m build --wheel --no-isolation
}

package() {
    cd $_name-$pkgver
    python -m installer --destdir="$pkgdir" dist/*.whl
}

dmitmel commented on 2024-03-25 18:48 (UTC)

gesh: Unsure what you mean. Is this a common practice in AUR packaging?

gesh commented on 2024-03-25 13:24 (UTC)

Please update to PEP517 installs -- directly invoking setup.py is deprecated nowadays.

RubenKelevra commented on 2023-02-09 00:03 (UTC) (edited on 2023-02-09 00:11 (UTC) by RubenKelevra)

Works fine if

makedepends=(python python-setuptools)

are added.

RubenKelevra commented on 2023-02-08 23:40 (UTC) (edited on 2023-02-08 23:40 (UTC) by RubenKelevra)

Does not build:

==> Retrieving sources...
  -> Found 3.3.1.tar.gz
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Extracting 3.3.1.tar.gz with bsdtar
==> Sources are ready.
python-flake8-quotes-3.3.1-2: parsing pkg list...
==> Making package: python-flake8-quotes 3.3.1-2 (2023-02-09T00:38:11 CET)
==> Retrieving sources...
  -> Found 3.3.1.tar.gz
==> Validating source files with sha256sums...
    3.3.1.tar.gz ... Passed
==> Making package: python-flake8-quotes 3.3.1-2 (Thu Feb  9 00:38:13 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
Traceback (most recent call last):
  File "/build/python-flake8-quotes/src/flake8-quotes-3.3.1/setup.py", line 3, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /var/lib/paru/aur_chroot/ruben/build
error: failed to build 'python-flake8-quotes-3.3.1-2': failed to run: makechrootpkg -r /var/lib/paru/aur_chroot -D /var/lib/paru/aur_chroot -d /var/cache/pacman/pkg/ -- -feA --noconfirm --noprepare --holdver: 
error: packages failed to build: python-flake8-quotes-3.3.1-2