[Python-modules-commits] r29324 - in packages/python-pycaptcha/trunk/debian (3 files)
osallou-guest at users.alioth.debian.org
osallou-guest at users.alioth.debian.org
Fri Jun 13 11:10:47 UTC 2014
Date: Friday, June 13, 2014 @ 11:10:46
Author: osallou-guest
Revision: 29324
add patch to use /usr/share dir for images
Added:
packages/python-pycaptcha/trunk/debian/patches/use_debian_share
Modified:
packages/python-pycaptcha/trunk/debian/changelog
packages/python-pycaptcha/trunk/debian/patches/series
Modified: packages/python-pycaptcha/trunk/debian/changelog
===================================================================
--- packages/python-pycaptcha/trunk/debian/changelog 2014-06-13 10:50:24 UTC (rev 29323)
+++ packages/python-pycaptcha/trunk/debian/changelog 2014-06-13 11:10:46 UTC (rev 29324)
@@ -1,4 +1,4 @@
-pycaptcha (0.4-2.1) unstable; urgency=low
+pycaptcha (0.4-2) unstable; urgency=low
[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.
@@ -7,7 +7,7 @@
- Using 3.9.5 instead of 3.9.2
[ Olivier Sallou ]
- * d/patches: add headers to patch
+ * d/patches: add headers to patch and use /usr/share for images
* d/copyright: use versioned copyright
-- Olivier Sallou <osallou at debian.org> Fri, 13 Jun 2014 12:14:23 +0200
Modified: packages/python-pycaptcha/trunk/debian/patches/series
===================================================================
--- packages/python-pycaptcha/trunk/debian/patches/series 2014-06-13 10:50:24 UTC (rev 29323)
+++ packages/python-pycaptcha/trunk/debian/patches/series 2014-06-13 11:10:46 UTC (rev 29324)
@@ -1,2 +1,3 @@
up_examples_shebangs
change_font_path
+use_debian_share
Added: packages/python-pycaptcha/trunk/debian/patches/use_debian_share
===================================================================
--- packages/python-pycaptcha/trunk/debian/patches/use_debian_share (rev 0)
+++ packages/python-pycaptcha/trunk/debian/patches/use_debian_share 2014-06-13 11:10:46 UTC (rev 29324)
@@ -0,0 +1,31 @@
+Subject: place images in /usr/share
+Description: upstream source includes some images
+ to generate captcha. Place images in /usr/share instead of python
+ for arch independant location.
+ lib path.
+Author: Olivier Sallou <osallou at debian.org>
+Last-Updated: 2014-06-13
+Forwarded: no
+--- a/Captcha/File.py
++++ b/Captcha/File.py
+@@ -10,7 +10,8 @@
+ import os, random
+
+ # Determine the data directory. This can be overridden after import-time if needed.
+-dataDir = os.path.join(os.path.split(os.path.abspath(__file__))[0], "data")
++#dataDir = os.path.join(os.path.split(os.path.abspath(__file__))[0], "data")
++dataDir = '/usr/share/python-captcha'
+
+
+ class RandomFileFactory(object):
+--- a/Captcha/Words.py
++++ b/Captcha/Words.py
+@@ -25,7 +25,7 @@
+
+ def read(self):
+ """Read words from disk"""
+- f = open(os.path.join(File.dataDir, "words", self.fileName))
++ f = open(os.path.join('/usr/share/python-captcha', "words", self.fileName))
+
+ self.words = []
+ for line in f.xreadlines():
More information about the Python-modules-commits
mailing list