Bug#840527: Fwd: Re: yade and ipython5

2016-10-27 Thread Tobias Hansen
Control: tag -1 + patch

Hi,

I ended up not using git, because it's not possible to build from git.
Somehow there are changes from the orig tarball, the patch
05_reproducible-builds.patch does not apply.

Here's a debdiff. With the patch the package builds and the IPython
prompts show up in the documentation, so it does what it's supposed to
do. Some prompts have errors, but this is also the case in the package
yade-doc which is currently in unstable. I suggest that this can be
fixed after the IPython transition.

Best,
Tobias


On 10/26/2016 08:15 PM, Anton Gladky wrote:
> Hi Tobias,
> 
> feel free to push to git (please create a new branch). I will try to
> test it on Saturday.
> 
> Thanks!
> 
> Anton
> 
> 
> 2016-10-26 21:11 GMT+02:00 Tobias Hansen :
>> Hi,
>>
>> the problem occurred in the file doc/sphinx/ipython_directive200.py. It
>> seems this is an old version of the file [1], so the first thing to try
>> would be to include the new version with a new name and edit
>> doc/sphinx/conf.py so that it is used. Anton, do you mind if I push a
>> patch to the packaging git so that we can both test it?
>>
>> Best,
>> Tobias
>>
>>
>> [1]
>> https://github.com/ipython/ipython/blob/master/IPython/sphinxext/ipython_directive.py
>>

diff -Nru yade-2016.06a/debian/changelog yade-2016.06a/debian/changelog
--- yade-2016.06a/debian/changelog  2016-08-24 19:14:20.0 +0100
+++ yade-2016.06a/debian/changelog  2016-10-26 20:47:00.0 +0100
@@ -1,3 +1,10 @@
+yade (2016.06a-5) UNRELEASED; urgency=medium
+
+  * Include ipython_directive.py from IPython 5.1.0 to fix build
+with IPython 5.
+
+ -- Tobias Hansen   Wed, 26 Oct 2016 20:47:00 +0100
+
 yade (2016.06a-4) unstable; urgency=medium
 
   * [c982cf0] Add python-pyqt5.qtwebkit to dependencies.
diff -Nru yade-2016.06a/debian/patches/07_ipython5.patch 
yade-2016.06a/debian/patches/07_ipython5.patch
--- yade-2016.06a/debian/patches/07_ipython5.patch  1970-01-01 
01:00:00.0 +0100
+++ yade-2016.06a/debian/patches/07_ipython5.patch  2016-10-26 
20:47:00.0 +0100
@@ -0,0 +1,1323 @@
+Description: Include ipython_directive.py from IPython 5.1.0
+ Which version of the file is used is chosen in the files conf*.py.
+ I set it up to use the new version if the IPython version is >= 4.0.
+ This is a guess, I tested only with IPython 5.1.0.
+Author: Tobias Hansen 
+
+--- /dev/null
 b/doc/sphinx/ipython_directive501.py
+@@ -0,0 +1,1184 @@
++# -*- coding: utf-8 -*-
++"""
++Sphinx directive to support embedded IPython code.
++
++This directive allows pasting of entire interactive IPython sessions, prompts
++and all, and their code will actually get re-executed at doc build time, with
++all prompts renumbered sequentially. It also allows you to input code as a 
pure
++python input by giving the argument python to the directive. The output looks
++like an interactive ipython section.
++
++To enable this directive, simply list it in your Sphinx ``conf.py`` file
++(making sure the directory where you placed it is visible to sphinx, as is
++needed for all Sphinx directives). For example, to enable syntax highlighting
++and the IPython directive::
++
++extensions = ['IPython.sphinxext.ipython_console_highlighting',
++  'IPython.sphinxext.ipython_directive']
++
++The IPython directive outputs code-blocks with the language 'ipython'. So
++if you do not have the syntax highlighting extension enabled as well, then
++all rendered code-blocks will be uncolored. By default this directive assumes
++that your prompts are unchanged IPython ones, but this can be customized.
++The configurable options that can be placed in conf.py are:
++
++ipython_savefig_dir:
++The directory in which to save the figures. This is relative to the
++Sphinx source directory. The default is `html_static_path`.
++ipython_rgxin:
++The compiled regular expression to denote the start of IPython input
++lines. The default is re.compile('In \[(\d+)\]:\s?(.*)\s*'). You
++shouldn't need to change this.
++ipython_rgxout:
++The compiled regular expression to denote the start of IPython output
++lines. The default is re.compile('Out\[(\d+)\]:\s?(.*)\s*'). You
++shouldn't need to change this.
++ipython_promptin:
++The string to represent the IPython input prompt in the generated ReST.
++The default is 'In [%d]:'. This expects that the line numbers are used
++in the prompt.
++ipython_promptout:
++The string to represent the IPython prompt in the generated ReST. The
++default is 'Out [%d]:'. This expects that the line numbers are used
++in the prompt.
++ipython_mplbackend:
++The string which specifies if the embedded Sphinx shell should import
++Matplotlib and set the backend. The value specifies a backend that is
++passed to `matplotlib.use()` before any lines in `ipython_execlines` are
++executed. If not specified in conf.py, then the 

Bug#840527: Fwd: Re: yade and ipython5

2016-10-26 Thread Anton Gladky
Hi Tobias,

feel free to push to git (please create a new branch). I will try to
test it on Saturday.

Thanks!

Anton


2016-10-26 21:11 GMT+02:00 Tobias Hansen :
> Hi,
>
> the problem occurred in the file doc/sphinx/ipython_directive200.py. It
> seems this is an old version of the file [1], so the first thing to try
> would be to include the new version with a new name and edit
> doc/sphinx/conf.py so that it is used. Anton, do you mind if I push a
> patch to the packaging git so that we can both test it?
>
> Best,
> Tobias
>
>
> [1]
> https://github.com/ipython/ipython/blob/master/IPython/sphinxext/ipython_directive.py
>

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers


Bug#840527: Fwd: Re: yade and ipython5

2016-10-26 Thread Tobias Hansen
Hi,

the problem occurred in the file doc/sphinx/ipython_directive200.py. It
seems this is an old version of the file [1], so the first thing to try
would be to include the new version with a new name and edit
doc/sphinx/conf.py so that it is used. Anton, do you mind if I push a
patch to the packaging git so that we can both test it?

Best,
Tobias


[1]
https://github.com/ipython/ipython/blob/master/IPython/sphinxext/ipython_directive.py

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers