[Python-modules-commits] r34235 - in packages/pywavelets/trunk/debian (3 files)

eriol-guest at users.alioth.debian.org eriol-guest at users.alioth.debian.org
Sun Sep 13 19:15:22 UTC 2015


    Date: Sunday, September 13, 2015 @ 19:15:21
  Author: eriol-guest
Revision: 34235

Grab version from the source code instead of importing pywt to build documentation at package build time

Added:
  packages/pywavelets/trunk/debian/patches/01-get_version_from_source.patch
Modified:
  packages/pywavelets/trunk/debian/changelog
  packages/pywavelets/trunk/debian/patches/series

Modified: packages/pywavelets/trunk/debian/changelog
===================================================================
--- packages/pywavelets/trunk/debian/changelog	2015-09-13 17:40:55 UTC (rev 34234)
+++ packages/pywavelets/trunk/debian/changelog	2015-09-13 19:15:21 UTC (rev 34235)
@@ -3,8 +3,11 @@
   * New upstream release.
   * debian/watch
     - Use pypi.debian.net redirector.
+  * debian/patches/01-get_version_from_source.patch
+    - Grab version from the source code instead of importing pywt to build
+      documentation at package build time.
 
- -- Daniele Tricoli <eriol at mornie.org>  Sun, 13 Sep 2015 17:51:48 +0200
+ -- Daniele Tricoli <eriol at mornie.org>  Sun, 13 Sep 2015 21:12:36 +0200
 
 pywavelets (0.2.2-2) unstable; urgency=low
 

Added: packages/pywavelets/trunk/debian/patches/01-get_version_from_source.patch
===================================================================
--- packages/pywavelets/trunk/debian/patches/01-get_version_from_source.patch	                        (rev 0)
+++ packages/pywavelets/trunk/debian/patches/01-get_version_from_source.patch	2015-09-13 19:15:21 UTC (rev 34235)
@@ -0,0 +1,28 @@
+Description: Grab version from the source code instead of importing pywt to
+ build documentation at package build time.
+Author: Daniele Tricoli <eriol at mornie.org>
+Forwarded: not-needed
+Last-Update: 2015-09-13
+
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -48,9 +48,16 @@
+ 
+ # The default replacements for |version| and |release|, also used in various
+ # other places throughout the built documents.
+-import pywt
+-version = re.sub(r'\.dev0+.*$', r'.dev', pywt.__version__)
+-release = pywt.__version__
++
++# On Debian we want to build docs at package build time, when pywt is not
++# installed.
++import os
++base_path = os.path.dirname(__file__)
++fp = open(os.path.abspath(os.path.join(base_path, '..', '..', 'pywt', 'version.py')))
++VERSION = re.compile(r".*full_version = '(.*?)'",
++                     re.S).match(fp.read()).group(1)
++version = re.sub(r'\.dev0+.*$', r'.dev', VERSION)
++release = VERSION
+ 
+ print "PyWavelets (VERSION %s)" % (version,)
+ 

Modified: packages/pywavelets/trunk/debian/patches/series
===================================================================
--- packages/pywavelets/trunk/debian/patches/series	2015-09-13 17:40:55 UTC (rev 34234)
+++ packages/pywavelets/trunk/debian/patches/series	2015-09-13 19:15:21 UTC (rev 34235)
@@ -1 +1 @@
-
+01-get_version_from_source.patch




More information about the Python-modules-commits mailing list