summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD22
1 files changed, 3 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a4d5562491ba..2cb90078a79c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ arch=('any')
url='https://github.com/ahupp/python-magic'
license=('MIT')
depends=('python')
-makedepends=('git' 'sed' 'python')
+makedepends=('git' 'python' 'python-setuptools')
conflicts=('python-magic')
source=("${pkgname}::git+https://github.com/ahupp/python-magic")
md5sums=('SKIP')
@@ -17,33 +17,17 @@ srcdir='src'
package() {
- local PYTHON="/usr/bin/env python3"
- local USR_PATH="${pkgdir}/usr"
- local LICENSE_DIR="${USR_PATH}/share/licenses/${pkgname}"
+ local LICENSE_DIR="${pkgdir}/usr/share/licenses/${pkgname}"
# Set up directories
- install -d -m 755 ${USR_PATH}
install -d -m 755 ${LICENSE_DIR}
- # Clean up build dir
- rm -Rf build
-
cd "${srcdir}/${pkgname}"
- # Fix setup.py for distutils.core
- sed -i 's/\(from setuptools.*\)/#\1/' setup.py
- sed -i 's/#\(from distutils.*\)/\1/' setup.py
-
# Install python packages to $pkgdir
- ${PYTHON} setup.py install --prefix ${USR_PATH}
+ python setup.py install --root ${pkgdir}
# Install license file
install -m 644 LICENSE ${LICENSE_DIR}
-
- # Make directories accessible for anyone
- find "${USR_PATH}" -type d -exec chmod 755 {} \;
-
- # Make library files readable for anyone but not executable
- find "${USR_PATH}" -type f -exec chmod 644 {} \;
}