pyalpm: Update to 0.10.3
This commit is contained in:
parent
b1b1518edd
commit
bdcaf93fc7
25
python-pkgconfig/PKGBUILD
Normal file
25
python-pkgconfig/PKGBUILD
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
pkgname=python-pkgconfig
|
||||||
|
pkgver=1.5.4
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Python module to interface with the pkg-config command line tool'
|
||||||
|
arch=(any)
|
||||||
|
url='https://github.com/matze/pkgconfig'
|
||||||
|
license=(MIT)
|
||||||
|
depends=("python")
|
||||||
|
makedepends=("python-setuptools")
|
||||||
|
source=(https://pypi.io/packages/source/p/pkgconfig/pkgconfig-$pkgver.tar.gz)
|
||||||
|
sha256sums=('c34503829fd226822fd93c902b1cf275516908a023a24be0a02ba687f3a00399')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd pkgconfig-$pkgver
|
||||||
|
|
||||||
|
python setup.py build
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd pkgconfig-$pkgver
|
||||||
|
|
||||||
|
python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||||
|
|
||||||
|
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||||
|
}
|
||||||
@ -1,50 +1,11 @@
|
|||||||
--- pyalpm/setup.py.orig 2020-02-23 16:10:00.163976600 +0100
|
--- pyalpm/setup.py.orig 2021-06-06 11:16:43.786094800 +0200
|
||||||
+++ pyalpm/setup.py 2020-02-23 16:12:27.525811500 +0100
|
+++ pyalpm/setup.py 2021-06-06 11:16:49.931474700 +0200
|
||||||
@@ -1,6 +1,7 @@
|
@@ -3,7 +3,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import os
|
|
||||||
from setuptools import setup, Extension
|
from setuptools import setup, Extension
|
||||||
+import subprocess
|
|
||||||
|
|
||||||
|
import pkgconfig
|
||||||
|
-libalpm = pkgconfig.parse('libalpm')
|
||||||
|
+libalpm = pkgconfig.parse('libalpm', static=bool(os.getenv('LIBALPM_STATIC')))
|
||||||
|
|
||||||
os.putenv('LC_CTYPE', 'en_US.UTF-8')
|
os.putenv('LC_CTYPE', 'en_US.UTF-8')
|
||||||
@@ -9,15 +10,25 @@
|
|
||||||
|
|
||||||
PYCMAN_SCRIPTS = ['database', 'deptest', 'query', 'remove', 'sync', 'upgrade', 'version']
|
|
||||||
|
|
||||||
+# From: http://code.activestate.com/recipes/502261-python-distutils-pkg-config/
|
|
||||||
+def pkg_config(*pkg_config_flags, **kw):
|
|
||||||
+ flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}
|
|
||||||
+ kw['extra_compile_args'] = cflags
|
|
||||||
+ for token in subprocess.check_output(("pkg-config --libs --cflags %s" % ' '.join(pkg_config_flags)).split()).decode('ascii').split():
|
|
||||||
+ if token[:2] in flag_map:
|
|
||||||
+ kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
|
|
||||||
+ else:
|
|
||||||
+ kw['extra_compile_args'].append(token)
|
|
||||||
+ return kw
|
|
||||||
+
|
|
||||||
if __name__ == "__main__":
|
|
||||||
|
|
||||||
cflags = ['-Wall', '-Wextra', '-Werror',
|
|
||||||
'-Wno-unused-parameter', '-Wno-incompatible-pointer-types',
|
|
||||||
- '-Wno-cast-function-type', '-std=c99', '-D_FILE_OFFSET_BITS=64']
|
|
||||||
+ '-Wno-cast-function-type', '-Wno-unused-function', '-Wno-strict-aliasing', '-std=c99', '-D_FILE_OFFSET_BITS=64',
|
|
||||||
+ '-DVERSION="%s"' % pyalpm_version]
|
|
||||||
|
|
||||||
alpm = Extension('pyalpm',
|
|
||||||
- libraries=['alpm'],
|
|
||||||
- extra_compile_args=cflags + ['-DVERSION="%s"' % pyalpm_version],
|
|
||||||
language='C',
|
|
||||||
sources=['src/pyalpm.c',
|
|
||||||
'src/util.c',
|
|
||||||
@@ -31,7 +42,9 @@
|
|
||||||
'src/options.h',
|
|
||||||
'src/package.h',
|
|
||||||
'src/pyalpm.h',
|
|
||||||
- 'src/util.h'])
|
|
||||||
+ 'src/util.h'],
|
|
||||||
+ **pkg_config('libalpm', '--static' if os.getenv('LIBALPM_STATIC') else '')
|
|
||||||
+ )
|
|
||||||
|
|
||||||
with open("README.md", "r") as fh:
|
|
||||||
long_description = fh.read()
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
_realname=pyalpm
|
_realname=pyalpm
|
||||||
pkgbase="python-${_realname}"
|
pkgbase="python-${_realname}"
|
||||||
pkgname=("python-${_realname}")
|
pkgname=("python-${_realname}")
|
||||||
pkgver=0.9.2
|
pkgver=0.10.3
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc="Libalpm bindings for Python"
|
pkgdesc="Libalpm bindings for Python"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
@ -16,14 +16,15 @@ makedepends=('gettext-devel'
|
|||||||
'libcurl-devel'
|
'libcurl-devel'
|
||||||
'libgpgme-devel'
|
'libgpgme-devel'
|
||||||
'python-setuptools'
|
'python-setuptools'
|
||||||
'pacman')
|
'pacman'
|
||||||
|
'python-pkgconfig')
|
||||||
provides=("python3-${_realname}")
|
provides=("python3-${_realname}")
|
||||||
conflicts=("python3-${_realname}")
|
conflicts=("python3-${_realname}")
|
||||||
replaces=("python3-${_realname}")
|
replaces=("python3-${_realname}")
|
||||||
source=("git+https://gitlab.archlinux.org/archlinux/pyalpm.git#commit=4428779b28ad7df5efb7a3a3feb22a45e9510bfc"
|
source=("git+https://gitlab.archlinux.org/archlinux/pyalpm.git#tag=${pkgver}"
|
||||||
"0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch")
|
"0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch")
|
||||||
sha256sums=('SKIP'
|
sha256sums=('SKIP'
|
||||||
'f6954a6532bdc61f8149e5e98b13cadfdfcebff0d6c266408faec41428ab5eb9')
|
'e26201c95cf6511cc884a38a8ca17cd61154542c390bcd8f7484bdc8e560cee9')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${srcdir}/${_realname}"
|
cd "${srcdir}/${_realname}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user