public
Created

PKGBUILD and patch for python3-notify

  • Download Gist
PKGBUILD
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# Maintainer: Ryan Baumann <titegtnodI> <ti.teg.tnod.I@gmail.com>
# Contributor: Patrice Peterson <runiq at archlinux dot us>
 
pkgname=python3-notify
_pkgname=py-notify
pkgver=0.3.1
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="Py-notify is a Python package providing tools for implementing Observer programming pattern."
depends=('python3')
license='LGPL'
url="http://home.gna.org/py-notify/"
source=("http://download.gna.org/py-notify/${_pkgname}-${pkgver}.tar.gz"
"${pkgname}-${pkgver}.diff")
md5sums=('b19d054d4aa8bd4648be315bf34a2394'
'e0ca0134e0b32025d4839959c3819359')
 
build() {
cd "${srcdir}/${_pkgname}-$pkgver/"
patch -Np1 -i ../${pkgname}-${pkgver}.diff
python setup.py build
}
 
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py install --root="${pkgdir}"
}
python3-notify-0.3.1.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
diff -aur py-notify-0.3.1.old/notify/gc.c py-notify-0.3.1.new/notify/gc.c
--- py-notify-0.3.1.old/notify/gc.c 2008-09-27 17:33:22.000000000 +0200
+++ py-notify-0.3.1.new/notify/gc.c 2012-01-25 18:53:48.634426319 +0100
@@ -420,7 +420,6 @@
(printfunc) 0, /* tp_print */
(getattrfunc) 0, /* tp_getattr */
(setattrfunc) 0, /* tp_setattr */
- (cmpfunc) 0, /* tp_compare */
(reprfunc) 0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
@@ -475,7 +474,6 @@
(printfunc) 0, /* tp_print */
(getattrfunc) 0, /* tp_getattr */
(setattrfunc) 0, /* tp_setattr */
- (cmpfunc) 0, /* tp_compare */
(reprfunc) 0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
@@ -533,7 +531,6 @@
(printfunc) 0, /* tp_print */
(getattrfunc) 0, /* tp_getattr */
(setattrfunc) 0, /* tp_setattr */
- (cmpfunc) 0, /* tp_compare */
(reprfunc) 0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
@@ -595,7 +592,6 @@
(printfunc) 0, /* tp_print */
(getattrfunc) 0, /* tp_getattr */
(setattrfunc) 0, /* tp_setattr */
- (cmpfunc) 0, /* tp_compare */
(reprfunc) 0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
@@ -646,7 +642,6 @@
(printfunc) 0, /* tp_print */
(getattrfunc) 0, /* tp_getattr */
(setattrfunc) 0, /* tp_setattr */
- (cmpfunc) 0, /* tp_compare */
(reprfunc) 0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
diff -aur py-notify-0.3.1.old/setup.py py-notify-0.3.1.new/setup.py
--- py-notify-0.3.1.old/setup.py 2007-11-06 22:49:16.000000000 +0100
+++ py-notify-0.3.1.new/setup.py 2012-01-25 18:56:04.610356341 +0100
@@ -190,27 +190,6 @@
-# Note: the goal of the below function and manipulation of distuils.util module contents
-# is to not byte-compile files that use 2.5 features on earlier Python versions. Python
-# 2.3 will be baffled by function decorators already, 2.4 --- by `yield' inside `try
-# ... finally'.
-
-import __future__
-
-def should_be_byte_compiled (filename):
- package_name = os.path.basename (os.path.split (filename) [0])
- return package_name != '_2_5' or 'with_statement' in __future__.all_feature_names
-
-def custom_byte_compile (filenames, *arguments, **keywords):
- original_byte_compile ([filename for filename in filenames
- if should_be_byte_compiled (filename)],
- *arguments, **keywords)
-
-original_byte_compile = distutils.util.byte_compile
-distutils.util.byte_compile = custom_byte_compile
-
-
-
gc_extension = Extension (name = 'notify.gc',
sources = [os.path.join ('notify', 'gc.c')])
@@ -226,7 +205,7 @@
download_url = 'http://download.gna.org/py-notify/',
license = "GNU Lesser General Public License v2.1",
classifiers = classifiers,
- packages = ['notify', 'notify._2_5'],
+ packages = ['notify'],
ext_modules = [gc_extension],
cmdclass = { 'build_ext': build_ext })

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.