summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Cai2017-02-10 08:39:50 +0800
committerPeter Cai2017-02-10 08:39:50 +0800
commit25551822548e6137b3127e97ee36c70884698dbb (patch)
tree39aee964f6a4ed944378a9564da08fae6b1a2c6c
parent3a03e36ee0c1a92959ecb5f833c9b3f4261c4644 (diff)
downloadaur-25551822548e6137b3127e97ee36c70884698dbb.tar.gz
upgrade to 0.12.3
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore2
-rw-r--r--0000-use-system-libsass.patch26
-rw-r--r--PKGBUILD52
4 files changed, 72 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fc2520924411..776cf4d04ff5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,19 @@
pkgbase = python-libsass
- pkgdesc = Python binding for libsass CSS compiler
- pkgver = 0.11.1
+ pkgdesc = A straightforward binding of libsass for Python.
+ pkgver = 0.12.3
pkgrel = 1
- url = http://dahlia.kr/libsass-python/
- arch = any
+ url = https://pypi.python.org/pypi/libsass/
+ arch = x86_64
license = MIT
- makedepends = libsass
- makedepends = python2-pip
- makedepends = python-pip
+ makedepends = python-setuptools
+ makedepends = gcc
+ depends = libsass
depends = python
- source = https://github.com/dahlia/libsass-python/releases/download/0.11.1/libsass-0.11.1.tar.gz
- sha256sums = f060d7dab825942ca7f86d0c4adadf7d731a2e30f9bce6e4f010ad7d32adbf06
+ depends = python-six
+ source = https://files.pythonhosted.org/packages/source/l/libsass/libsass-0.12.3.tar.gz
+ source = 0000-use-system-libsass.patch
+ md5sums = b2b0735a975731e1d07804fd4e7251c2
+ md5sums = b81c742608baa51b75dc9cf994f0974f
pkgname = python-libsass
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7b092346e423
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.tar.gz
+*.tar.xz
diff --git a/0000-use-system-libsass.patch b/0000-use-system-libsass.patch
new file mode 100644
index 000000000000..74b3774f800f
--- /dev/null
+++ b/0000-use-system-libsass.patch
@@ -0,0 +1,26 @@
+diff --git a/setup.py b/setup.py
+index f92779a..fcc956a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -59,9 +59,9 @@ for directory in (
+ for pth, _, filenames in os.walk(directory):
+ for filename in filenames:
+ filename = os.path.join(pth, filename)
+- if filename.endswith(('.c', '.cpp')):
+- sources.append(filename)
+- elif filename.endswith('.h'):
++ #if filename.endswith(('.c', '.cpp')):
++ # sources.append(filename)
++ if filename.endswith('.h'):
+ headers.append(filename)
+
+ if sys.platform == 'win32':
+@@ -139,7 +139,7 @@ else:
+ if platform.system() == 'FreeBSD':
+ link_flags = ['-fPIC', '-lc++']
+ else:
+- link_flags = ['-fPIC', '-lstdc++']
++ link_flags = ['-fPIC', '-lstdc++', '-lsass']
+
+ sass_extension = Extension(
+ '_sass',
diff --git a/PKGBUILD b/PKGBUILD
index b757ea1e45f1..b80447e6b4e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,36 @@
-# Maintainer: Christopher Loen <christopherloen at gmail dot com>
-# Contributor: Scott Lawrence <bytbox@gmail.com>
-pkgname='python-libsass'
-pkgver='0.11.1'
-pkgrel=1
-pkgdesc="Python binding for libsass CSS compiler"
-arch=('any')
-url='http://dahlia.kr/libsass-python/'
-depends=('python')
-makedepends=('libsass' 'python2-pip' 'python-pip')
-source=('https://github.com/dahlia/libsass-python/releases/download/0.11.1/libsass-0.11.1.tar.gz')
-license=('MIT')
-sha256sums=('f060d7dab825942ca7f86d0c4adadf7d731a2e30f9bce6e4f010ad7d32adbf06')
+# Maintainer: Peter Cai <peter at typeblog.net>
-package() {
- echo Installation may be a bit slow, please wait
- cd ${srcdir}/libsass-${pkgver}
- echo :: Installing for python3.5 ...
- pip3 install --prefix=/usr --isolated --root="${pkgdir}" --no-deps --ignore-installed .
- echo :: Installing for python2.7 ...
- pip2 install --prefix=/usr --isolated --root="${pkgdir}" --no-deps --ignore-installed .
+_name=libsass
+pkgname=python-libsass
+pkgver=0.12.3
+pkgrel=1
+pkgdesc="A straightforward binding of libsass for Python."
+arch=('x86_64')
+url="https://pypi.python.org/pypi/libsass/"
+license=("MIT")
+source=(
+ "https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+ "0000-use-system-libsass.patch"
+)
+md5sums=('b2b0735a975731e1d07804fd4e7251c2'
+ 'b81c742608baa51b75dc9cf994f0974f')
+depends=(
+ "libsass"
+ "python"
+ "python-six"
+)
+makedepends=(
+ "python-setuptools"
+ "gcc"
+)
+build() {
+ cd "$srcdir/$_name-$pkgver"
+ patch -Np1 -i "$srcdir/0000-use-system-libsass.patch"
+ python setup.py build
}
+package() {
+ cd "$srcdir/$_name-$pkgver"
+ python setup.py install --root="$pkgdir/" --optimize=1
+}