[arch-commits] Commit in urlwatch/trunk (PKGBUILD fix-install.patch)

Balló György bgyorgy at archlinux.org
Mon Jun 27 19:18:42 UTC 2016


    Date: Monday, June 27, 2016 @ 19:18:42
  Author: bgyorgy
Revision: 181443

upgpkg: urlwatch 2.2-1

Update to new version

Added:
  urlwatch/trunk/fix-install.patch
Modified:
  urlwatch/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   15 +++++++++++----
 fix-install.patch |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-06-27 18:22:46 UTC (rev 181442)
+++ PKGBUILD	2016-06-27 19:18:42 UTC (rev 181443)
@@ -4,7 +4,7 @@
 # Contributor: Allan McRae <allan at archlinux.org>
 
 pkgname=urlwatch
-pkgver=2.1
+pkgver=2.2
 pkgrel=1
 pkgdesc="A tool for monitoring webpages for updates"
 arch=('any')
@@ -11,9 +11,17 @@
 url="http://thp.io/2008/urlwatch/"
 license=('BSD')
 depends=('python-keyring' 'python-minidb' 'python-requests' 'python-yaml')
-source=("http://thp.io/2008/urlwatch/$pkgname-$pkgver.tar.gz")
-md5sums=('fff8148b75d9ec93861241b7d22eb75a')
+source=("http://thp.io/2008/urlwatch/$pkgname-$pkgver.tar.gz"
+        "fix-install.patch")
+md5sums=('9a3af570ad0c696987eb0b4dc39a930d'
+         '6878aaa0c73e039fb48a2eb50b427617')
 
+prepare() {
+  cd $pkgname-$pkgver
+  # Fix installation
+  patch -RNp1 -i ../fix-install.patch
+}
+
 build() {
   cd $pkgname-$pkgver
   python3 setup.py build
@@ -22,6 +30,5 @@
 package() {
   cd $pkgname-$pkgver
   python3 setup.py install --root="$pkgdir"
-
   install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
 }

Added: fix-install.patch
===================================================================
--- fix-install.patch	                        (rev 0)
+++ fix-install.patch	2016-06-27 19:18:42 UTC (rev 181443)
@@ -0,0 +1,47 @@
+From 50356a779ff40cd914408e7e9a34c54b08ef4c26 Mon Sep 17 00:00:00 2001
+From: Thomas Perl <m at thp.io>
+Date: Sat, 20 Feb 2016 11:37:38 +0100
+Subject: [PATCH] Allow running setup.py from non-source directory (Fixes #52)
+
+---
+ setup.py | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 5733064..947a7c8 100644
+--- a/setup.py
++++ b/setup.py
+@@ -10,6 +10,7 @@
+ 
+ PACKAGE_NAME = 'urlwatch'
+ DEPENDENCIES = ['minidb', 'PyYAML', 'requests']
++HERE = os.path.dirname(__file__)
+ 
+ # Assumptions:
+ #  1. Package name equals main script file name (and only one script)
+@@ -17,7 +18,7 @@
+ #  3. Data files are in "share/", will be installed in $(PREFIX)/share
+ #  4. Packages are in "lib/", no modules
+ 
+-main_py = open('lib/%s/__init__.py' % PACKAGE_NAME).read()
++main_py = open(os.path.join(HERE, 'lib', PACKAGE_NAME, '__init__.py')).read()
+ m = dict(re.findall("\n__([a-z]+)__ = '([^']+)'", main_py))
+ docs = re.findall('"""(.*?)"""', main_py, re.DOTALL)
+ 
+@@ -26,10 +27,12 @@
+ m['description'], m['long_description'] = docs[0].strip().split('\n\n', 1)
+ m['download_url'] = m['url'] + PACKAGE_NAME + '-' + m['version'] + '.tar.gz'
+ 
+-m['scripts'] = [PACKAGE_NAME]
+-m['package_dir'] = {'': 'lib'}
+-m['packages'] = ['.'.join(dirname.split(os.sep)[1:]) for dirname, _, files in os.walk('lib') if '__init__.py' in files]
+-m['data_files'] = [(dirname, [os.path.join(dirname, fn) for fn in files]) for dirname, _, files in os.walk('share')]
++m['scripts'] = [os.path.join(HERE, PACKAGE_NAME)]
++m['package_dir'] = {'': os.path.join(HERE, 'lib')}
++m['packages'] = ['.'.join(dirname[len(HERE)+1:].split(os.sep)[1:])
++                 for dirname, _, files in os.walk(os.path.join(HERE, 'lib')) if '__init__.py' in files]
++m['data_files'] = [(dirname[len(HERE)+1:], [os.path.join(dirname[len(HERE)+1:], fn) for fn in files])
++                   for dirname, _, files in os.walk(os.path.join(HERE, 'share')) if files]
+ m['install_requires'] = DEPENDENCIES
+ 
+ setup(**m)



More information about the arch-commits mailing list