[med-svn] [Git][med-team/invesalius][master] 3 commits: Added a patch to remove the python2 shebangs

Thiago Franco de Moraes gitlab at salsa.debian.org
Tue Sep 11 19:15:44 BST 2018


Thiago Franco de Moraes pushed to branch master at Debian Med / invesalius


Commits:
2d88a4a6 by Thiago Franco de Moraes at 2018-09-11T17:25:42Z
Added a patch to remove the python2 shebangs

- - - - -
0a1dfc00 by Thiago Franco de Moraes at 2018-09-11T17:36:36Z
undoing invesalius changes in source code

- - - - -
4ed3755d by Thiago Franco de Moraes at 2018-09-11T18:10:28Z
Added description to the new patch

- - - - -


8 changed files:

- + debian/patches/10_remove_python2_shebang.patch
- debian/patches/series
- invesalius/constants.py
- invesalius/data/mask.py
- invesalius/data/slice_.py
- invesalius/data/styles.py
- invesalius/data/surface.py
- setup.py


Changes:

=====================================
debian/patches/10_remove_python2_shebang.patch
=====================================
@@ -0,0 +1,107 @@
+Author: Thiago Franco Moraes
+Last-Update: 2018-09-11 14:54:25 -0300
+Description: Remove python2 shebangs
+
+diff --git a/app.py b/app.py
+index 28dcbdd..2942f04 100644
+--- a/app.py
++++ b/app.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/env python3
+ #--------------------------------------------------------------------------
+ # Software:     InVesalius - Software de Reconstrucao 3D de Imagens Medicas
+ # Copyright:    (C) 2001  Centro de Pesquisas Renato Archer
+diff --git a/invesalius/data/measures.py b/invesalius/data/measures.py
+index 565cf0c..0567116 100644
+--- a/invesalius/data/measures.py
++++ b/invesalius/data/measures.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: UTF-8 -*-
+ 
+ from six import with_metaclass
+diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py
+index 0b34ce0..a5d3cae 100755
+--- a/invesalius/data/viewer_slice.py
++++ b/invesalius/data/viewer_slice.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: utf-8 -*-
+ #--------------------------------------------------------------------------
+ # Software:     InVesalius - Software de Reconstrucao 3D de Imagens Medicas
+diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py
+index 3de5335..233e2b1 100755
+--- a/invesalius/data/viewer_volume.py
++++ b/invesalius/data/viewer_volume.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: utf-8 -*-
+ 
+ #--------------------------------------------------------------------------
+diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py
+index ef119a9..e9772a1 100644
+--- a/invesalius/gui/data_notebook.py
++++ b/invesalius/gui/data_notebook.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: UTF-8 -*-
+ #--------------------------------------------------------------------------
+ # Software:     InVesalius - Software de Reconstrucao 3D de Imagens Medicas
+diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py
+index c9793db..aa2dde1 100644
+--- a/invesalius/gui/dialogs.py
++++ b/invesalius/gui/dialogs.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: UTF-8 -*-
+ #--------------------------------------------------------------------------
+ # Software:     InVesalius - Software de Reconstrucao 3D de Imagens Medicas
+diff --git a/invesalius/gui/dicom_preview_panel.py b/invesalius/gui/dicom_preview_panel.py
+index 5305eec..d9fa764 100644
+--- a/invesalius/gui/dicom_preview_panel.py
++++ b/invesalius/gui/dicom_preview_panel.py
+@@ -17,7 +17,6 @@
+ #    detalhes.
+ #--------------------------------------------------------------------------
+ 
+-#!/usr/bin/env python
+ # -*- coding: UTF-8 -*-
+ 
+ #TODO: To create a beautiful API
+diff --git a/invesalius/gui/widgets/gradient.py b/invesalius/gui/widgets/gradient.py
+index fe246ae..29d7551 100755
+--- a/invesalius/gui/widgets/gradient.py
++++ b/invesalius/gui/widgets/gradient.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: UTF-8 -*-
+ 
+ #--------------------------------------------------------------------------
+diff --git a/invesalius/gui/widgets/slice_menu.py b/invesalius/gui/widgets/slice_menu.py
+index cdb66a4..737be02 100644
+--- a/invesalius/gui/widgets/slice_menu.py
++++ b/invesalius/gui/widgets/slice_menu.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: UTF-8 -*-
+ 
+ #--------------------------------------------------------------------------
+diff --git a/invesalius/i18n.py b/invesalius/i18n.py
+index c47340a..7259026 100644
+--- a/invesalius/i18n.py
++++ b/invesalius/i18n.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python 
+ # -*- coding: UTF-8 -*- 
+  
+ #--------------------------------------------------------------------------
+diff --git a/invesalius/math_utils.py b/invesalius/math_utils.py
+index dfe9a86..eddbb82 100644
+--- a/invesalius/math_utils.py
++++ b/invesalius/math_utils.py
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: utf-8 -*-
+ 
+ import math


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 10_sample_path.patch
 10_import_cython_modules.patch
