public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/printrun/files/, media-gfx/printrun/
@ 2017-07-15 10:18 Pacho Ramos
  0 siblings, 0 replies; 3+ messages in thread
From: Pacho Ramos @ 2017-07-15 10:18 UTC (permalink / raw
  To: gentoo-commits

commit:     cfcb21113f746f5f8cb8ea27d2c6f90819e790aa
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 10:18:11 2017 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 10:18:30 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfcb2111

media-gfx/printrun: Apply Fedora fixes, also improving support with gtk3 and wxpython3

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 media-gfx/printrun/files/printrun-gtk3.patch       | 291 +++++++++++++++++++++
 media-gfx/printrun/files/printrun-x11.patch        |  39 +++
 ...99999999.ebuild => printrun-20150310-r1.ebuild} |  18 +-
 media-gfx/printrun/printrun-99999999.ebuild        |  10 +-
 4 files changed, 353 insertions(+), 5 deletions(-)

diff --git a/media-gfx/printrun/files/printrun-gtk3.patch b/media-gfx/printrun/files/printrun-gtk3.patch
new file mode 100644
index 00000000000..a31bcd15580
--- /dev/null
+++ b/media-gfx/printrun/files/printrun-gtk3.patch
@@ -0,0 +1,291 @@
+diff -up a/printrun/gui/controls.py.gtk3 a/printrun/gui/controls.py
+--- a/printrun/gui/controls.py.gtk3	2015-03-09 07:22:14.000000000 -0400
++++ a/printrun/gui/controls.py	2015-08-11 23:43:27.444624125 -0400
+@@ -136,7 +136,7 @@ def add_extra_controls(self, root, paren
+     if root.settings.last_temperature not in map(float, root.temps.values()):
+         htemp_choices = [str(root.settings.last_temperature)] + htemp_choices
+     root.htemp = wx.ComboBox(parentpanel, -1, choices = htemp_choices,
+-                             style = wx.CB_DROPDOWN, size = (80, -1))
++                             style = wx.CB_DROPDOWN, size = (115, -1))
+     root.htemp.SetToolTip(wx.ToolTip(_("Select Temperature for Hotend")))
+     root.htemp.Bind(wx.EVT_COMBOBOX, root.htemp_change)
+ 
+@@ -156,7 +156,7 @@ def add_extra_controls(self, root, paren
+     if root.settings.last_bed_temperature not in map(float, root.bedtemps.values()):
+         btemp_choices = [str(root.settings.last_bed_temperature)] + btemp_choices
+     root.btemp = wx.ComboBox(parentpanel, -1, choices = btemp_choices,
+-                             style = wx.CB_DROPDOWN, size = (80, -1))
++                             style = wx.CB_DROPDOWN, size = (115, -1))
+     root.btemp.SetToolTip(wx.ToolTip(_("Select Temperature for Heated Bed")))
+     root.btemp.Bind(wx.EVT_COMBOBOX, root.btemp_change)
+     add("btemp_val", root.btemp)
+@@ -192,7 +192,11 @@ def add_extra_controls(self, root, paren
+     root.speed_slider = wx.Slider(speedpanel, -1, 100, 1, 300)
+     speedsizer.Add(root.speed_slider, 1, flag = wx.EXPAND)
+ 
+-    root.speed_spin = FloatSpin(speedpanel, -1, value = 100, min_val = 1, max_val = 300, digits = 0, style = wx.ALIGN_LEFT, size = (80, -1))
++    if wx.VERSION < (3, 0):
++        root.speed_spin = FloatSpin(speedpanel, -1, value = 100, min_val = 1, max_val = 300, digits = 0, style = wx.ALIGN_LEFT, size = (80, -1))
++    else:
++        root.speed_spin = wx.SpinCtrlDouble(speedpanel, -1, initial = 100, min = 1, max = 300, style = wx.ALIGN_LEFT, size = (115, -1))
++        root.speed_spin.SetDigits(0)
+     speedsizer.Add(root.speed_spin, 0, flag = wx.ALIGN_CENTER_VERTICAL)
+     root.speed_label = wx.StaticText(speedpanel, -1, _("%"))
+     speedsizer.Add(root.speed_label, flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
+@@ -210,7 +214,10 @@ def add_extra_controls(self, root, paren
+         value = root.speed_spin.GetValue()
+         root.speed_setbtn.SetBackgroundColour("red")
+         root.speed_slider.SetValue(value)
+-    root.speed_spin.Bind(wx.EVT_SPINCTRL, speedslider_spin)
++    if wx.VERSION < (3, 0):
++        root.speed_spin.Bind(wx.EVT_SPINCTRL, speedslider_spin)
++    else:
++        root.speed_spin.Bind(wx.EVT_SPINCTRLDOUBLE, speedslider_spin)
+ 
+     def speedslider_scroll(event):
+         value = root.speed_slider.GetValue()
+@@ -269,10 +276,15 @@ def add_extra_controls(self, root, paren
+     esettingspanel = root.newPanel(parentpanel)
+     esettingssizer = wx.GridBagSizer()
+     esettingssizer.SetEmptyCellSize((0, 0))
+-    root.edist = FloatSpin(esettingspanel, -1, value = root.settings.last_extrusion, min_val = 0, max_val = 1000, size = (90, -1), digits = 1)
++    if wx.VERSION < (3, 0):
++        root.edist = FloatSpin(esettingspanel, -1, value = root.settings.last_extrusion, min_val = 0, max_val = 1000, size = (90, -1), digits = 1)
++        root.edist.Bind(wx.EVT_SPINCTRL, root.setfeeds)    
++    else:
++        root.edist = wx.SpinCtrlDouble(esettingspanel, -1, initial = root.settings.last_extrusion, min = 0, max = 1000, size = (135, -1))
++        root.edist.SetDigits(1)
++        root.edist.Bind(wx.EVT_SPINCTRLDOUBLE, root.setfeeds)
+     root.edist.SetBackgroundColour((225, 200, 200))
+     root.edist.SetForegroundColour("black")
+-    root.edist.Bind(wx.EVT_SPINCTRL, root.setfeeds)
+     root.edist.Bind(wx.EVT_TEXT, root.setfeeds)
+     add("edist_label", wx.StaticText(esettingspanel, -1, _("Length:")), container = esettingssizer, flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT | wx.RIGHT | wx.LEFT, border = 5)
+     add("edist_val", root.edist, container = esettingssizer, flag = wx.ALIGN_CENTER | wx.RIGHT, border = 5)
+@@ -280,11 +292,16 @@ def add_extra_controls(self, root, paren
+     add("edist_unit", wx.StaticText(esettingspanel, -1, unit_label), container = esettingssizer, flag = wx.ALIGN_CENTER | wx.RIGHT, border = 5)
+     root.edist.SetToolTip(wx.ToolTip(_("Amount to Extrude or Retract (mm)")))
+     if not mini_mode:
+-        root.efeedc = FloatSpin(esettingspanel, -1, value = root.settings.e_feedrate, min_val = 0, max_val = 50000, size = (90, -1), digits = 1)
++        if wx.VERSION < (3, 0):
++            root.efeedc = FloatSpin(esettingspanel, -1, value = root.settings.e_feedrate, min_val = 0, max_val = 50000, size = (90, -1), digits = 1)
++            root.efeedc.Bind(wx.EVT_SPINCTRL, root.setfeeds)
++        else:
++            root.efeedc = wx.SpinCtrlDouble(esettingspanel, -1, initial = root.settings.e_feedrate, min = 0, max = 50000, size = (145, -1))
++            root.efeedc.SetDigits(1)
++            root.efeedc.Bind(wx.EVT_SPINCTRLDOUBLE, root.setfeeds)
+         root.efeedc.SetToolTip(wx.ToolTip(_("Extrude / Retract speed (mm/min)")))
+         root.efeedc.SetBackgroundColour((225, 200, 200))
+         root.efeedc.SetForegroundColour("black")
+-        root.efeedc.Bind(wx.EVT_SPINCTRL, root.setfeeds)
+         root.efeedc.Bind(wx.EVT_TEXT, root.setfeeds)
+         add("efeed_val", root.efeedc, container = esettingssizer, flag = wx.ALIGN_CENTER | wx.RIGHT, border = 5)
+         add("efeed_label", wx.StaticText(esettingspanel, -1, _("Speed:")), container = esettingssizer, flag = wx.ALIGN_LEFT)
+@@ -379,12 +396,12 @@ class ControlsSizer(wx.GridBagSizer):
+             else:
+                 self.extra_buttons[key] = btn
+ 
+-        root.xyfeedc = wx.SpinCtrl(lltspanel, -1, str(root.settings.xy_feedrate), min = 0, max = 50000, size = (97, -1))
++        root.xyfeedc = wx.SpinCtrl(lltspanel, -1, str(root.settings.xy_feedrate), min = 0, max = 50000, size = (130, -1))
+         root.xyfeedc.SetToolTip(wx.ToolTip(_("Set Maximum Speed for X & Y axes (mm/min)")))
+         llts.Add(wx.StaticText(lltspanel, -1, _("XY:")), flag = wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL)
+         llts.Add(root.xyfeedc)
+         llts.Add(wx.StaticText(lltspanel, -1, _("mm/min Z:")), flag = wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL)
+-        root.zfeedc = wx.SpinCtrl(lltspanel, -1, str(root.settings.z_feedrate), min = 0, max = 50000, size = (90, -1))
++        root.zfeedc = wx.SpinCtrl(lltspanel, -1, str(root.settings.z_feedrate), min = 0, max = 50000, size = (130, -1))
+         root.zfeedc.SetToolTip(wx.ToolTip(_("Set Maximum Speed for Z axis (mm/min)")))
+         llts.Add(root.zfeedc,)
+ 
+diff -up a/printrun/gui/toolbar.py.gtk3 a/printrun/gui/toolbar.py
+--- a/printrun/gui/toolbar.py.gtk3	2015-03-09 07:22:14.000000000 -0400
++++ a/printrun/gui/toolbar.py	2015-06-29 23:43:30.700768952 -0400
+@@ -42,7 +42,7 @@ def MainToolbar(root, parentpanel = None
+     root.baud = wx.ComboBox(parentpanel, -1,
+                             choices = ["2400", "9600", "19200", "38400",
+                                        "57600", "115200", "250000"],
+-                            style = wx.CB_DROPDOWN, size = (100, -1))
++                            style = wx.CB_DROPDOWN, size = (110, -1))
+     root.baud.SetToolTip(wx.ToolTip(_("Select Baud rate for printer communication")))
+     try:
+         root.baud.SetValue("115200")
+diff -up a/printrun/projectlayer.py.gtk3 a/printrun/projectlayer.py
+--- a/printrun/projectlayer.py.gtk3	2015-03-09 07:22:14.000000000 -0400
++++ a/printrun/projectlayer.py	2015-08-11 23:24:05.729359412 -0400
+@@ -278,38 +278,48 @@ class SettingsFrame(wx.Frame):
+         # Left Column
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "Layer (mm):"), pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.thickness = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_layer", "0.1")), size = (80, -1))
++        self.thickness = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_layer", "0.1")), size = (125, -1))
+         self.thickness.Bind(wx.EVT_TEXT, self.update_thickness)
+         self.thickness.SetHelpText("The thickness of each slice. Should match the value used to slice the model.  SVG files update this value automatically, 3dlp.zip files have to be manually entered.")
+         fieldsizer.Add(self.thickness, pos = (0, 1))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "Exposure (s):"), pos = (1, 0), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.interval = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_interval", "0.5")), size = (80, -1))
++        self.interval = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_interval", "0.5")), size = (125, -1))
+         self.interval.Bind(wx.EVT_TEXT, self.update_interval)
+         self.interval.SetHelpText("How long each slice should be displayed.")
+         fieldsizer.Add(self.interval, pos = (1, 1))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "Blank (s):"), pos = (2, 0), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.pause = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_pause", "0.5")), size = (80, -1))
++        self.pause = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_pause", "0.5")), size = (125, -1))
+         self.pause.Bind(wx.EVT_TEXT, self.update_pause)
+         self.pause.SetHelpText("The pause length between slices. This should take into account any movement of the Z axis, plus time to prepare the resin surface (sliding, tilting, sweeping, etc).")
+         fieldsizer.Add(self.pause, pos = (2, 1))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "Scale:"), pos = (3, 0), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.scale = floatspin.FloatSpin(self.panel, -1, value = self._get_setting('project_scale', 1.0), increment = 0.1, digits = 3, size = (80, -1))
+-        self.scale.Bind(floatspin.EVT_FLOATSPIN, self.update_scale)
++        if wx.VERSION < (3, 0):
++            self.scale = floatspin.FloatSpin(self.panel, -1, value = self._get_setting('project_scale', 1.0), increment = 0.1, digits = 3, size = (80, -1))
++            self.scale.Bind(floatspin.EVT_FLOATSPIN, self.update_scale)
++        else:
++            self.scale = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting('project_scale', 1.0), inc = 0.1, size = (125, -1))
++            self.scale.SetDigits(3)
++            self.scale.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_scale)
+         self.scale.SetHelpText("The additional scaling of each slice.")
+         fieldsizer.Add(self.scale, pos = (3, 1))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "Direction:"), pos = (4, 0), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.direction = wx.ComboBox(self.panel, -1, choices = ["Top Down", "Bottom Up"], value = self._get_setting('project_direction', "Top Down"), size = (80, -1))
++        self.direction = wx.ComboBox(self.panel, -1, choices = ["Top Down", "Bottom Up"], value = self._get_setting('project_direction', "Top Down"), size = (125, -1))
+         self.direction.Bind(wx.EVT_COMBOBOX, self.update_direction)
+         self.direction.SetHelpText("The direction the Z axis should move. Top Down is where the projector is above the model, Bottom up is where the projector is below the model.")
+         fieldsizer.Add(self.direction, pos = (4, 1), flag = wx.ALIGN_CENTER_VERTICAL)
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "Overshoot (mm):"), pos = (5, 0), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.overshoot = floatspin.FloatSpin(self.panel, -1, value = self._get_setting('project_overshoot', 3.0), increment = 0.1, digits = 1, min_val = 0, size = (80, -1))
+-        self.overshoot.Bind(floatspin.EVT_FLOATSPIN, self.update_overshoot)
++        if wx.VERSION < (3, 0):
++            self.overshoot = floatspin.FloatSpin(self.panel, -1, value = self._get_setting('project_overshoot', 3.0), increment = 0.1, digits = 1, min_val = 0, size = (80, -1))
++            self.overshoot.Bind(floatspin.EVT_FLOATSPIN, self.update_overshoot)
++        else:
++            self.overshoot = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting('project_overshoot', 3.0), inc = 0.1, min = 0, size = (125, -1))
++            self.overshoot.SetDigits(1)
++            self.overshoot.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_overshoot)
+         self.overshoot.SetHelpText("How far the axis should move beyond the next slice position for each slice. For Top Down printers this would dunk the model under the resi and then return. For Bottom Up printers this would raise the base away from the vat and then return.")
+         fieldsizer.Add(self.overshoot, pos = (5, 1))
+ 
+@@ -329,38 +339,53 @@ class SettingsFrame(wx.Frame):
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "X (px):"), pos = (0, 2), flag = wx.ALIGN_CENTER_VERTICAL)
+         projectX = int(math.floor(float(self._get_setting("project_x", 1920))))
+-        self.X = wx.SpinCtrl(self.panel, -1, str(projectX), max = 999999, size = (80, -1))
++        self.X = wx.SpinCtrl(self.panel, -1, str(projectX), max = 999999, size = (125, -1))
+         self.X.Bind(wx.EVT_SPINCTRL, self.update_resolution)
+         self.X.SetHelpText("The projector resolution in the X axis.")
+         fieldsizer.Add(self.X, pos = (0, 3))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "Y (px):"), pos = (1, 2), flag = wx.ALIGN_CENTER_VERTICAL)
+         projectY = int(math.floor(float(self._get_setting("project_y", 1200))))
+-        self.Y = wx.SpinCtrl(self.panel, -1, str(projectY), max = 999999, size = (80, -1))
++        self.Y = wx.SpinCtrl(self.panel, -1, str(projectY), max = 999999, size = (125, -1))
+         self.Y.Bind(wx.EVT_SPINCTRL, self.update_resolution)
+         self.Y.SetHelpText("The projector resolution in the Y axis.")
+         fieldsizer.Add(self.Y, pos = (1, 3))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "OffsetX (mm):"), pos = (2, 2), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.offset_X = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_offset_x", 0.0), increment = 1, digits = 1, size = (80, -1))
+-        self.offset_X.Bind(floatspin.EVT_FLOATSPIN, self.update_offset)
++        if wx.VERSION < (3, 0):
++            self.offset_X = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_offset_x", 0.0), increment = 1, digits = 1, size = (80, -1))
++            self.offset_X.Bind(floatspin.EVT_FLOATSPIN, self.update_offset)
++        else:
++            self.offset_X = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting("project_offset_x", 0.0), inc = 1, size = (125, -1))
++            self.offset_X.SetDigits(1)
++            self.offset_X.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_offset)
+         self.offset_X.SetHelpText("How far the slice should be offset from the edge in the X axis.")
+         fieldsizer.Add(self.offset_X, pos = (2, 3))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "OffsetY (mm):"), pos = (3, 2), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.offset_Y = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_offset_y", 0.0), increment = 1, digits = 1, size = (80, -1))
+-        self.offset_Y.Bind(floatspin.EVT_FLOATSPIN, self.update_offset)
++        if wx.VERSION < (3, 0):
++            self.offset_Y = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_offset_y", 0.0), increment = 1, digits = 1, size = (80, -1))
++            self.offset_Y.Bind(floatspin.EVT_FLOATSPIN, self.update_offset)
++        else:
++            self.offset_Y = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting("project_offset_y", 0.0), inc = 1, size = (125, -1))
++            self.offset_Y.SetDigits(1)
++            self.offset_Y.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_offset)
+         self.offset_Y.SetHelpText("How far the slice should be offset from the edge in the Y axis.")
+         fieldsizer.Add(self.offset_Y, pos = (3, 3))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "ProjectedX (mm):"), pos = (4, 2), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.projected_X_mm = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_projected_x", 505.0), increment = 1, digits = 1, size = (80, -1))
+-        self.projected_X_mm.Bind(floatspin.EVT_FLOATSPIN, self.update_projected_Xmm)
++        if wx.VERSION < (3, 0):
++            self.projected_X_mm = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_projected_x", 505.0), increment = 1, digits = 1, size = (80, -1))
++            self.projected_X_mm.Bind(floatspin.EVT_FLOATSPIN, self.update_projected_Xmm)
++        else:
++            self.projected_X_mm = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting("project_projected_x", 505.0), inc = 1, size = (125, -1))
++            self.projected_X_mm.SetDigits(1)
++            self.projected_X_mm.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_projected_Xmm)
+         self.projected_X_mm.SetHelpText("The actual width of the entire projected image. Use the Calibrate grid to show the full size of the projected image, and measure the width at the same level where the slice will be projected onto the resin.")
+         fieldsizer.Add(self.projected_X_mm, pos = (4, 3))
+ 
+         fieldsizer.Add(wx.StaticText(self.panel, -1, "Z Axis Speed (mm/min):"), pos = (5, 2), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.z_axis_rate = wx.SpinCtrl(self.panel, -1, str(self._get_setting("project_z_axis_rate", 200)), max = 9999, size = (80, -1))
++        self.z_axis_rate = wx.SpinCtrl(self.panel, -1, str(self._get_setting("project_z_axis_rate", 200)), max = 9999, size = (125, -1))
+         self.z_axis_rate.Bind(wx.EVT_SPINCTRL, self.update_z_axis_rate)
+         self.z_axis_rate.SetHelpText("Speed of the Z axis in mm/minute. Take into account that slower rates may require a longer pause value.")
+         fieldsizer.Add(self.z_axis_rate, pos = (5, 3))
+@@ -394,7 +419,11 @@ class SettingsFrame(wx.Frame):
+         first_layer_boxer.Add(self.first_layer, flag = wx.ALIGN_CENTER_VERTICAL)
+ 
+         first_layer_boxer.Add(wx.StaticText(self.panel, -1, " (s):"), flag = wx.ALIGN_CENTER_VERTICAL)
+-        self.show_first_layer_timer = floatspin.FloatSpin(self.panel, -1, value=-1, increment = 1, digits = 1, size = (55, -1))
++        if wx.VERSION < (3, 0):
++            self.show_first_layer_timer = floatspin.FloatSpin(self.panel, -1, value=-1, increment = 1, digits = 1, size = (55, -1))
++        else:
++            self.show_first_layer_timer = wx.SpinCtrlDouble(self.panel, -1, initial = -1, inc = 1, size = (125, -1))
++            self.show_first_layer_timer.SetDigits(1)
+         self.show_first_layer_timer.SetHelpText("How long to display the first layer for. -1 = unlimited.")
+         first_layer_boxer.Add(self.show_first_layer_timer, flag = wx.ALIGN_CENTER_VERTICAL)
+         displaysizer.Add(first_layer_boxer, pos = (0, 6), flag = wx.ALIGN_CENTER_VERTICAL)
+diff -up a/printrun/settings.py.gtk3 a/printrun/settings.py
+--- a/printrun/settings.py.gtk3	2015-06-19 05:47:24.000000000 -0400
++++ a/printrun/settings.py	2015-08-11 23:32:05.603437536 -0400
+@@ -145,7 +145,12 @@ class SpinSetting(wxSetting):
+ 
+     def get_specific_widget(self, parent):
+         from wx.lib.agw.floatspin import FloatSpin
+-        self.widget = FloatSpin(parent, -1, min_val = self.min, max_val = self.max, digits = 0)
++        import wx
++        if wx.VERSION < (3, 0):
++            self.widget = FloatSpin(parent, -1, min_val = self.min, max_val = self.max, digits = 0)
++        else:
++            self.widget = wx.SpinCtrlDouble(parent, -1, min = self.min, max = self.max)
++            self.widget.SetDigits(0)
+         self.widget.SetValue(self.value)
+         orig = self.widget.GetValue
+         self.widget.GetValue = lambda: int(orig())
+@@ -155,7 +160,12 @@ class FloatSpinSetting(SpinSetting):
+ 
+     def get_specific_widget(self, parent):
+         from wx.lib.agw.floatspin import FloatSpin
+-        self.widget = FloatSpin(parent, -1, value = self.value, min_val = self.min, max_val = self.max, increment = self.increment, digits = 2)
++        import wx
++        if wx.VERSION < (3, 0):
++            self.widget = FloatSpin(parent, -1, value = self.value, min_val = self.min, max_val = self.max, increment = self.increment, digits = 2)
++        else:
++            self.widget = wx.SpinCtrlDouble(parent, -1, initial = self.value, min = self.min, max = self.max, inc = self.increment)
++            self.widget.SetDigits(2)
+         return self.widget
+ 
+ class BooleanSetting(wxSetting):
+@@ -216,7 +226,12 @@ class BuildDimensionsSetting(wxSetting):
+         import wx
+         build_dimensions = parse_build_dimensions(self.value)
+         self.widgets = []
+-        w = lambda val, m, M: self.widgets.append(FloatSpin(parent, -1, value = val, min_val = m, max_val = M, digits = 2))
++        def w(val, m, M):
++            if wx.VERSION < (3, 0):
++                self.widgets.append(FloatSpin(parent, -1, value = val, min_val = m, max_val = M, digits = 2))
++            else:
++                self.widgets.append(wx.SpinCtrlDouble(parent, -1, initial = val, min = m, max = M))
++                self.widgets[-1].SetDigits(2)
+         addlabel = lambda name, pos: self.widget.Add(wx.StaticText(parent, -1, name), pos = pos, flag = wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, border = 5)
+         addwidget = lambda *pos: self.widget.Add(self.widgets[-1], pos = pos, flag = wx.RIGHT, border = 5)
+         self.widget = wx.GridBagSizer()

diff --git a/media-gfx/printrun/files/printrun-x11.patch b/media-gfx/printrun/files/printrun-x11.patch
new file mode 100644
index 00000000000..dd9597a126e
--- /dev/null
+++ b/media-gfx/printrun/files/printrun-x11.patch
@@ -0,0 +1,39 @@
+diff --git a/plater.py b/plater.py
+index 469eeb2..bfcc975 100755
+--- a/plater.py
++++ b/plater.py
+@@ -15,12 +15,14 @@
+ # You should have received a copy of the GNU General Public License
+ # along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
+ 
++import os
+ import sys
+ import wx
+ 
+ from printrun.stlplater import StlPlater
+ 
+ if __name__ == '__main__':
++    os.environ['GDK_BACKEND'] = 'x11'
+     app = wx.App(False)
+     main = StlPlater(filenames = sys.argv[1:])
+     main.Show()
+diff --git a/pronterface.py b/pronterface.py
+index dbe295a..4152288 100755
+--- a/pronterface.py
++++ b/pronterface.py
+@@ -15,6 +15,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
+ 
++import os
+ import sys
+ 
+ try:
+@@ -32,6 +33,7 @@ not yet available for python3. You should try running with python2 instead.""")
+ from printrun.pronterface import PronterApp
+ 
+ if __name__ == '__main__':
++    os.environ['GDK_BACKEND'] = 'x11'
+     app = PronterApp(False)
+     try:
+         app.MainLoop()

diff --git a/media-gfx/printrun/printrun-99999999.ebuild b/media-gfx/printrun/printrun-20150310-r1.ebuild
similarity index 54%
copy from media-gfx/printrun/printrun-99999999.ebuild
copy to media-gfx/printrun/printrun-20150310-r1.ebuild
index a8367bb5868..3185dcf2a6d 100644
--- a/media-gfx/printrun/printrun-99999999.ebuild
+++ b/media-gfx/printrun/printrun-20150310-r1.ebuild
@@ -5,20 +5,30 @@ EAPI=6
 
 PYTHON_COMPAT=( python2_7 )
 
-inherit distutils-r1 git-r3
+inherit distutils-r1
 
 DESCRIPTION="GUI interface for 3D printing on RepRap and other printers"
 HOMEPAGE="https://github.com/kliment/Printrun"
-EGIT_REPO_URI="https://github.com/kliment/Printrun.git"
+SRC_URI="https://github.com/kliment/Printrun/archive/${P}.tar.gz"
 
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86"
 IUSE=""
 
 DEPEND="dev-python/pyserial
-	dev-python/wxpython:2.8
+	dev-python/wxpython:*
 	dev-python/pyglet
 	dev-python/dbus-python
 	media-gfx/cairosvg"
 RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/Printrun-${P}"
+
+PATCHES=(
+	# https://bugzilla.redhat.com/show_bug.cgi?id=1231518
+	"${FILESDIR}"/${PN}-gtk3.patch
+
+	# https://github.com/kliment/Printrun/pull/790
+	"${FILESDIR}"/${PN}-x11.patch
+)

diff --git a/media-gfx/printrun/printrun-99999999.ebuild b/media-gfx/printrun/printrun-99999999.ebuild
index a8367bb5868..2599912dead 100644
--- a/media-gfx/printrun/printrun-99999999.ebuild
+++ b/media-gfx/printrun/printrun-99999999.ebuild
@@ -17,8 +17,16 @@ KEYWORDS=""
 IUSE=""
 
 DEPEND="dev-python/pyserial
-	dev-python/wxpython:2.8
+	dev-python/wxpython:*
 	dev-python/pyglet
 	dev-python/dbus-python
 	media-gfx/cairosvg"
 RDEPEND="${DEPEND}"
+
+PATCHES=(
+	# https://bugzilla.redhat.com/show_bug.cgi?id=1231518
+	"${FILESDIR}"/${PN}-gtk3.patch
+
+	# https://github.com/kliment/Printrun/pull/790
+	"${FILESDIR}"/${PN}-x11.patch
+)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/printrun/files/, media-gfx/printrun/
@ 2017-07-21 18:52 Amy Liffey
  0 siblings, 0 replies; 3+ messages in thread
From: Amy Liffey @ 2017-07-21 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     8a4a79755723ab19462a8606c69d92d2d19eaf78
Author:     Amy Liffey <amynka <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 21 18:47:49 2017 +0000
Commit:     Amy Liffey <amynka <AT> gentoo <DOT> org>
CommitDate: Fri Jul 21 18:51:59 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a4a7975

media-gfx/printrun: fix dependencies, remove old versions

- Remove old versions, patches
- Remove old patch from 9999999

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 media-gfx/printrun/Manifest                        |   1 -
 .../files/printrun-no-py-in-binaries.patch         | 396 ---------------------
 media-gfx/printrun/printrun-20140730.ebuild        |  30 --
 ...99999999.ebuild => printrun-20150310-r2.ebuild} |  23 +-
 media-gfx/printrun/printrun-20150310.ebuild        |  26 --
 media-gfx/printrun/printrun-99999999.ebuild        |  18 +-
 6 files changed, 25 insertions(+), 469 deletions(-)

diff --git a/media-gfx/printrun/Manifest b/media-gfx/printrun/Manifest
index c5da39cf85c..c7f22ab4142 100644
--- a/media-gfx/printrun/Manifest
+++ b/media-gfx/printrun/Manifest
@@ -1,2 +1 @@
-DIST printrun-20140730.tar.gz 902029 SHA256 3412882627a82bba0fcd0cdf7639074085d3355e5aef48ccdc91687b027a24fa SHA512 c60d3db1a9255a56aad30a8290e18707cc34774af8cc52be042a3fabe653a64874485a153763886458cb45fff718ba134642e530a9d065fcc42ae0473ee17da8 WHIRLPOOL 1f8c91e867a375df998248d31bda0c5901d1ba52071aee12acea42a53b44393332a86562ea96c58801bde63a961d4af14b05f4defc45cfe1f41061a4ee9438e1
 DIST printrun-20150310.tar.gz 906153 SHA256 6edaa533df5a590f55039b81e47f61881d2a47de07c3391d53bfb6d847f46d2e SHA512 359a4a6128b274a6709fb5c35a2d6c510bb57e010cfb12ddefa39cdb371f2141e2cab394be7d9d2f1dbc0175cc24deba61941d73b6c19fb299083afbf1141f1e WHIRLPOOL 38d3ead2be8fb7f802d73956bda5e83c99a902c2682f5c48f74d92e8c5e30b351b06821d6178d3b44722a10982d7a79c471fb3a27d2f313bfb647e9a241e92e1

diff --git a/media-gfx/printrun/files/printrun-no-py-in-binaries.patch b/media-gfx/printrun/files/printrun-no-py-in-binaries.patch
deleted file mode 100644
index 250af5fd26a..00000000000
--- a/media-gfx/printrun/files/printrun-no-py-in-binaries.patch
+++ /dev/null
@@ -1,396 +0,0 @@
-diff -urN Printrun-printrun-20140730.old/plater Printrun-printrun-20140730/plater
---- Printrun-printrun-20140730.old/plater	1970-01-01 01:00:00.000000000 +0100
-+++ Printrun-printrun-20140730/plater	2014-06-06 12:04:34.000000000 +0200
-@@ -0,0 +1,27 @@
-+#!/usr/bin/env python
-+
-+# This file is part of the Printrun suite.
-+#
-+# Printrun is free software: you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation, either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# Printrun is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
-+
-+import sys
-+import wx
-+
-+from printrun.stlplater import StlPlater
-+
-+if __name__ == '__main__':
-+    app = wx.App(False)
-+    main = StlPlater(sys.argv[1:])
-+    main.Show()
-+    app.MainLoop()
-diff -urN Printrun-printrun-20140730.old/plater.py Printrun-printrun-20140730/plater.py
---- Printrun-printrun-20140730.old/plater.py	2014-08-10 15:44:04.877086955 +0200
-+++ Printrun-printrun-20140730/plater.py	1970-01-01 01:00:00.000000000 +0100
-@@ -1,27 +0,0 @@
--#!/usr/bin/env python
--
--# This file is part of the Printrun suite.
--#
--# Printrun is free software: you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation, either version 3 of the License, or
--# (at your option) any later version.
--#
--# Printrun is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--# GNU General Public License for more details.
--#
--# You should have received a copy of the GNU General Public License
--# along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
--
--import sys
--import wx
--
--from printrun.stlplater import StlPlater
--
--if __name__ == '__main__':
--    app = wx.App(False)
--    main = StlPlater(sys.argv[1:])
--    main.Show()
--    app.MainLoop()
-diff -urN Printrun-printrun-20140730.old/printcore Printrun-printrun-20140730/printcore
---- Printrun-printrun-20140730.old/printcore	1970-01-01 01:00:00.000000000 +0100
-+++ Printrun-printrun-20140730/printcore	2014-06-06 12:04:34.000000000 +0200
-@@ -0,0 +1,76 @@
-+#!/usr/bin/env python
-+
-+# This file is part of the Printrun suite.
-+#
-+# Printrun is free software: you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation, either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# Printrun is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
-+
-+import time
-+import getopt
-+import sys
-+
-+from printrun.printcore import printcore
-+from printrun import gcoder
-+
-+if __name__ == '__main__':
-+    baud = 115200
-+    loud = False
-+    statusreport = False
-+    try:
-+        opts, args = getopt.getopt(sys.argv[1:], "h,b:,v,s",
-+                                   ["help", "baud", "verbose", "statusreport"])
-+    except getopt.GetoptError, err:
-+        print str(err)
-+        sys.exit(2)
-+    for o, a in opts:
-+        if o in ('-h', '--help'):
-+            # FIXME: Fix help
-+            print ("Opts are: --help, -b --baud = baudrate, -v --verbose, "
-+                   "-s --statusreport")
-+            sys.exit(1)
-+        if o in ('-b', '--baud'):
-+            baud = int(a)
-+        if o in ('-v', '--verbose'):
-+            loud = True
-+        elif o in ('-s', '--statusreport'):
-+            statusreport = True
-+
-+    if len(args) > 1:
-+        port = args[-2]
-+        filename = args[-1]
-+        print "Printing: %s on %s with baudrate %d" % (filename, port, baud)
-+    else:
-+        print "Usage: python [-h|-b|-v|-s] printcore.py /dev/tty[USB|ACM]x filename.gcode"
-+        sys.exit(2)
-+    p = printcore(port, baud)
-+    p.loud = loud
-+    time.sleep(2)
-+    gcode = [i.strip() for i in open(filename)]
-+    gcode = gcoder.LightGCode(gcode)
-+    p.startprint(gcode)
-+
-+    try:
-+        if statusreport:
-+            p.loud = False
-+            sys.stdout.write("Progress: 00.0%\r")
-+            sys.stdout.flush()
-+        while p.printing:
-+            time.sleep(1)
-+            if statusreport:
-+                progress = 100 * float(p.queueindex) / len(p.mainqueue)
-+                sys.stdout.write("Progress: %02.1f%%\r" % progress)
-+                sys.stdout.flush()
-+        p.disconnect()
-+        sys.exit(0)
-+    except:
-+        p.disconnect()
-diff -urN Printrun-printrun-20140730.old/printcore.py Printrun-printrun-20140730/printcore.py
---- Printrun-printrun-20140730.old/printcore.py	2014-08-10 15:44:04.881086932 +0200
-+++ Printrun-printrun-20140730/printcore.py	1970-01-01 01:00:00.000000000 +0100
-@@ -1,76 +0,0 @@
--#!/usr/bin/env python
--
--# This file is part of the Printrun suite.
--#
--# Printrun is free software: you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation, either version 3 of the License, or
--# (at your option) any later version.
--#
--# Printrun is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--# GNU General Public License for more details.
--#
--# You should have received a copy of the GNU General Public License
--# along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
--
--import time
--import getopt
--import sys
--
--from printrun.printcore import printcore
--from printrun import gcoder
--
--if __name__ == '__main__':
--    baud = 115200
--    loud = False
--    statusreport = False
--    try:
--        opts, args = getopt.getopt(sys.argv[1:], "h,b:,v,s",
--                                   ["help", "baud", "verbose", "statusreport"])
--    except getopt.GetoptError, err:
--        print str(err)
--        sys.exit(2)
--    for o, a in opts:
--        if o in ('-h', '--help'):
--            # FIXME: Fix help
--            print ("Opts are: --help, -b --baud = baudrate, -v --verbose, "
--                   "-s --statusreport")
--            sys.exit(1)
--        if o in ('-b', '--baud'):
--            baud = int(a)
--        if o in ('-v', '--verbose'):
--            loud = True
--        elif o in ('-s', '--statusreport'):
--            statusreport = True
--
--    if len(args) > 1:
--        port = args[-2]
--        filename = args[-1]
--        print "Printing: %s on %s with baudrate %d" % (filename, port, baud)
--    else:
--        print "Usage: python [-h|-b|-v|-s] printcore.py /dev/tty[USB|ACM]x filename.gcode"
--        sys.exit(2)
--    p = printcore(port, baud)
--    p.loud = loud
--    time.sleep(2)
--    gcode = [i.strip() for i in open(filename)]
--    gcode = gcoder.LightGCode(gcode)
--    p.startprint(gcode)
--
--    try:
--        if statusreport:
--            p.loud = False
--            sys.stdout.write("Progress: 00.0%\r")
--            sys.stdout.flush()
--        while p.printing:
--            time.sleep(1)
--            if statusreport:
--                progress = 100 * float(p.queueindex) / len(p.mainqueue)
--                sys.stdout.write("Progress: %02.1f%%\r" % progress)
--                sys.stdout.flush()
--        p.disconnect()
--        sys.exit(0)
--    except:
--        p.disconnect()
-diff -urN Printrun-printrun-20140730.old/pronsole Printrun-printrun-20140730/pronsole
---- Printrun-printrun-20140730.old/pronsole	1970-01-01 01:00:00.000000000 +0100
-+++ Printrun-printrun-20140730/pronsole	2014-06-06 12:04:34.000000000 +0200
-@@ -0,0 +1,33 @@
-+#!/usr/bin/env python
-+
-+# This file is part of the Printrun suite.
-+#
-+# Printrun is free software: you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation, either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# Printrun is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
-+
-+import sys
-+import traceback
-+from printrun.pronsole import pronsole
-+
-+if __name__ == "__main__":
-+
-+    interp = pronsole()
-+    interp.parse_cmdline(sys.argv[1:])
-+    try:
-+        interp.cmdloop()
-+    except SystemExit:
-+        interp.p.disconnect()
-+    except:
-+        print _("Caught an exception, exiting:")
-+        traceback.print_exc()
-+        interp.p.disconnect()
-diff -urN Printrun-printrun-20140730.old/pronsole.py Printrun-printrun-20140730/pronsole.py
---- Printrun-printrun-20140730.old/pronsole.py	2014-08-10 15:44:04.863087038 +0200
-+++ Printrun-printrun-20140730/pronsole.py	1970-01-01 01:00:00.000000000 +0100
-@@ -1,33 +0,0 @@
--#!/usr/bin/env python
--
--# This file is part of the Printrun suite.
--#
--# Printrun is free software: you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation, either version 3 of the License, or
--# (at your option) any later version.
--#
--# Printrun is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--# GNU General Public License for more details.
--#
--# You should have received a copy of the GNU General Public License
--# along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
--
--import sys
--import traceback
--from printrun.pronsole import pronsole
--
--if __name__ == "__main__":
--
--    interp = pronsole()
--    interp.parse_cmdline(sys.argv[1:])
--    try:
--        interp.cmdloop()
--    except SystemExit:
--        interp.p.disconnect()
--    except:
--        print _("Caught an exception, exiting:")
--        traceback.print_exc()
--        interp.p.disconnect()
-diff -urN Printrun-printrun-20140730.old/pronterface Printrun-printrun-20140730/pronterface
---- Printrun-printrun-20140730.old/pronterface	1970-01-01 01:00:00.000000000 +0100
-+++ Printrun-printrun-20140730/pronterface	2014-06-06 12:04:34.000000000 +0200
-@@ -0,0 +1,40 @@
-+#!/usr/bin/env python
-+
-+# This file is part of the Printrun suite.
-+#
-+# Printrun is free software: you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation, either version 3 of the License, or
-+# (at your option) any later version.
-+#
-+# Printrun is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
-+
-+import sys
-+
-+try:
-+    import wx  # NOQA
-+except:
-+    print("wxPython is not installed. This program requires wxPython to run.")
-+    if sys.version_info.major >= 3:
-+        print("""\
-+As you are currently running python3, this is most likely because wxPython is
-+not yet available for python3. You should try running with python2 instead.""")
-+        sys.exit(-1)
-+    else:
-+        raise
-+
-+from printrun.pronterface import PronterApp
-+
-+if __name__ == '__main__':
-+    app = PronterApp(False)
-+    try:
-+        app.MainLoop()
-+    except KeyboardInterrupt:
-+        pass
-+    del app
-diff -urN Printrun-printrun-20140730.old/pronterface.py Printrun-printrun-20140730/pronterface.py
---- Printrun-printrun-20140730.old/pronterface.py	2014-08-10 15:44:04.862087044 +0200
-+++ Printrun-printrun-20140730/pronterface.py	1970-01-01 01:00:00.000000000 +0100
-@@ -1,40 +0,0 @@
--#!/usr/bin/env python
--
--# This file is part of the Printrun suite.
--#
--# Printrun is free software: you can redistribute it and/or modify
--# it under the terms of the GNU General Public License as published by
--# the Free Software Foundation, either version 3 of the License, or
--# (at your option) any later version.
--#
--# Printrun is distributed in the hope that it will be useful,
--# but WITHOUT ANY WARRANTY; without even the implied warranty of
--# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--# GNU General Public License for more details.
--#
--# You should have received a copy of the GNU General Public License
--# along with Printrun.  If not, see <http://www.gnu.org/licenses/>.
--
--import sys
--
--try:
--    import wx  # NOQA
--except:
--    print("wxPython is not installed. This program requires wxPython to run.")
--    if sys.version_info.major >= 3:
--        print("""\
--As you are currently running python3, this is most likely because wxPython is
--not yet available for python3. You should try running with python2 instead.""")
--        sys.exit(-1)
--    else:
--        raise
--
--from printrun.pronterface import PronterApp
--
--if __name__ == '__main__':
--    app = PronterApp(False)
--    try:
--        app.MainLoop()
--    except KeyboardInterrupt:
--        pass
--    del app
-diff -urN Printrun-printrun-20140730.old/setup.py Printrun-printrun-20140730/setup.py
---- Printrun-printrun-20140730.old/setup.py	2014-08-10 15:44:04.869087003 +0200
-+++ Printrun-printrun-20140730/setup.py	2014-08-10 15:44:59.470765212 +0200
-@@ -162,7 +162,7 @@
-       license = "GPLv3",
-       data_files = data_files,
-       packages = ["printrun", "printrun.gl", "printrun.gl.libtatlin", "printrun.gui", "printrun.power"],
--      scripts = ["pronsole.py", "pronterface.py", "plater.py", "printcore.py"],
-+      scripts = ["pronsole", "pronterface", "plater", "printcore"],
-       cmdclass = cmdclass,
-       ext_modules = extensions,
-       )

diff --git a/media-gfx/printrun/printrun-20140730.ebuild b/media-gfx/printrun/printrun-20140730.ebuild
deleted file mode 100644
index 5d9f12ea98e..00000000000
--- a/media-gfx/printrun/printrun-20140730.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1
-
-DESCRIPTION="GUI interface for 3D printing on RepRap and other printers"
-HOMEPAGE="https://github.com/kliment/Printrun"
-SRC_URI="https://github.com/kliment/Printrun/archive/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-python/pyserial
-	dev-python/wxpython
-	dev-python/pyglet
-	dev-python/dbus-python
-	media-gfx/cairosvg"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/printrun-no-py-in-binaries.patch"
-)
-
-S="${WORKDIR}/Printrun-${P}"

diff --git a/media-gfx/printrun/printrun-99999999.ebuild b/media-gfx/printrun/printrun-20150310-r2.ebuild
similarity index 53%
copy from media-gfx/printrun/printrun-99999999.ebuild
copy to media-gfx/printrun/printrun-20150310-r2.ebuild
index 2599912dead..72839c7ab4e 100644
--- a/media-gfx/printrun/printrun-99999999.ebuild
+++ b/media-gfx/printrun/printrun-20150310-r2.ebuild
@@ -5,24 +5,31 @@ EAPI=6
 
 PYTHON_COMPAT=( python2_7 )
 
-inherit distutils-r1 git-r3
+inherit distutils-r1
 
 DESCRIPTION="GUI interface for 3D printing on RepRap and other printers"
 HOMEPAGE="https://github.com/kliment/Printrun"
-EGIT_REPO_URI="https://github.com/kliment/Printrun.git"
+SRC_URI="https://github.com/kliment/Printrun/archive/${P}.tar.gz"
 
 LICENSE="GPL-3"
 SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86"
 IUSE=""
 
-DEPEND="dev-python/pyserial
-	dev-python/wxpython:*
-	dev-python/pyglet
-	dev-python/dbus-python
-	media-gfx/cairosvg"
+DEPEND="
+	app-text/psutils
+	dev-python/dbus-python[${PYTHON_USEDEP}]
+	dev-python/numpy[${PYTHON_USEDEP}]
+	dev-python/pycairo[${PYTHON_USEDEP}]
+	dev-python/pyglet[${PYTHON_USEDEP}]
+	dev-python/pyserial[${PYTHON_USEDEP}]
+	dev-python/wxpython:*[${PYTHON_USEDEP}]
+	media-gfx/cairosvg[${PYTHON_USEDEP}]"
+
 RDEPEND="${DEPEND}"
 
+S="${WORKDIR}/Printrun-${P}"
+
 PATCHES=(
 	# https://bugzilla.redhat.com/show_bug.cgi?id=1231518
 	"${FILESDIR}"/${PN}-gtk3.patch

diff --git a/media-gfx/printrun/printrun-20150310.ebuild b/media-gfx/printrun/printrun-20150310.ebuild
deleted file mode 100644
index 5bf664f6aee..00000000000
--- a/media-gfx/printrun/printrun-20150310.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1
-
-DESCRIPTION="GUI interface for 3D printing on RepRap and other printers"
-HOMEPAGE="https://github.com/kliment/Printrun"
-SRC_URI="https://github.com/kliment/Printrun/archive/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-python/pyserial
-	dev-python/wxpython:2.8
-	dev-python/pyglet
-	dev-python/dbus-python
-	media-gfx/cairosvg"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/Printrun-${P}"

diff --git a/media-gfx/printrun/printrun-99999999.ebuild b/media-gfx/printrun/printrun-99999999.ebuild
index 2599912dead..d12fe530c37 100644
--- a/media-gfx/printrun/printrun-99999999.ebuild
+++ b/media-gfx/printrun/printrun-99999999.ebuild
@@ -16,17 +16,19 @@ SLOT="0"
 KEYWORDS=""
 IUSE=""
 
-DEPEND="dev-python/pyserial
-	dev-python/wxpython:*
-	dev-python/pyglet
-	dev-python/dbus-python
-	media-gfx/cairosvg"
+DEPEND="
+	app-text/psutils
+	dev-python/dbus-python[${PYTHON_USEDEP}]
+	dev-python/numpy[${PYTHON_USEDEP}]
+	dev-python/pycairo[${PYTHON_USEDEP}]
+	dev-python/pyglet[${PYTHON_USEDEP}]
+	dev-python/pyserial[${PYTHON_USEDEP}]
+	dev-python/wxpython:*[${PYTHON_USEDEP}]
+	media-gfx/cairosvg[${PYTHON_USEDEP}]"
+
 RDEPEND="${DEPEND}"
 
 PATCHES=(
 	# https://bugzilla.redhat.com/show_bug.cgi?id=1231518
 	"${FILESDIR}"/${PN}-gtk3.patch
-
-	# https://github.com/kliment/Printrun/pull/790
-	"${FILESDIR}"/${PN}-x11.patch
 )


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/printrun/files/, media-gfx/printrun/
@ 2017-12-18 18:47 Amy Liffey
  0 siblings, 0 replies; 3+ messages in thread
From: Amy Liffey @ 2017-12-18 18:47 UTC (permalink / raw
  To: gentoo-commits

commit:     910314d89f11de81ceddc7963f07d5a5fc3249b9
Author:     Amy Liffey <amynka <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 18 18:38:31 2017 +0000
Commit:     Amy Liffey <amynka <AT> gentoo <DOT> org>
CommitDate: Mon Dec 18 18:45:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=910314d8

media-gfx/printrun: remove oversized patch

Closes: https://bugs.gentoo.org/640754
Package-Manager: Portage-2.3.13, Repoman-2.3.3

 media-gfx/printrun/Manifest                        |   1 +
 media-gfx/printrun/files/printrun-gtk3.patch       | 291 ---------------------
 media-gfx/printrun/printrun-20150310-r1.ebuild     |  34 ---
 ...50310-r2.ebuild => printrun-20150310-r3.ebuild} |   7 +-
 media-gfx/printrun/printrun-99999999.ebuild        |   8 +-
 5 files changed, 12 insertions(+), 329 deletions(-)

diff --git a/media-gfx/printrun/Manifest b/media-gfx/printrun/Manifest
index 3cf6a004f27..199ff2b7c81 100644
--- a/media-gfx/printrun/Manifest
+++ b/media-gfx/printrun/Manifest
@@ -1 +1,2 @@
 DIST printrun-20150310.tar.gz 906153 BLAKE2B 60671cab6661deb4f4d127f276b4ce545df161023e57e6ef8ca857c0fd8a41ccdfc1f1811fe854dc156fa8b328b4e3d12038f07bb43aa1b20f03ed612c15aaa4 SHA512 359a4a6128b274a6709fb5c35a2d6c510bb57e010cfb12ddefa39cdb371f2141e2cab394be7d9d2f1dbc0175cc24deba61941d73b6c19fb299083afbf1141f1e
+DIST printrun-gtk3.tar.xz 3824 BLAKE2B cc45bcc7f7ddc8a961e86b83d731a9860285206d06f3a2b2bf70327b88d1e496f6bda3756182d99d85ae237d20188959e0efa94002371c0ffaa3a185fbe32c4e SHA512 8eece239ac40fe293709117b42111a5bc31e95edd0cbdfc52ae38c5d91dded777a365fdd52d996c159fe83ecbd9fb6b3318a7622eb524db316771756a684cc9e

diff --git a/media-gfx/printrun/files/printrun-gtk3.patch b/media-gfx/printrun/files/printrun-gtk3.patch
deleted file mode 100644
index a31bcd15580..00000000000
--- a/media-gfx/printrun/files/printrun-gtk3.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-diff -up a/printrun/gui/controls.py.gtk3 a/printrun/gui/controls.py
---- a/printrun/gui/controls.py.gtk3	2015-03-09 07:22:14.000000000 -0400
-+++ a/printrun/gui/controls.py	2015-08-11 23:43:27.444624125 -0400
-@@ -136,7 +136,7 @@ def add_extra_controls(self, root, paren
-     if root.settings.last_temperature not in map(float, root.temps.values()):
-         htemp_choices = [str(root.settings.last_temperature)] + htemp_choices
-     root.htemp = wx.ComboBox(parentpanel, -1, choices = htemp_choices,
--                             style = wx.CB_DROPDOWN, size = (80, -1))
-+                             style = wx.CB_DROPDOWN, size = (115, -1))
-     root.htemp.SetToolTip(wx.ToolTip(_("Select Temperature for Hotend")))
-     root.htemp.Bind(wx.EVT_COMBOBOX, root.htemp_change)
- 
-@@ -156,7 +156,7 @@ def add_extra_controls(self, root, paren
-     if root.settings.last_bed_temperature not in map(float, root.bedtemps.values()):
-         btemp_choices = [str(root.settings.last_bed_temperature)] + btemp_choices
-     root.btemp = wx.ComboBox(parentpanel, -1, choices = btemp_choices,
--                             style = wx.CB_DROPDOWN, size = (80, -1))
-+                             style = wx.CB_DROPDOWN, size = (115, -1))
-     root.btemp.SetToolTip(wx.ToolTip(_("Select Temperature for Heated Bed")))
-     root.btemp.Bind(wx.EVT_COMBOBOX, root.btemp_change)
-     add("btemp_val", root.btemp)
-@@ -192,7 +192,11 @@ def add_extra_controls(self, root, paren
-     root.speed_slider = wx.Slider(speedpanel, -1, 100, 1, 300)
-     speedsizer.Add(root.speed_slider, 1, flag = wx.EXPAND)
- 
--    root.speed_spin = FloatSpin(speedpanel, -1, value = 100, min_val = 1, max_val = 300, digits = 0, style = wx.ALIGN_LEFT, size = (80, -1))
-+    if wx.VERSION < (3, 0):
-+        root.speed_spin = FloatSpin(speedpanel, -1, value = 100, min_val = 1, max_val = 300, digits = 0, style = wx.ALIGN_LEFT, size = (80, -1))
-+    else:
-+        root.speed_spin = wx.SpinCtrlDouble(speedpanel, -1, initial = 100, min = 1, max = 300, style = wx.ALIGN_LEFT, size = (115, -1))
-+        root.speed_spin.SetDigits(0)
-     speedsizer.Add(root.speed_spin, 0, flag = wx.ALIGN_CENTER_VERTICAL)
-     root.speed_label = wx.StaticText(speedpanel, -1, _("%"))
-     speedsizer.Add(root.speed_label, flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT)
-@@ -210,7 +214,10 @@ def add_extra_controls(self, root, paren
-         value = root.speed_spin.GetValue()
-         root.speed_setbtn.SetBackgroundColour("red")
-         root.speed_slider.SetValue(value)
--    root.speed_spin.Bind(wx.EVT_SPINCTRL, speedslider_spin)
-+    if wx.VERSION < (3, 0):
-+        root.speed_spin.Bind(wx.EVT_SPINCTRL, speedslider_spin)
-+    else:
-+        root.speed_spin.Bind(wx.EVT_SPINCTRLDOUBLE, speedslider_spin)
- 
-     def speedslider_scroll(event):
-         value = root.speed_slider.GetValue()
-@@ -269,10 +276,15 @@ def add_extra_controls(self, root, paren
-     esettingspanel = root.newPanel(parentpanel)
-     esettingssizer = wx.GridBagSizer()
-     esettingssizer.SetEmptyCellSize((0, 0))
--    root.edist = FloatSpin(esettingspanel, -1, value = root.settings.last_extrusion, min_val = 0, max_val = 1000, size = (90, -1), digits = 1)
-+    if wx.VERSION < (3, 0):
-+        root.edist = FloatSpin(esettingspanel, -1, value = root.settings.last_extrusion, min_val = 0, max_val = 1000, size = (90, -1), digits = 1)
-+        root.edist.Bind(wx.EVT_SPINCTRL, root.setfeeds)    
-+    else:
-+        root.edist = wx.SpinCtrlDouble(esettingspanel, -1, initial = root.settings.last_extrusion, min = 0, max = 1000, size = (135, -1))
-+        root.edist.SetDigits(1)
-+        root.edist.Bind(wx.EVT_SPINCTRLDOUBLE, root.setfeeds)
-     root.edist.SetBackgroundColour((225, 200, 200))
-     root.edist.SetForegroundColour("black")
--    root.edist.Bind(wx.EVT_SPINCTRL, root.setfeeds)
-     root.edist.Bind(wx.EVT_TEXT, root.setfeeds)
-     add("edist_label", wx.StaticText(esettingspanel, -1, _("Length:")), container = esettingssizer, flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT | wx.RIGHT | wx.LEFT, border = 5)
-     add("edist_val", root.edist, container = esettingssizer, flag = wx.ALIGN_CENTER | wx.RIGHT, border = 5)
-@@ -280,11 +292,16 @@ def add_extra_controls(self, root, paren
-     add("edist_unit", wx.StaticText(esettingspanel, -1, unit_label), container = esettingssizer, flag = wx.ALIGN_CENTER | wx.RIGHT, border = 5)
-     root.edist.SetToolTip(wx.ToolTip(_("Amount to Extrude or Retract (mm)")))
-     if not mini_mode:
--        root.efeedc = FloatSpin(esettingspanel, -1, value = root.settings.e_feedrate, min_val = 0, max_val = 50000, size = (90, -1), digits = 1)
-+        if wx.VERSION < (3, 0):
-+            root.efeedc = FloatSpin(esettingspanel, -1, value = root.settings.e_feedrate, min_val = 0, max_val = 50000, size = (90, -1), digits = 1)
-+            root.efeedc.Bind(wx.EVT_SPINCTRL, root.setfeeds)
-+        else:
-+            root.efeedc = wx.SpinCtrlDouble(esettingspanel, -1, initial = root.settings.e_feedrate, min = 0, max = 50000, size = (145, -1))
-+            root.efeedc.SetDigits(1)
-+            root.efeedc.Bind(wx.EVT_SPINCTRLDOUBLE, root.setfeeds)
-         root.efeedc.SetToolTip(wx.ToolTip(_("Extrude / Retract speed (mm/min)")))
-         root.efeedc.SetBackgroundColour((225, 200, 200))
-         root.efeedc.SetForegroundColour("black")
--        root.efeedc.Bind(wx.EVT_SPINCTRL, root.setfeeds)
-         root.efeedc.Bind(wx.EVT_TEXT, root.setfeeds)
-         add("efeed_val", root.efeedc, container = esettingssizer, flag = wx.ALIGN_CENTER | wx.RIGHT, border = 5)
-         add("efeed_label", wx.StaticText(esettingspanel, -1, _("Speed:")), container = esettingssizer, flag = wx.ALIGN_LEFT)
-@@ -379,12 +396,12 @@ class ControlsSizer(wx.GridBagSizer):
-             else:
-                 self.extra_buttons[key] = btn
- 
--        root.xyfeedc = wx.SpinCtrl(lltspanel, -1, str(root.settings.xy_feedrate), min = 0, max = 50000, size = (97, -1))
-+        root.xyfeedc = wx.SpinCtrl(lltspanel, -1, str(root.settings.xy_feedrate), min = 0, max = 50000, size = (130, -1))
-         root.xyfeedc.SetToolTip(wx.ToolTip(_("Set Maximum Speed for X & Y axes (mm/min)")))
-         llts.Add(wx.StaticText(lltspanel, -1, _("XY:")), flag = wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL)
-         llts.Add(root.xyfeedc)
-         llts.Add(wx.StaticText(lltspanel, -1, _("mm/min Z:")), flag = wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL)
--        root.zfeedc = wx.SpinCtrl(lltspanel, -1, str(root.settings.z_feedrate), min = 0, max = 50000, size = (90, -1))
-+        root.zfeedc = wx.SpinCtrl(lltspanel, -1, str(root.settings.z_feedrate), min = 0, max = 50000, size = (130, -1))
-         root.zfeedc.SetToolTip(wx.ToolTip(_("Set Maximum Speed for Z axis (mm/min)")))
-         llts.Add(root.zfeedc,)
- 
-diff -up a/printrun/gui/toolbar.py.gtk3 a/printrun/gui/toolbar.py
---- a/printrun/gui/toolbar.py.gtk3	2015-03-09 07:22:14.000000000 -0400
-+++ a/printrun/gui/toolbar.py	2015-06-29 23:43:30.700768952 -0400
-@@ -42,7 +42,7 @@ def MainToolbar(root, parentpanel = None
-     root.baud = wx.ComboBox(parentpanel, -1,
-                             choices = ["2400", "9600", "19200", "38400",
-                                        "57600", "115200", "250000"],
--                            style = wx.CB_DROPDOWN, size = (100, -1))
-+                            style = wx.CB_DROPDOWN, size = (110, -1))
-     root.baud.SetToolTip(wx.ToolTip(_("Select Baud rate for printer communication")))
-     try:
-         root.baud.SetValue("115200")
-diff -up a/printrun/projectlayer.py.gtk3 a/printrun/projectlayer.py
---- a/printrun/projectlayer.py.gtk3	2015-03-09 07:22:14.000000000 -0400
-+++ a/printrun/projectlayer.py	2015-08-11 23:24:05.729359412 -0400
-@@ -278,38 +278,48 @@ class SettingsFrame(wx.Frame):
-         # Left Column
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "Layer (mm):"), pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.thickness = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_layer", "0.1")), size = (80, -1))
-+        self.thickness = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_layer", "0.1")), size = (125, -1))
-         self.thickness.Bind(wx.EVT_TEXT, self.update_thickness)
-         self.thickness.SetHelpText("The thickness of each slice. Should match the value used to slice the model.  SVG files update this value automatically, 3dlp.zip files have to be manually entered.")
-         fieldsizer.Add(self.thickness, pos = (0, 1))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "Exposure (s):"), pos = (1, 0), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.interval = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_interval", "0.5")), size = (80, -1))
-+        self.interval = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_interval", "0.5")), size = (125, -1))
-         self.interval.Bind(wx.EVT_TEXT, self.update_interval)
-         self.interval.SetHelpText("How long each slice should be displayed.")
-         fieldsizer.Add(self.interval, pos = (1, 1))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "Blank (s):"), pos = (2, 0), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.pause = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_pause", "0.5")), size = (80, -1))
-+        self.pause = wx.TextCtrl(self.panel, -1, str(self._get_setting("project_pause", "0.5")), size = (125, -1))
-         self.pause.Bind(wx.EVT_TEXT, self.update_pause)
-         self.pause.SetHelpText("The pause length between slices. This should take into account any movement of the Z axis, plus time to prepare the resin surface (sliding, tilting, sweeping, etc).")
-         fieldsizer.Add(self.pause, pos = (2, 1))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "Scale:"), pos = (3, 0), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.scale = floatspin.FloatSpin(self.panel, -1, value = self._get_setting('project_scale', 1.0), increment = 0.1, digits = 3, size = (80, -1))
--        self.scale.Bind(floatspin.EVT_FLOATSPIN, self.update_scale)
-+        if wx.VERSION < (3, 0):
-+            self.scale = floatspin.FloatSpin(self.panel, -1, value = self._get_setting('project_scale', 1.0), increment = 0.1, digits = 3, size = (80, -1))
-+            self.scale.Bind(floatspin.EVT_FLOATSPIN, self.update_scale)
-+        else:
-+            self.scale = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting('project_scale', 1.0), inc = 0.1, size = (125, -1))
-+            self.scale.SetDigits(3)
-+            self.scale.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_scale)
-         self.scale.SetHelpText("The additional scaling of each slice.")
-         fieldsizer.Add(self.scale, pos = (3, 1))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "Direction:"), pos = (4, 0), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.direction = wx.ComboBox(self.panel, -1, choices = ["Top Down", "Bottom Up"], value = self._get_setting('project_direction', "Top Down"), size = (80, -1))
-+        self.direction = wx.ComboBox(self.panel, -1, choices = ["Top Down", "Bottom Up"], value = self._get_setting('project_direction', "Top Down"), size = (125, -1))
-         self.direction.Bind(wx.EVT_COMBOBOX, self.update_direction)
-         self.direction.SetHelpText("The direction the Z axis should move. Top Down is where the projector is above the model, Bottom up is where the projector is below the model.")
-         fieldsizer.Add(self.direction, pos = (4, 1), flag = wx.ALIGN_CENTER_VERTICAL)
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "Overshoot (mm):"), pos = (5, 0), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.overshoot = floatspin.FloatSpin(self.panel, -1, value = self._get_setting('project_overshoot', 3.0), increment = 0.1, digits = 1, min_val = 0, size = (80, -1))
--        self.overshoot.Bind(floatspin.EVT_FLOATSPIN, self.update_overshoot)
-+        if wx.VERSION < (3, 0):
-+            self.overshoot = floatspin.FloatSpin(self.panel, -1, value = self._get_setting('project_overshoot', 3.0), increment = 0.1, digits = 1, min_val = 0, size = (80, -1))
-+            self.overshoot.Bind(floatspin.EVT_FLOATSPIN, self.update_overshoot)
-+        else:
-+            self.overshoot = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting('project_overshoot', 3.0), inc = 0.1, min = 0, size = (125, -1))
-+            self.overshoot.SetDigits(1)
-+            self.overshoot.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_overshoot)
-         self.overshoot.SetHelpText("How far the axis should move beyond the next slice position for each slice. For Top Down printers this would dunk the model under the resi and then return. For Bottom Up printers this would raise the base away from the vat and then return.")
-         fieldsizer.Add(self.overshoot, pos = (5, 1))
- 
-@@ -329,38 +339,53 @@ class SettingsFrame(wx.Frame):
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "X (px):"), pos = (0, 2), flag = wx.ALIGN_CENTER_VERTICAL)
-         projectX = int(math.floor(float(self._get_setting("project_x", 1920))))
--        self.X = wx.SpinCtrl(self.panel, -1, str(projectX), max = 999999, size = (80, -1))
-+        self.X = wx.SpinCtrl(self.panel, -1, str(projectX), max = 999999, size = (125, -1))
-         self.X.Bind(wx.EVT_SPINCTRL, self.update_resolution)
-         self.X.SetHelpText("The projector resolution in the X axis.")
-         fieldsizer.Add(self.X, pos = (0, 3))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "Y (px):"), pos = (1, 2), flag = wx.ALIGN_CENTER_VERTICAL)
-         projectY = int(math.floor(float(self._get_setting("project_y", 1200))))
--        self.Y = wx.SpinCtrl(self.panel, -1, str(projectY), max = 999999, size = (80, -1))
-+        self.Y = wx.SpinCtrl(self.panel, -1, str(projectY), max = 999999, size = (125, -1))
-         self.Y.Bind(wx.EVT_SPINCTRL, self.update_resolution)
-         self.Y.SetHelpText("The projector resolution in the Y axis.")
-         fieldsizer.Add(self.Y, pos = (1, 3))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "OffsetX (mm):"), pos = (2, 2), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.offset_X = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_offset_x", 0.0), increment = 1, digits = 1, size = (80, -1))
--        self.offset_X.Bind(floatspin.EVT_FLOATSPIN, self.update_offset)
-+        if wx.VERSION < (3, 0):
-+            self.offset_X = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_offset_x", 0.0), increment = 1, digits = 1, size = (80, -1))
-+            self.offset_X.Bind(floatspin.EVT_FLOATSPIN, self.update_offset)
-+        else:
-+            self.offset_X = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting("project_offset_x", 0.0), inc = 1, size = (125, -1))
-+            self.offset_X.SetDigits(1)
-+            self.offset_X.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_offset)
-         self.offset_X.SetHelpText("How far the slice should be offset from the edge in the X axis.")
-         fieldsizer.Add(self.offset_X, pos = (2, 3))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "OffsetY (mm):"), pos = (3, 2), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.offset_Y = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_offset_y", 0.0), increment = 1, digits = 1, size = (80, -1))
--        self.offset_Y.Bind(floatspin.EVT_FLOATSPIN, self.update_offset)
-+        if wx.VERSION < (3, 0):
-+            self.offset_Y = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_offset_y", 0.0), increment = 1, digits = 1, size = (80, -1))
-+            self.offset_Y.Bind(floatspin.EVT_FLOATSPIN, self.update_offset)
-+        else:
-+            self.offset_Y = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting("project_offset_y", 0.0), inc = 1, size = (125, -1))
-+            self.offset_Y.SetDigits(1)
-+            self.offset_Y.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_offset)
-         self.offset_Y.SetHelpText("How far the slice should be offset from the edge in the Y axis.")
-         fieldsizer.Add(self.offset_Y, pos = (3, 3))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "ProjectedX (mm):"), pos = (4, 2), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.projected_X_mm = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_projected_x", 505.0), increment = 1, digits = 1, size = (80, -1))
--        self.projected_X_mm.Bind(floatspin.EVT_FLOATSPIN, self.update_projected_Xmm)
-+        if wx.VERSION < (3, 0):
-+            self.projected_X_mm = floatspin.FloatSpin(self.panel, -1, value = self._get_setting("project_projected_x", 505.0), increment = 1, digits = 1, size = (80, -1))
-+            self.projected_X_mm.Bind(floatspin.EVT_FLOATSPIN, self.update_projected_Xmm)
-+        else:
-+            self.projected_X_mm = wx.SpinCtrlDouble(self.panel, -1, initial = self._get_setting("project_projected_x", 505.0), inc = 1, size = (125, -1))
-+            self.projected_X_mm.SetDigits(1)
-+            self.projected_X_mm.Bind(wx.EVT_SPINCTRLDOUBLE, self.update_projected_Xmm)
-         self.projected_X_mm.SetHelpText("The actual width of the entire projected image. Use the Calibrate grid to show the full size of the projected image, and measure the width at the same level where the slice will be projected onto the resin.")
-         fieldsizer.Add(self.projected_X_mm, pos = (4, 3))
- 
-         fieldsizer.Add(wx.StaticText(self.panel, -1, "Z Axis Speed (mm/min):"), pos = (5, 2), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.z_axis_rate = wx.SpinCtrl(self.panel, -1, str(self._get_setting("project_z_axis_rate", 200)), max = 9999, size = (80, -1))
-+        self.z_axis_rate = wx.SpinCtrl(self.panel, -1, str(self._get_setting("project_z_axis_rate", 200)), max = 9999, size = (125, -1))
-         self.z_axis_rate.Bind(wx.EVT_SPINCTRL, self.update_z_axis_rate)
-         self.z_axis_rate.SetHelpText("Speed of the Z axis in mm/minute. Take into account that slower rates may require a longer pause value.")
-         fieldsizer.Add(self.z_axis_rate, pos = (5, 3))
-@@ -394,7 +419,11 @@ class SettingsFrame(wx.Frame):
-         first_layer_boxer.Add(self.first_layer, flag = wx.ALIGN_CENTER_VERTICAL)
- 
-         first_layer_boxer.Add(wx.StaticText(self.panel, -1, " (s):"), flag = wx.ALIGN_CENTER_VERTICAL)
--        self.show_first_layer_timer = floatspin.FloatSpin(self.panel, -1, value=-1, increment = 1, digits = 1, size = (55, -1))
-+        if wx.VERSION < (3, 0):
-+            self.show_first_layer_timer = floatspin.FloatSpin(self.panel, -1, value=-1, increment = 1, digits = 1, size = (55, -1))
-+        else:
-+            self.show_first_layer_timer = wx.SpinCtrlDouble(self.panel, -1, initial = -1, inc = 1, size = (125, -1))
-+            self.show_first_layer_timer.SetDigits(1)
-         self.show_first_layer_timer.SetHelpText("How long to display the first layer for. -1 = unlimited.")
-         first_layer_boxer.Add(self.show_first_layer_timer, flag = wx.ALIGN_CENTER_VERTICAL)
-         displaysizer.Add(first_layer_boxer, pos = (0, 6), flag = wx.ALIGN_CENTER_VERTICAL)
-diff -up a/printrun/settings.py.gtk3 a/printrun/settings.py
---- a/printrun/settings.py.gtk3	2015-06-19 05:47:24.000000000 -0400
-+++ a/printrun/settings.py	2015-08-11 23:32:05.603437536 -0400
-@@ -145,7 +145,12 @@ class SpinSetting(wxSetting):
- 
-     def get_specific_widget(self, parent):
-         from wx.lib.agw.floatspin import FloatSpin
--        self.widget = FloatSpin(parent, -1, min_val = self.min, max_val = self.max, digits = 0)
-+        import wx
-+        if wx.VERSION < (3, 0):
-+            self.widget = FloatSpin(parent, -1, min_val = self.min, max_val = self.max, digits = 0)
-+        else:
-+            self.widget = wx.SpinCtrlDouble(parent, -1, min = self.min, max = self.max)
-+            self.widget.SetDigits(0)
-         self.widget.SetValue(self.value)
-         orig = self.widget.GetValue
-         self.widget.GetValue = lambda: int(orig())
-@@ -155,7 +160,12 @@ class FloatSpinSetting(SpinSetting):
- 
-     def get_specific_widget(self, parent):
-         from wx.lib.agw.floatspin import FloatSpin
--        self.widget = FloatSpin(parent, -1, value = self.value, min_val = self.min, max_val = self.max, increment = self.increment, digits = 2)
-+        import wx
-+        if wx.VERSION < (3, 0):
-+            self.widget = FloatSpin(parent, -1, value = self.value, min_val = self.min, max_val = self.max, increment = self.increment, digits = 2)
-+        else:
-+            self.widget = wx.SpinCtrlDouble(parent, -1, initial = self.value, min = self.min, max = self.max, inc = self.increment)
-+            self.widget.SetDigits(2)
-         return self.widget
- 
- class BooleanSetting(wxSetting):
-@@ -216,7 +226,12 @@ class BuildDimensionsSetting(wxSetting):
-         import wx
-         build_dimensions = parse_build_dimensions(self.value)
-         self.widgets = []
--        w = lambda val, m, M: self.widgets.append(FloatSpin(parent, -1, value = val, min_val = m, max_val = M, digits = 2))
-+        def w(val, m, M):
-+            if wx.VERSION < (3, 0):
-+                self.widgets.append(FloatSpin(parent, -1, value = val, min_val = m, max_val = M, digits = 2))
-+            else:
-+                self.widgets.append(wx.SpinCtrlDouble(parent, -1, initial = val, min = m, max = M))
-+                self.widgets[-1].SetDigits(2)
-         addlabel = lambda name, pos: self.widget.Add(wx.StaticText(parent, -1, name), pos = pos, flag = wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, border = 5)
-         addwidget = lambda *pos: self.widget.Add(self.widgets[-1], pos = pos, flag = wx.RIGHT, border = 5)
-         self.widget = wx.GridBagSizer()

diff --git a/media-gfx/printrun/printrun-20150310-r1.ebuild b/media-gfx/printrun/printrun-20150310-r1.ebuild
deleted file mode 100644
index 3185dcf2a6d..00000000000
--- a/media-gfx/printrun/printrun-20150310-r1.ebuild
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1
-
-DESCRIPTION="GUI interface for 3D printing on RepRap and other printers"
-HOMEPAGE="https://github.com/kliment/Printrun"
-SRC_URI="https://github.com/kliment/Printrun/archive/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-python/pyserial
-	dev-python/wxpython:*
-	dev-python/pyglet
-	dev-python/dbus-python
-	media-gfx/cairosvg"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/Printrun-${P}"
-
-PATCHES=(
-	# https://bugzilla.redhat.com/show_bug.cgi?id=1231518
-	"${FILESDIR}"/${PN}-gtk3.patch
-
-	# https://github.com/kliment/Printrun/pull/790
-	"${FILESDIR}"/${PN}-x11.patch
-)

diff --git a/media-gfx/printrun/printrun-20150310-r2.ebuild b/media-gfx/printrun/printrun-20150310-r3.ebuild
similarity index 87%
rename from media-gfx/printrun/printrun-20150310-r2.ebuild
rename to media-gfx/printrun/printrun-20150310-r3.ebuild
index 72839c7ab4e..9159486852d 100644
--- a/media-gfx/printrun/printrun-20150310-r2.ebuild
+++ b/media-gfx/printrun/printrun-20150310-r3.ebuild
@@ -9,7 +9,8 @@ inherit distutils-r1
 
 DESCRIPTION="GUI interface for 3D printing on RepRap and other printers"
 HOMEPAGE="https://github.com/kliment/Printrun"
-SRC_URI="https://github.com/kliment/Printrun/archive/${P}.tar.gz"
+SRC_URI="https://github.com/kliment/Printrun/archive/${P}.tar.gz
+	 https://dev.gentoo.org/~amynka/snap/${PN}-gtk3.tar.xz"
 
 LICENSE="GPL-3"
 SLOT="0"
@@ -32,8 +33,8 @@ S="${WORKDIR}/Printrun-${P}"
 
 PATCHES=(
 	# https://bugzilla.redhat.com/show_bug.cgi?id=1231518
-	"${FILESDIR}"/${PN}-gtk3.patch
+	"${WORKDIR}/${PN}-gtk3.patch"
 
 	# https://github.com/kliment/Printrun/pull/790
-	"${FILESDIR}"/${PN}-x11.patch
+	"${FILESDIR}/${PN}-x11.patch"
 )

diff --git a/media-gfx/printrun/printrun-99999999.ebuild b/media-gfx/printrun/printrun-99999999.ebuild
index d12fe530c37..6143c13b917 100644
--- a/media-gfx/printrun/printrun-99999999.ebuild
+++ b/media-gfx/printrun/printrun-99999999.ebuild
@@ -9,6 +9,7 @@ inherit distutils-r1 git-r3
 
 DESCRIPTION="GUI interface for 3D printing on RepRap and other printers"
 HOMEPAGE="https://github.com/kliment/Printrun"
+SRC_URI="https://dev.gentoo.org/~amynka/snap/${PN}-gtk3.tar.xz"
 EGIT_REPO_URI="https://github.com/kliment/Printrun.git"
 
 LICENSE="GPL-3"
@@ -30,5 +31,10 @@ RDEPEND="${DEPEND}"
 
 PATCHES=(
 	# https://bugzilla.redhat.com/show_bug.cgi?id=1231518
-	"${FILESDIR}"/${PN}-gtk3.patch
+	"${WORKDIR}/${PN}-gtk3.patch"
 )
+
+src_unpack(){
+	default_src_unpack
+	git-r3_src_unpack
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-18 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-15 10:18 [gentoo-commits] repo/gentoo:master commit in: media-gfx/printrun/files/, media-gfx/printrun/ Pacho Ramos
  -- strict thread matches above, loose matches on Subject: below --
2017-07-21 18:52 Amy Liffey
2017-12-18 18:47 Amy Liffey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox