Package Details: python-autoflake 1.3.1-1

Git Clone URL: https://aur.archlinux.org/python-autoflake.git (read-only)
Package Base: python-autoflake
Description: Removes unused imports and unused variables
Upstream URL: https://github.com/myint/autoflake
Licenses: MIT
Submitter: andreao
Maintainer: andreao
Last Packager: andreao
Votes: 2
Popularity: 0.35
First Submitted: 2018-09-20 22:55
Last Updated: 2019-09-22 08:38

Latest Comments

andreao commented on 2019-09-22 08:39

Thanks! Updated.

goetzc commented on 2019-09-22 00:17

@blueyed is right, the binary is not installed in a standard PATH directory, it also should depend on pylakes and it uses a non-standard build mechanism. Please updated it, you can use the following working patch:

diff --git a/PKGBUILD b/PKGBUILD
index 012901e..20a4819 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,24 @@
-# PKGBUILD generated by pipman
 # Python package author: Steven Myint <UNKNOWN>
 pkgname=python-autoflake
-pkgver=1.3
+_pkgname=autoflake
+pkgver=1.3.1
 pkgrel=1
 pkgdesc="Removes unused imports and unused variables"
 arch=(any)
 url="https://github.com/myint/autoflake"
-license=(Expat License)
-makedepends=("python" "python-pip")
+license=("MIT")
+depends=("python-pyflakes")
+makedepends=("python")
+source=("https://github.com/myint/autoflake/archive/v1.3.1.tar.gz")
+
 build() {
-  pip install --no-deps --target="autoflake" autoflake
+  cd "$srcdir/$_pkgname-$pkgver"
+  python setup.py build
 }
+
 package() {
-  mkdir -p $pkgdir/usr/lib/python3.7/site-packages/
-  cp -r $srcdir/autoflake/* $pkgdir/usr/lib/python3.7/site-packages/
+  cd "$srcdir/$_pkgname-$pkgver"
+  python setup.py install --root="$pkgdir/" --optimize=1
 }
+
+md5sums=('2cb19c3c27bd6ce8c8e8771c5b522abb')

blueyed commented on 2019-01-20 13:10

The package does not install the autoflake binary properly, but copies it to site-packages also.

I think the PKGBUILD should look more like this:

build() {
  cd "$srcdir/python-autoflake-$pkgver"
  python setup.py build
}

package() {
  cd "$srcdir/python-autoflake-$pkgver"
  python setup.py install --root="$pkgdir/" --optimize=1
}