+10_remove_python2_shebang.patch


=====================================
invesalius/constants.py
=====================================
@@ -355,7 +355,7 @@ if hasattr(sys,"frozen") and (sys.frozen == "windows_exe"\
 
 else:
     ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, u'..', u'icons'))
-    SAMPLE_DIR = u"/usr/share/doc/invesalius-examples/examples/"
+    SAMPLE_DIR = os.path.abspath(os.path.join(FILE_PATH, u'..', u'samples'))
     DOC_DIR = os.path.abspath(os.path.join(FILE_PATH, u'..', u'docs'))
 
     folder=RAYCASTING_PRESETS_DIRECTORY= os.path.abspath(os.path.join(u".",


=====================================
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 invesalius_cy import floodfill
+from . import floodfill
 
 from wx.lib.pubsub import pub as Publisher
 from scipy import ndimage


=====================================
invesalius/data/slice_.py
=====================================
@@ -33,9 +33,9 @@ import invesalius.session as ses
 import invesalius.utils as utils
 from invesalius.data.mask import Mask
 from invesalius.project import Project
-from invesalius_cy import mips
+from invesalius.data import mips
 
-from invesalius_cy import transforms
+from invesalius.data import transforms
 import invesalius.data.transformations as transformations
 OTHER=0
 PLIST=1


=====================================
invesalius/data/styles.py
=====================================
@@ -47,7 +47,7 @@ from skimage.morphology import watershed
 import invesalius.gui.dialogs as dialogs
 from invesalius.data.measures import MeasureData
 
-from invesalius_cy import floodfill
+from . import floodfill
 
 import invesalius.data.watershed_process as watershed_process
 import invesalius.utils as utils


=====================================
invesalius/data/surface.py
=====================================
@@ -48,7 +48,7 @@ import invesalius.data.surface_process as surface_process
 import invesalius.utils as utl
 import invesalius.data.vtk_utils as vu
 
-from invesalius_cy import cy_mesh
+from invesalius.data import cy_mesh
 # TODO: Verificar ReleaseDataFlagOn and SetSource 
 
 class Surface():


=====================================
setup.py
=====================================
@@ -11,26 +11,26 @@ import numpy
 if sys.platform.startswith('linux'):
     setup(
         cmdclass = {'build_ext': build_ext},
-        ext_modules = cythonize([ Extension("invesalius_cy.mips", ["invesalius_cy/mips.pyx"],
+        ext_modules = cythonize([ Extension("invesalius.data.mips", ["invesalius/data/mips.pyx"],
                                   include_dirs =  [numpy.get_include()],
                                   extra_compile_args=['-fopenmp'],
                                   extra_link_args=['-fopenmp']),
 
-                       Extension("invesalius_cy.interpolation", ["invesalius_cy/interpolation.pyx"],
+                       Extension("invesalius.data.interpolation", ["invesalius/data/interpolation.pyx"],
                                  include_dirs=[numpy.get_include()],
                                  extra_compile_args=['-fopenmp',],
                                  extra_link_args=['-fopenmp',]),
 
-                       Extension("invesalius_cy.transforms", ["invesalius_cy/transforms.pyx"],
+                       Extension("invesalius.data.transforms", ["invesalius/data/transforms.pyx"],
                                  include_dirs=[numpy.get_include()],
                                  extra_compile_args=['-fopenmp',],
                                  extra_link_args=['-fopenmp',]),
 
-                       Extension("invesalius_cy.floodfill", ["invesalius_cy/floodfill.pyx"],
+                       Extension("invesalius.data.floodfill", ["invesalius/data/floodfill.pyx"],
                                  include_dirs=[numpy.get_include()],
                                  language='c++',),
 
-                       Extension("invesalius_cy.cy_mesh", ["invesalius_cy/cy_mesh.pyx"],
+                       Extension("invesalius.data.cy_mesh", ["invesalius/data/cy_mesh.pyx"],
                                  include_dirs=[numpy.get_include()],
                                  extra_compile_args=['-fopenmp', '-std=c++11'],
                                  extra_link_args=['-fopenmp', '-std=c++11'],



View it on GitLab: https://salsa.debian.org/med-team/invesalius/compare/1a0097d9d030e96184d588657fe9bd6a4bd3975c...4ed3755d10fba46039d43703a2b69e6b1fe35c9d

-- 
View it on GitLab: https://salsa.debian.org/med-team/invesalius/compare/1a0097d9d030e96184d588657fe9bd6a4bd3975c...4ed3755d10fba46039d43703a2b69e6b1fe35c9d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180911/38df7e54/attachment-0001.html>


More information about the debian-med-commit mailing list