[Debian-med-packaging] r22824 - in trunk/packages/invesalius/trunk/debian: . patches

Andreas Tille andreas at an3as.eu
Tue Nov 8 17:58:01 UTC 2016


Hi Thiago,

I'm always wondering whether invesalius is ready for upload or not.  I
hope you'll remember that it needs an extra ping if you want me to
upload - otherwise the packaging will idle in SVN without any action.

BTW, due to this bug

   https://bugs.debian.org/840589

invesalius currently does not migrate to Debian testing.  If you want
to make sure invesalius will be part of the next stable Debian release
it might be sensible to help fixing this bug.

Kind regards

      Andreas.

On Thu, Oct 06, 2016 at 02:28:31PM +0000, Thiago Franco Moraes wrote:
> Author: tfmoraes-guest
> Date: 2016-10-06 14:28:25 +0000 (Thu, 06 Oct 2016)
> New Revision: 22824
> 
> Added:
>    trunk/packages/invesalius/trunk/debian/patches/10_import_cython_modules.patch
> Modified:
>    trunk/packages/invesalius/trunk/debian/invesalius-bin.install
>    trunk/packages/invesalius/trunk/debian/patches/series
>    trunk/packages/invesalius/trunk/debian/rules
> Log:
> Compiling cython modules to /usr/bin/invesalius/invesalius_cy
> 
> Modified: trunk/packages/invesalius/trunk/debian/invesalius-bin.install
> ===================================================================
> --- trunk/packages/invesalius/trunk/debian/invesalius-bin.install	2016-10-03 16:43:53 UTC (rev 22823)
> +++ trunk/packages/invesalius/trunk/debian/invesalius-bin.install	2016-10-06 14:28:25 UTC (rev 22824)
> @@ -1 +1,2 @@
> -invesalius/data/*.so /usr/share/invesalius/invesalius/data/
> +invesalius_cy/*.py /usr/lib/invesalius/invesalius_cy/
> +invesalius_cy/*.so /usr/lib/invesalius/invesalius_cy/
> 
> Added: trunk/packages/invesalius/trunk/debian/patches/10_import_cython_modules.patch
> ===================================================================
> --- trunk/packages/invesalius/trunk/debian/patches/10_import_cython_modules.patch	                        (rev 0)
> +++ trunk/packages/invesalius/trunk/debian/patches/10_import_cython_modules.patch	2016-10-06 14:28:25 UTC (rev 22824)
> @@ -0,0 +1,77 @@
> +Author: Thiago Franco de Moraes
> +Date: Thu, 06 Oct 2016 11:22:46 -0200
> +Description: Moving cython compiled modules to /usr/lib/invesalius folder and
> +adapts invesalius to run this way.
> +diff --git a/invesalius/data/mask.py b/invesalius/data/mask.py
> +index d00d22e..be9423a 100644
> +--- a/invesalius/data/mask.py
> ++++ b/invesalius/data/mask.py
> +@@ -30,7 +30,7 @@ import invesalius.constants as const
> + import invesalius.data.imagedata_utils as iu
> + import invesalius.session as ses
> + 
> +-from . import floodfill
> ++from invesalius_cy import floodfill
> + 
> + from wx.lib.pubsub import pub as Publisher
> + from scipy import ndimage
> +diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py
> +index 65433bb..07d9eff 100644
> +--- a/invesalius/data/slice_.py
> ++++ b/invesalius/data/slice_.py
> +@@ -31,9 +31,9 @@ import invesalius.session as ses
> + import invesalius.utils as utils
> + from invesalius.data.mask import Mask
> + from invesalius.project import Project
> +-from invesalius.data import mips
> ++from invesalius_cy import mips
> + 
> +-from invesalius.data import transforms
> ++from invesalius_cy import transforms
> + import invesalius.data.transformations as transformations
> + OTHER=0
> + PLIST=1
> +diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py
> +index c82ba40..5cfeac5 100644
> +--- a/invesalius/data/styles.py
> ++++ b/invesalius/data/styles.py
> +@@ -46,7 +46,7 @@ from skimage import filter
> + import invesalius.gui.dialogs as dialogs
> + from invesalius.data.measures import MeasureData
> + 
> +-from . import floodfill
> ++from invesalius_cy import floodfill
> + 
> + import invesalius.data.watershed_process as watershed_process
> + import invesalius.utils as utils
> +diff --git a/setup.py b/setup.py
> +index c9223db..c466a29 100644
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -11,22 +11,22 @@ import numpy
> + if sys.platform == 'linux2':
> +     setup(
> +         cmdclass = {'build_ext': build_ext},
> +-        ext_modules = cythonize([ Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"],
> ++        ext_modules = cythonize([ Extension("invesalius_cy.mips", ["invesalius_cy/mips.pyx"],
> +                                   include_dirs =  [numpy.get_include()],
> +                                   extra_compile_args=['-fopenmp'],
> +                                   extra_link_args=['-fopenmp']),
> + 
> +-                       Extension("invesalius.data.interpolation", ["invesalius/data/interpolation.pyx"],
> ++                       Extension("invesalius_cy.interpolation", ["invesalius_cy/interpolation.pyx"],
> +                                  include_dirs=[numpy.get_include()],
> +                                  extra_compile_args=['-fopenmp',],
> +                                  extra_link_args=['-fopenmp',]),
> + 
> +-                       Extension("invesalius.data.transforms", ["invesalius/data/transforms.pyx"],
> ++                       Extension("invesalius_cy.transforms", ["invesalius_cy/transforms.pyx"],
> +                                  include_dirs=[numpy.get_include()],
> +                                  extra_compile_args=['-fopenmp',],
> +                                  extra_link_args=['-fopenmp',]),
> + 
> +-                       Extension("invesalius.data.floodfill", ["invesalius/data/floodfill.pyx"],
> ++                       Extension("invesalius_cy.floodfill", ["invesalius_cy/floodfill.pyx"],
> +                                  include_dirs=[numpy.get_include()],
> +                                  language='c++',),
> +                        ])
> 
> Modified: trunk/packages/invesalius/trunk/debian/patches/series
> ===================================================================
> --- trunk/packages/invesalius/trunk/debian/patches/series	2016-10-03 16:43:53 UTC (rev 22823)
> +++ trunk/packages/invesalius/trunk/debian/patches/series	2016-10-06 14:28:25 UTC (rev 22824)
> @@ -1 +1,2 @@
>  10_sample_path.patch
> +10_import_cython_modules.patch
> 
> Modified: trunk/packages/invesalius/trunk/debian/rules
> ===================================================================
> --- trunk/packages/invesalius/trunk/debian/rules	2016-10-03 16:43:53 UTC (rev 22823)
> +++ trunk/packages/invesalius/trunk/debian/rules	2016-10-06 14:28:25 UTC (rev 22824)
> @@ -19,15 +19,22 @@
>  override_dh_auto_build:
>  	python setup.py build_ext --inplace
>  
> -override_dh_auto_clean:
> +override_dh_auto_clean: create-cython-dir
>  	dh_auto_clean
>  	rm -f invesalius-3.0
>  
> -override_dh_compress :
> +override_dh_compress:
>  	dh_compress --exclude=LICENSE.pt.txt --exclude=.inv3
>  
> +create-cython-dir:
> +	mkdir invesalius_cy/
> +	touch invesalius_cy/__init__.py
> +	cp invesalius/data/*.pyx invesalius_cy
> +	cp invesalius/data/*.pxd invesalius_cy
> +
>  create-launcher:
>  	echo '#!/bin/sh' > invesalius-3.0
> +	echo 'export PYTHONPATH=$$PYTHONPATH:"/usr/lib/invesalius"' >> invesalius-3.0
>  	echo 'export INVESALIUS_LIBRARY_PATH="/usr/share/invesalius/"' >> invesalius-3.0
>  	echo 'cd $$INVESALIUS_LIBRARY_PATH' >> invesalius-3.0
>  	echo 'python app.py $$@' >> invesalius-3.0
> 
> 
> _______________________________________________
> debian-med-commit mailing list
> debian-med-commit at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
> 

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list