[theano] 01/03: Use the version in doc->source links, not a (usually non-existent) git commit number.

Rebecca Palmer rnpalmer-guest at moszumanska.debian.org
Fri Sep 22 19:16:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

rnpalmer-guest pushed a commit to branch master
in repository theano.

commit 7c10d6a20a22f446db26300785ee67a61099717f
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date:   Fri Sep 22 18:58:11 2017 +0100

    Use the version in doc->source links, not a (usually non-existent)
    git commit number.
---
 debian/changelog              |  2 ++
 debian/patches/linkcode.patch | 21 +++++++++++++++++++++
 debian/patches/series         |  1 +
 3 files changed, 24 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index bd252ba..89b6ed5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ theano (0.9.0-1) UNRELEASED; urgency=medium
   * Recommend python(3)-pygpu and g++.
   * Use the Python 3 versions of sphinx and pygments.
   * Build-depend on python3-sphinx-rtd-theme.
+  * Use the version in doc->source links,
+    not a (usually non-existent) git commit number.
 
  -- Rebecca N. Palmer <rebecca_palmer at zoho.com>  Mon, 18 Sep 2017 22:15:10 +0100
 
diff --git a/debian/patches/linkcode.patch b/debian/patches/linkcode.patch
new file mode 100644
index 0000000..260e889
--- /dev/null
+++ b/debian/patches/linkcode.patch
@@ -0,0 +1,21 @@
+Description: Don't try to link to the git commit number
+
+It will be either nonexistent (crashing the build), or an Alioth/etc
+commit that isn't in upstream's repository (making broken links)
+
+Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
+Forwarded: not-needed
+
+--- theano-0.9.0.orig/doc/conf.py
++++ theano-0.9.0/doc/conf.py
+@@ -214,9 +214,7 @@ def linkcode_resolve(domain, info):
+     except Exception:
+         filename = info['module'].replace('.', '/') + '.py'
+     import subprocess
+-    tag = subprocess.Popen(['git', 'rev-parse', 'HEAD'],
+-                           stdout=subprocess.PIPE,
+-                           universal_newlines=True).communicate()[0][:-1]
++    tag = 'rel-'+release
+     return "https://github.com/Theano/theano/blob/%s/%s" % (tag, filename)
+ 
+ # Options for LaTeX output
diff --git a/debian/patches/series b/debian/patches/series
index e6c4e08..42da257 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 disable-overly-environment-dependent-test.patch
 strip-docs.patch
+linkcode.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/theano.git



More information about the debian-science-commits mailing list