RPM Packaging: update python stuff

pull/3/head
François Andriot 11 years ago
parent 43ed3b6077
commit f2b702ffeb

@ -0,0 +1,925 @@
--- tde-guidance/userconfig/userconfig.py.ori 2013-07-16 10:37:48.029925866 +0200
+++ tde-guidance/userconfig/userconfig.py 2013-12-28 13:52:09.120636576 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#! /usr/bin/python
# -*- coding: UTF-8 -*-
###########################################################################
# userconfig.py - description #
@@ -37,15 +37,15 @@
###########################################################################
def SptimeToQDate(sptime):
- t = QDateTime()
+ t = TQDateTime()
t.setTime_t(0)
return t.addDays(sptime).date()
###########################################################################
-def QDateToSptime(qdate):
- x = QDateTime()
+def TQDateToSptime(tqdate):
+ x = TQDateTime()
x.setTime_t(0)
- return x.daysTo(QDateTime(qdate))
+ return x.daysTo(TQDateTime(tqdate))
###########################################################################
# Try translating this code to C++. I dare ya!
@@ -68,8 +68,8 @@
self.setButtons(0)
self.aboutdata = MakeAboutData()
- toplayout = QVBoxLayout( self, 0, KDialog.spacingHint() )
- tabcontrol = QTabWidget(self)
+ toplayout = TQVBoxLayout( self, 0, KDialog.spacingHint() )
+ tabcontrol = TQTabWidget(self)
toplayout.addWidget(tabcontrol)
toplayout.setStretchFactor(tabcontrol,1)
@@ -92,22 +92,22 @@
# --- User Tab ---
if standalone:
usershbox = self.addHBoxPage("Users")
- vbox = QVBox(usershbox)
+ vbox = TQVBox(usershbox)
else:
- vbox = QVBox(tabcontrol)
+ vbox = TQVBox(tabcontrol)
vbox.setMargin(KDialog.marginHint())
vbox.setSpacing(KDialog.spacingHint())
- hb = QHBox(vbox)
+ hb = TQHBox(vbox)
hb.setSpacing(KDialog.spacingHint())
vbox.setStretchFactor(hb,0)
- label = QLabel(hb)
+ label = TQLabel(hb)
label.setPixmap(UserIcon("hi32-user"))
hb.setStretchFactor(label,0)
- label = QLabel(i18n("User Accounts:"),hb)
+ label = TQLabel(i18n("User Accounts:"),hb)
hb.setStretchFactor(label,1)
self.userlist = TDEListView(vbox)
@@ -115,18 +115,18 @@
self.userlist.addColumn(i18n("Real Name"))
self.userlist.addColumn(i18n("UID"))
self.userlist.setAllColumnsShowFocus(True)
- self.userlist.setSelectionMode(QListView.Single)
+ self.userlist.setSelectionMode(TQListView.Single)
- self.connect(self.userlist, SIGNAL("selectionChanged(QListViewItem *)"), self.slotListClicked)
+ self.connect(self.userlist, SIGNAL("selectionChanged(TQListViewItem *)"), self.slotListClicked)
if isroot:
- self.connect(self.userlist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyClicked)
- self.connect(self.userlist, SIGNAL("contextMenu(TDEListView*,QListViewItem*,const QPoint&)"), self.slotUserContext)
+ self.connect(self.userlist, SIGNAL("doubleClicked(TQListViewItem *)"), self.slotModifyClicked)
+ self.connect(self.userlist, SIGNAL("contextMenu(TDEListView*,TQListViewItem*,const TQPoint&)"), self.slotUserContext)
- self.showspecialcheckbox = QCheckBox(i18n("Show system accounts"),vbox)
+ self.showspecialcheckbox = TQCheckBox(i18n("Show system accounts"),vbox)
vbox.setStretchFactor(self.showspecialcheckbox,0)
self.connect(self.showspecialcheckbox,SIGNAL("toggled(bool)"), self.slotShowSystemToggled)
- hbox = QHBox(vbox)
+ hbox = TQHBox(vbox)
hbox.setSpacing(KDialog.spacingHint())
vbox.setStretchFactor(hbox,0)
@@ -143,43 +143,43 @@
hbox.setStretchFactor(self.deletebutton,1)
self.connect(self.deletebutton,SIGNAL("clicked()"),self.slotDeleteClicked)
- detailsbox = QVGroupBox(i18n("Details"),vbox)
- userinfovbox = QWidget(detailsbox)
+ detailsbox = TQVGroupBox(i18n("Details"),vbox)
+ userinfovbox = TQWidget(detailsbox)
- infogrid = QGridLayout(userinfovbox,3,4)
+ infogrid = TQGridLayout(userinfovbox,3,4)
infogrid.setSpacing(KDialog.spacingHint())
- label = QLabel(i18n("Login Name:"),userinfovbox)
+ label = TQLabel(i18n("Login Name:"),userinfovbox)
infogrid.addWidget(label,0,0)
self.loginnamelabel = KLineEdit("",userinfovbox)
self.loginnamelabel.setReadOnly(True)
infogrid.addWidget(self.loginnamelabel,0,1)
- label = QLabel(i18n("Real Name:"),userinfovbox)
+ label = TQLabel(i18n("Real Name:"),userinfovbox)
infogrid.addWidget(label,0,2)
self.realnamelabel = KLineEdit("",userinfovbox)
self.realnamelabel.setReadOnly(True)
infogrid.addWidget(self.realnamelabel,0,3)
- label = QLabel(i18n("UID:"),userinfovbox)
+ label = TQLabel(i18n("UID:"),userinfovbox)
infogrid.addWidget(label,1,0)
self.uidlabel = KLineEdit("",userinfovbox)
self.uidlabel.setReadOnly(True)
infogrid.addWidget(self.uidlabel,1,1)
- label = QLabel(i18n("Status:"),userinfovbox)
+ label = TQLabel(i18n("Status:"),userinfovbox)
infogrid.addWidget(label,1,2)
self.statuslabel = KLineEdit("",userinfovbox)
self.statuslabel.setReadOnly(True)
infogrid.addWidget(self.statuslabel,1,3)
- label = QLabel(i18n("Primary Group:"),userinfovbox)
+ label = TQLabel(i18n("Primary Group:"),userinfovbox)
infogrid.addWidget(label,2,0)
self.primarygrouplabel = KLineEdit("",userinfovbox)
self.primarygrouplabel.setReadOnly(True)
infogrid.addWidget(self.primarygrouplabel,2,1)
- label = QLabel(i18n("Secondary Groups:"),userinfovbox)
+ label = TQLabel(i18n("Secondary Groups:"),userinfovbox)
infogrid.addWidget(label,2,2)
self.secondarygrouplabel = KLineEdit("",userinfovbox)
self.secondarygrouplabel.setReadOnly(True)
@@ -191,45 +191,45 @@
#--- Groups Tab ---
if standalone:
groupsvbox = self.addVBoxPage(i18n("Groups"))
- hb = QHBox(groupsvbox)
+ hb = TQHBox(groupsvbox)
else:
- groupsvbox = QVBox(tabcontrol)
+ groupsvbox = TQVBox(tabcontrol)
groupsvbox.setMargin(KDialog.marginHint())
- hb = QHBox(groupsvbox)
+ hb = TQHBox(groupsvbox)
- topframe = QFrame(groupsvbox)
+ topframe = TQFrame(groupsvbox)
groupsvbox.setSpacing(KDialog.spacingHint())
hb.setSpacing(KDialog.spacingHint())
groupsvbox.setStretchFactor(hb,0)
- label = QLabel(hb)
+ label = TQLabel(hb)
label.setPixmap(UserIcon("hi32-group"))
hb.setStretchFactor(label,0)
- label = QLabel(i18n("Groups:"),hb)
+ label = TQLabel(i18n("Groups:"),hb)
hb.setStretchFactor(label,1)
- groupsplitter = QSplitter(Qt.Vertical,groupsvbox)
+ groupsplitter = TQSplitter(TQt.Vertical,groupsvbox)
self.grouplist = TDEListView(groupsplitter)
self.grouplist.addColumn(i18n("Group Name"))
self.grouplist.addColumn(i18n("GID"))
self.grouplist.setAllColumnsShowFocus(True)
- self.connect(self.grouplist, SIGNAL("selectionChanged(QListViewItem *)"), self.slotGroupListClicked)
+ self.connect(self.grouplist, SIGNAL("selectionChanged(TQListViewItem *)"), self.slotGroupListClicked)
if isroot:
- self.connect(self.grouplist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyGroupClicked)
- self.connect(self.grouplist, SIGNAL("contextMenu(TDEListView*,QListViewItem*,const QPoint&)"),
+ self.connect(self.grouplist, SIGNAL("doubleClicked(TQListViewItem *)"), self.slotModifyGroupClicked)
+ self.connect(self.grouplist, SIGNAL("contextMenu(TDEListView*,TQListViewItem*,const TQPoint&)"),
self.slotGroupContext)
- groupbottomvbox = QVBox(groupsplitter)
- groupbottomvbox.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.Expanding)
+ groupbottomvbox = TQVBox(groupsplitter)
+ groupbottomvbox.setSizePolicy(TQSizePolicy.Expanding,TQSizePolicy.Expanding)
- self.showspecialgroupscheckbox = QCheckBox(i18n("Show system groups"),groupbottomvbox)
+ self.showspecialgroupscheckbox = TQCheckBox(i18n("Show system groups"),groupbottomvbox)
vbox.setStretchFactor(self.showspecialgroupscheckbox,0)
self.connect(self.showspecialgroupscheckbox,SIGNAL("toggled(bool)"), self.slotShowSystemGroupsToggled)
- hbox = QHBox(groupbottomvbox)
+ hbox = TQHBox(groupbottomvbox)
hbox.setSpacing(KDialog.spacingHint())
groupsvbox.setStretchFactor(hbox,0)
@@ -252,7 +252,7 @@
for widget in disablebuttons:
widget.setDisabled(True)
- label = QLabel(i18n("Group Members:"),groupbottomvbox)
+ label = TQLabel(i18n("Group Members:"),groupbottomvbox)
groupsvbox.setStretchFactor(label,0)
self.groupmemberlist = TDEListView(groupbottomvbox)
@@ -461,7 +461,7 @@
if userobj.isLocked():
lvi.setPixmap(0,UserIcon("hi16-encrypted"))
else:
- lvi.setPixmap(0,QPixmap())
+ lvi.setPixmap(0,TQPixmap())
#######################################################################
def __selectUser(self,userid):
@@ -505,7 +505,7 @@
for groupobj in groups:
gid = groupobj.getGID()
if self.showsystemgroups or not groupobj.isSystemGroup():
- lvi = QListViewItem(self.grouplist,groupobj.getGroupname(),unicode(gid))
+ lvi = TQListViewItem(self.grouplist,groupobj.getGroupname(),unicode(gid))
self.groupidsToListItems[gid] = lvi
if self.selectedgroupid==gid:
firstselectedgroupid = gid
@@ -528,7 +528,7 @@
self.groupmemberlist.clear()
for userobj in members:
if userobj!=None:
- lvi = QListViewItem(self.groupmemberlist,userobj.getUsername(),userobj.getRealName(),unicode(userobj.getUID()))
+ lvi = TQListViewItem(self.groupmemberlist,userobj.getUsername(),userobj.getRealName(),unicode(userobj.getUID()))
if isroot:
self.deletegroupbutton.setDisabled(groupobj.getGID()==0)
@@ -610,32 +610,32 @@
self.updatingGUI = True
detailsvbox = self.addHBoxPage(i18n("Details"))
- detailspace = QWidget(detailsvbox)
+ detailspace = TQWidget(detailsvbox)
- infogrid = QGridLayout(detailspace,9,2)
+ infogrid = TQGridLayout(detailspace,9,2)
infogrid.setSpacing(self.spacingHint())
infogrid.setColStretch(0,0)
infogrid.setColStretch(1,1)
- self.enabledradiogroup = QButtonGroup()
+ self.enabledradiogroup = TQButtonGroup()
self.enabledradiogroup.setRadioButtonExclusive(True)
- hb = QHBox(detailspace)
+ hb = TQHBox(detailspace)
hb.setSpacing(self.spacingHint())
- label = QLabel(hb)
+ label = TQLabel(hb)
label.setPixmap(UserIcon("hi32-identity"))
hb.setStretchFactor(label,0)
- label = QLabel(i18n("Status:"),hb)
+ label = TQLabel(i18n("Status:"),hb)
hb.setStretchFactor(label,1)
infogrid.addMultiCellWidget(hb,0,1,0,0)
- self.enabledradio = QRadioButton(i18n("Enabled"),detailspace)
+ self.enabledradio = TQRadioButton(i18n("Enabled"),detailspace)
infogrid.addWidget(self.enabledradio,0,1)
- hbox = QHBox(detailspace)
+ hbox = TQHBox(detailspace)
hbox.setSpacing(self.spacingHint())
- self.disabledradio = QRadioButton(i18n("Disabled"),hbox)
+ self.disabledradio = TQRadioButton(i18n("Disabled"),hbox)
hbox.setStretchFactor(self.disabledradio,0)
- label = QLabel(hbox)
+ label = TQLabel(hbox)
label.setPixmap(UserIcon("hi16-encrypted"))
hbox.setStretchFactor(label,1)
infogrid.addWidget(hbox,1,1)
@@ -643,46 +643,46 @@
self.enabledradiogroup.insert(self.enabledradio,0)
self.enabledradiogroup.insert(self.disabledradio,1)
- label = QLabel(i18n("Login Name:"),detailspace)
+ label = TQLabel(i18n("Login Name:"),detailspace)
infogrid.addWidget(label,2,0)
self.loginnameedit = KLineEdit("",detailspace)
self.loginnameedit.setValidator(LoginNameValidator(self.loginnameedit))
infogrid.addWidget(self.loginnameedit,2,1)
- self.connect(self.loginnameedit, SIGNAL("textChanged(const QString &)"), self.slotLoginChanged)
+ self.connect(self.loginnameedit, SIGNAL("textChanged(const TQString &)"), self.slotLoginChanged)
- label = QLabel(i18n("Real Name:"),detailspace)
+ label = TQLabel(i18n("Real Name:"),detailspace)
infogrid.addWidget(label,3,0)
self.realnameedit = KLineEdit("",detailspace)
self.realnameedit.setValidator(RealUserNameValidator(self.realnameedit))
infogrid.addWidget(self.realnameedit,3,1)
- label = QLabel(i18n("User ID:"),detailspace)
+ label = TQLabel(i18n("User ID:"),detailspace)
infogrid.addWidget(label,4,0)
self.uidedit = KLineEdit("",detailspace)
- self.uidedit.setValidator(QIntValidator(0,65535,detailspace))
+ self.uidedit.setValidator(TQIntValidator(0,65535,detailspace))
infogrid.addWidget(self.uidedit,4,1)
- label = QLabel(i18n("Primary Group:"),detailspace)
+ label = TQLabel(i18n("Primary Group:"),detailspace)
infogrid.addWidget(label,5,0)
self.primarygroupedit = KComboBox(False,detailspace)
infogrid.addWidget(self.primarygroupedit,5,1)
- label = QLabel(i18n("Home Directory:"),detailspace)
+ label = TQLabel(i18n("Home Directory:"),detailspace)
infogrid.addWidget(label,7,0)
- hbox = QHBox(detailspace)
+ hbox = TQHBox(detailspace)
hbox.setSpacing(self.spacingHint())
self.homediredit = KLineEdit("",hbox)
hbox.setStretchFactor(self.homediredit,1)
- self.connect(self.homediredit, SIGNAL("textChanged(const QString &)"), self.slotHomeDirChanged)
+ self.connect(self.homediredit, SIGNAL("textChanged(const TQString &)"), self.slotHomeDirChanged)
self.homedirbutton = KPushButton(i18n("Browse..."),hbox)
hbox.setStretchFactor(self.homedirbutton,0)
self.connect(self.homedirbutton,SIGNAL("clicked()"),self.slotBrowseHomeDirClicked)
infogrid.addWidget(hbox,7,1)
- label = QLabel(i18n("Shell:"),detailspace)
+ label = TQLabel(i18n("Shell:"),detailspace)
infogrid.addWidget(label,8,0)
self.shelledit = KComboBox(True,detailspace)
@@ -697,9 +697,9 @@
groupsvbox = self.addHBoxPage(i18n("Privileges and groups"))
# Rudd-O now here we create the widget that will hold the group listing, and fill it with the groups.
- self.privilegeslistview = QListView(groupsvbox)
+ self.privilegeslistview = TQListView(groupsvbox)
self.privilegeslistview.addColumn(i18n("Privilege"),-1)
- self.groupslistview = QListView(groupsvbox)
+ self.groupslistview = TQListView(groupsvbox)
self.groupslistview.addColumn(i18n("Secondary group"),-1)
groupsvbox.setStretchFactor(self.privilegeslistview,3)
groupsvbox.setStretchFactor(self.groupslistview,2)
@@ -707,20 +707,20 @@
# Password and Security Tab.
passwordvbox = self.addVBoxPage(i18n("Password && Security"))
- passwordspace = QWidget(passwordvbox)
- passwordgrid = QGridLayout(passwordspace,8,3)
+ passwordspace = TQWidget(passwordvbox)
+ passwordgrid = TQGridLayout(passwordspace,8,3)
passwordgrid.setSpacing(self.spacingHint())
passwordgrid.setColStretch(0,0)
passwordgrid.setColStretch(1,0)
passwordgrid.setColStretch(2,1)
passwordvbox.setStretchFactor(passwordspace,0)
- hb = QHBox(passwordspace)
+ hb = TQHBox(passwordspace)
hb.setSpacing(self.spacingHint())
- label = QLabel(hb)
+ label = TQLabel(hb)
label.setPixmap(UserIcon("hi32-password"))
hb.setStretchFactor(label,0)
- label = QLabel(i18n("Password:"),hb)
+ label = TQLabel(i18n("Password:"),hb)
hb.setStretchFactor(label,1)
passwordgrid.addWidget(hb,0,0)
@@ -728,24 +728,24 @@
passwordgrid.addWidget(self.passwordedit,0,1)
# Last Change
- label = QLabel(i18n("Last changed:"),passwordspace)
+ label = TQLabel(i18n("Last changed:"),passwordspace)
passwordgrid.addWidget(label,1,0)
self.lastchangelabel = KLineEdit("",passwordspace)
self.lastchangelabel.setReadOnly(True)
passwordgrid.addWidget(self.lastchangelabel,1,1)
- self.validradiogroup = QButtonGroup()
+ self.validradiogroup = TQButtonGroup()
self.validradiogroup.setRadioButtonExclusive(True)
# Valid until.
- label = QLabel(i18n("Valid until:"),passwordspace)
+ label = TQLabel(i18n("Valid until:"),passwordspace)
passwordgrid.addWidget(label,2,0)
- self.validalwaysradio = QRadioButton(i18n("Always"),passwordspace)
+ self.validalwaysradio = TQRadioButton(i18n("Always"),passwordspace)
passwordgrid.addWidget(self.validalwaysradio,2,1)
- hbox = QHBox(passwordspace)
+ hbox = TQHBox(passwordspace)
hbox.setSpacing(self.spacingHint())
- self.expireradio = QRadioButton(hbox)
+ self.expireradio = TQRadioButton(hbox)
hbox.setStretchFactor(self.expireradio,0)
self.expiredate = KDateWidget(hbox)
@@ -757,30 +757,30 @@
self.connect(self.validradiogroup,SIGNAL("clicked(int)"),self.slotValidUntilClicked)
# Password Aging & Expiration.
- passwordaginggroup = QVGroupBox(i18n("Password Aging"),passwordvbox)
+ passwordaginggroup = TQVGroupBox(i18n("Password Aging"),passwordvbox)
passwordaginggroup.setInsideSpacing(self.spacingHint())
passwordvbox.setStretchFactor(passwordaginggroup,0)
- passwordagingwidget = QWidget(passwordaginggroup)
+ passwordagingwidget = TQWidget(passwordaginggroup)
- passwordaginggrid = QGridLayout(passwordagingwidget,4,3)
+ passwordaginggrid = TQGridLayout(passwordagingwidget,4,3)
passwordaginggrid.setSpacing(self.spacingHint())
# [*] Require new password after: [_____5 days]
- self.forcepasswordchangecheckbox = QCheckBox(passwordagingwidget)
+ self.forcepasswordchangecheckbox = TQCheckBox(passwordagingwidget)
self.connect(self.forcepasswordchangecheckbox,SIGNAL("toggled(bool)"),self.slotForcePasswordChangeToggled)
passwordaginggrid.addWidget(self.forcepasswordchangecheckbox,0,0)
- label = QLabel(i18n("Require new password after:"),passwordagingwidget)
+ label = TQLabel(i18n("Require new password after:"),passwordagingwidget)
passwordaginggrid.addWidget(label,0,1)
- self.maximumpasswordedit = QSpinBox(passwordagingwidget)
+ self.maximumpasswordedit = TQSpinBox(passwordagingwidget)
self.maximumpasswordedit.setSuffix(i18n(" days"))
self.maximumpasswordedit.setMinValue(1)
self.maximumpasswordedit.setMaxValue(365*5)
passwordaginggrid.addWidget(self.maximumpasswordedit,0,2)
- label = QLabel(i18n("Warn before password expires:"),passwordagingwidget)
+ label = TQLabel(i18n("Warn before password expires:"),passwordagingwidget)
passwordaginggrid.addWidget(label,1,1)
- self.warningedit = QSpinBox(passwordagingwidget)
+ self.warningedit = TQSpinBox(passwordagingwidget)
self.warningedit.setPrefix(i18n("After "))
self.warningedit.setSuffix(i18n(" days"))
self.warningedit.setMinValue(0)
@@ -788,9 +788,9 @@
self.warningedit.setSpecialValueText(i18n("Never"))
passwordaginggrid.addWidget(self.warningedit,1,2)
- label = QLabel(i18n("Disable account after password expires:"),passwordagingwidget)
+ label = TQLabel(i18n("Disable account after password expires:"),passwordagingwidget)
passwordaginggrid.addWidget(label,2,1)
- self.disableexpireedit = QSpinBox(passwordagingwidget)
+ self.disableexpireedit = TQSpinBox(passwordagingwidget)
self.disableexpireedit.setPrefix(i18n("After "))
self.disableexpireedit.setSuffix(i18n(" days"))
self.disableexpireedit.setMinValue(0)
@@ -798,17 +798,17 @@
self.disableexpireedit.setSpecialValueText(i18n("Never"))
passwordaginggrid.addWidget(self.disableexpireedit,2,2)
- self.enforcepasswordminagecheckbox = QCheckBox(passwordagingwidget)
+ self.enforcepasswordminagecheckbox = TQCheckBox(passwordagingwidget)
self.connect(self.enforcepasswordminagecheckbox,SIGNAL("toggled(bool)"),self.slotEnforePasswordAgeToggled)
passwordaginggrid.addWidget(self.enforcepasswordminagecheckbox,3,0)
- label = QLabel(i18n("Enforce minimum password age:"),passwordagingwidget)
+ label = TQLabel(i18n("Enforce minimum password age:"),passwordagingwidget)
passwordaginggrid.addWidget(label,3,1)
- self.minimumpasswordedit = QSpinBox(passwordagingwidget)
+ self.minimumpasswordedit = TQSpinBox(passwordagingwidget)
self.minimumpasswordedit.setSuffix(i18n(" days"))
passwordaginggrid.addWidget(self.minimumpasswordedit,3,2)
- spacer = QWidget(passwordvbox)
+ spacer = TQWidget(passwordvbox)
passwordvbox.setStretchFactor(spacer,1)
self.homedirdialog = KDirSelectDialog("/",True,self,"Select Home Directory",True)
@@ -834,7 +834,7 @@
else:
name = unicode(group).encode(locale.getpreferredencoding())
wid = self.groupslistview
- self.secondarygroupcheckboxes[group] = QCheckListItem(wid,name,QCheckListItem.CheckBox)
+ self.secondarygroupcheckboxes[group] = TQCheckListItem(wid,name,TQCheckListItem.CheckBox)
########################################################################
def showEditUser(self,userid):
@@ -849,8 +849,8 @@
# Rudd-O: now here we tick the appropriate group listing checkbox, and hide the currently active primary group of the user. We are repopulating because if the user to edit changes, we need to hide the user's secondary group. FIXME we should repopulate the groups privileges list when the primary group is changed in the other tab -- that is, on the change slot of the primary group drop down.
self._repopulateGroupsPrivileges(excludegroups=[self.userobj.getPrimaryGroup()])
for group,checkbox in self.secondarygroupcheckboxes.items():
- if group in self.selectedgroups: checkbox.setState(QCheckListItem.On)
- else: checkbox.setState(QCheckListItem.Off)
+ if group in self.selectedgroups: checkbox.setState(TQCheckListItem.On)
+ else: checkbox.setState(TQCheckListItem.Off)
self.originalgroups = self.selectedgroups[:]
self.selectedgroups.sort()
@@ -858,7 +858,7 @@
self.uidedit.setReadOnly(True)
self.updatingGUI = False
self.homedirectoryislinked = False
- if self.exec_loop()==QDialog.Accepted:
+ if self.exec_loop()==TQDialog.Accepted:
self.__updateObjectFromGUI(self.userobj)
# Set the password.
if self.passwordedit.password()!="":
@@ -896,8 +896,8 @@
# Rudd-O FIXME: now here we tick the proper groups that should be allowed. Now it selects what userconfig selected before. FIXME consider adding a drop down that will select the appropriate profile Limited User, Advanced User or Administrator (and see if there is a config file where these profiles can be read). We are repopulating because if the user to edit changes, we need to hide the user's secondary group. FIXME we should repopulate the groups privileges list when the primary group is changed in the other tab -- that is, on the change slot of the primary group drop down.
self._repopulateGroupsPrivileges()
for group,checkbox in self.secondarygroupcheckboxes.items():
- if group in self.selectedgroups: checkbox.setState(QCheckListItem.On)
- else: checkbox.setState(QCheckListItem.Off)
+ if group in self.selectedgroups: checkbox.setState(TQCheckListItem.On)
+ else: checkbox.setState(TQCheckListItem.Off)
self.userobj.setHomeDirectory(homedir)
self.homediredit.setText(homedir)
@@ -919,7 +919,7 @@
self.updatingGUI = False
self.homedirectoryislinked = True
self.passwordedit.erase()
- if self.exec_loop()==QDialog.Accepted:
+ if self.exec_loop()==TQDialog.Accepted:
self.__updateObjectFromGUI(self.userobj)
makehomedir = True
@@ -1114,7 +1114,7 @@
userobj.setExpirationDate(None)
else:
# Password will expire at...
- userobj.setExpirationDate(QDateToSptime(self.expiredate.date()))
+ userobj.setExpirationDate(TQDateToSptime(self.expiredate.date()))
if self.forcepasswordchangecheckbox.isChecked():
userobj.setMaximumPasswordAge(self.maximumpasswordedit.value())
@@ -1138,7 +1138,7 @@
fileurl = KURL()
fileurl.setPath(self.homediredit.text())
self.homedirdialog.setCurrentURL(fileurl)
- if self.homedirdialog.exec_loop()==QDialog.Accepted:
+ if self.homedirdialog.exec_loop()==TQDialog.Accepted:
self.homediredit.setText(self.homedirdialog.url().path())
self.homedirectoryislinked = False
@@ -1194,27 +1194,27 @@
###########################################################################
-class LoginNameValidator(QValidator):
+class LoginNameValidator(TQValidator):
def __init__(self,parent):
- QValidator.__init__(self,parent)
+ TQValidator.__init__(self,parent)
#######################################################################
def validate(self,inputstr,pos):
instr = unicode(inputstr)
if len(instr)==0:
- return (QValidator.Intermediate,pos)
+ return (TQValidator.Intermediate,pos)
for c in instr:
if ord(c)<0x20 or ord(c)>0x7f or c.isspace() or c==":" or c=="," or c==".":
- return (QValidator.Invalid,pos)
+ return (TQValidator.Invalid,pos)
# Try to encode this string in the system encoding.
try:
instr.encode(locale.getpreferredencoding())
except UnicodeEncodeError:
# won't encode -> reject it.
- return (QValidator.Invalid,pos)
+ return (TQValidator.Invalid,pos)
- return (QValidator.Acceptable,pos)
+ return (TQValidator.Acceptable,pos)
#######################################################################
def fixup(self,inputstr):
@@ -1230,25 +1230,25 @@
return newstr
###########################################################################
-class RealUserNameValidator(QValidator):
+class RealUserNameValidator(TQValidator):
def __init__(self,parent):
- QValidator.__init__(self,parent)
+ TQValidator.__init__(self,parent)
#######################################################################
def validate(self,inputstr,pos):
instr = unicode(inputstr)
for c in instr:
if c==":":
- return (QValidator.Invalid,pos)
+ return (TQValidator.Invalid,pos)
# Try to encode this string in the system encoding.
try:
instr.encode(locale.getpreferredencoding())
except UnicodeEncodeError:
# won't encode -> reject it.
- return (QValidator.Invalid,pos)
+ return (TQValidator.Invalid,pos)
- return (QValidator.Acceptable,pos)
+ return (TQValidator.Acceptable,pos)
#######################################################################
def fixup(self,inputstr):
@@ -1259,21 +1259,21 @@
def __init__(self,parent,caption,leftlabel,rightlabel):
KDialogBase.__init__(self,parent,None,True,caption,KDialogBase.Ok|KDialogBase.Cancel, KDialogBase.Cancel)
- self.tophbox = QHBox(self)
+ self.tophbox = TQHBox(self)
self.setMainWidget(self.tophbox)
self.tophbox.setSpacing(self.spacingHint())
# Available Groups
- vbox = QVBox(self.tophbox)
+ vbox = TQVBox(self.tophbox)
self.tophbox.setStretchFactor(vbox,1)
- label = QLabel(leftlabel,vbox)
+ label = TQLabel(leftlabel,vbox)
vbox.setStretchFactor(label,0)
self.availablelist = TDEListBox(vbox)
vbox.setStretchFactor(self.availablelist,1)
# ->, <- Buttons
- vbox = QVBox(self.tophbox)
+ vbox = TQVBox(self.tophbox)
self.tophbox.setStretchFactor(vbox,0)
- spacer = QWidget(vbox);
+ spacer = TQWidget(vbox);
vbox.setStretchFactor(spacer,1)
self.addbutton = KPushButton(i18n("Add ->"),vbox)
self.connect(self.addbutton,SIGNAL("clicked()"),self.slotAddClicked)
@@ -1281,13 +1281,13 @@
self.removebutton = KPushButton(i18n("<- Remove"),vbox)
self.connect(self.removebutton,SIGNAL("clicked()"),self.slotRemoveClicked)
vbox.setStretchFactor(self.removebutton,0)
- spacer = QWidget(vbox);
+ spacer = TQWidget(vbox);
vbox.setStretchFactor(spacer,1)
# Selected Groups
- vbox = QVBox(self.tophbox)
+ vbox = TQVBox(self.tophbox)
self.tophbox.setStretchFactor(vbox,1)
- label = QLabel(rightlabel,vbox)
+ label = TQLabel(rightlabel,vbox)
vbox.setStretchFactor(label,0)
self.selectedlist = TDEListBox(vbox)
vbox.setStretchFactor(self.selectedlist,1)
@@ -1311,7 +1311,7 @@
self._selectFirstSelected()
self.removebutton.setDisabled(self.selectedlist.selectedItem()==None)
- if self.exec_loop()==QDialog.Accepted:
+ if self.exec_loop()==TQDialog.Accepted:
newlist = []
for i in range(self.selectedlist.count()):
newlist.append(unicode(self.selectedlist.item(i).text()))
@@ -1356,56 +1356,56 @@
###########################################################################
class UserDeleteDialog(KDialog):
def __init__(self,parent,admincontext):
- KDialog.__init__(self,parent,"Delete user dialog",True,Qt.WType_Dialog)
+ KDialog.__init__(self,parent,"Delete user dialog",True,TQt.WType_Dialog)
self.setCaption(i18n("Delete User Account"))
self.admincontext = admincontext
self.updatingGUI = True
- toplayout = QVBoxLayout(self)
+ toplayout = TQVBoxLayout(self)
toplayout.setSpacing(self.spacingHint())
toplayout.setMargin(self.marginHint())
- contentbox = QHBox(self)
+ contentbox = TQHBox(self)
contentbox.setSpacing(self.spacingHint())
toplayout.addWidget(contentbox)
toplayout.setStretchFactor(contentbox,1)
- label = QLabel(contentbox)
+ label = TQLabel(contentbox)
label.setPixmap(TDEGlobal.iconLoader().loadIcon("messagebox_warning", TDEIcon.NoGroup, TDEIcon.SizeMedium,
TDEIcon.DefaultState, None, True))
contentbox.setStretchFactor(label,0)
- textbox = QVBox(contentbox)
+ textbox = TQVBox(contentbox)
textbox.setSpacing(self.spacingHint())
textbox.setMargin(self.marginHint())
- self.usernamelabel = QLabel("",textbox)
+ self.usernamelabel = TQLabel("",textbox)
textbox.setStretchFactor(self.usernamelabel,0)
# Remove directory checkbox.
- self.deletedirectorycheckbox = QCheckBox(i18n("Delete home directory ()"),textbox)
+ self.deletedirectorycheckbox = TQCheckBox(i18n("Delete home directory ()"),textbox)
textbox.setStretchFactor(self.deletedirectorycheckbox,0)
# Delete the User's private group.
- self.deletegroupcheckbox = QCheckBox(i18n("Delete group ()"),textbox)
+ self.deletegroupcheckbox = TQCheckBox(i18n("Delete group ()"),textbox)
textbox.setStretchFactor(self.deletegroupcheckbox ,0)
# Buttons
- buttonbox = QHBox(self)
+ buttonbox = TQHBox(self)
toplayout.addWidget(buttonbox)
buttonbox.setSpacing(self.spacingHint())
toplayout.setStretchFactor(buttonbox,0)
- spacer = QWidget(buttonbox)
+ spacer = TQWidget(buttonbox)
buttonbox.setStretchFactor(spacer,1)
- okbutton = QPushButton(i18n("OK"),buttonbox)
+ okbutton = TQPushButton(i18n("OK"),buttonbox)
buttonbox.setStretchFactor(okbutton,0)
self.connect(okbutton,SIGNAL("clicked()"),self.slotOkClicked)
- cancelbutton = QPushButton(i18n("Cancel"),buttonbox)
+ cancelbutton = TQPushButton(i18n("Cancel"),buttonbox)
cancelbutton.setDefault(True)
buttonbox.setStretchFactor(cancelbutton,0)
self.connect(cancelbutton,SIGNAL("clicked()"),self.slotCancelClicked)
@@ -1420,7 +1420,7 @@
primarygroupname = primarygroupobj.getGroupname()
self.deletegroupcheckbox.setText(i18n("Delete group '%1' (%2)").arg(primarygroupname).arg(primarygroupobj.getGID()))
self.deletegroupcheckbox.setChecked(len(primarygroupobj.getUsers())==1)
- if self.exec_loop()==QDialog.Accepted:
+ if self.exec_loop()==TQDialog.Accepted:
self.admincontext.removeUser(userobj)
if self.deletedirectorycheckbox.isChecked():
self.admincontext.removeHomeDirectory(userobj)
@@ -1446,62 +1446,62 @@
OK_REPLACE = 2
def __init__(self,parent):
- KDialog.__init__(self,parent,"Create home directory",True,Qt.WType_Dialog)
+ KDialog.__init__(self,parent,"Create home directory",True,TQt.WType_Dialog)
self.setCaption(i18n("Create home directory"))
self.updatingGUI = True
- toplayout = QVBoxLayout(self)
+ toplayout = TQVBoxLayout(self)
toplayout.setSpacing(self.spacingHint())
toplayout.setMargin(self.marginHint())
- contentbox = QHBox(self)
+ contentbox = TQHBox(self)
contentbox.setSpacing(self.spacingHint())
toplayout.addWidget(contentbox)
toplayout.setStretchFactor(contentbox,1)
- label = QLabel(contentbox)
+ label = TQLabel(contentbox)
label.setPixmap(TDEGlobal.iconLoader().loadIcon("messagebox_warning", TDEIcon.NoGroup, TDEIcon.SizeMedium,
TDEIcon.DefaultState, None, True))
contentbox.setStretchFactor(label,0)
- textbox = QVBox(contentbox)
+ textbox = TQVBox(contentbox)
textbox.setSpacing(self.spacingHint())
textbox.setMargin(self.marginHint())
# "%dir was selected as the home directory for %user. This directory already exists. Shall I:."
- self.toplabel = QLabel("",textbox)
+ self.toplabel = TQLabel("",textbox)
textbox.setStretchFactor(self.toplabel,0)
- self.radiogroup = QButtonGroup()
+ self.radiogroup = TQButtonGroup()
self.radiogroup.setRadioButtonExclusive(True)
# Use Existing home directory radio button.
- self.usehomedirectoryradio = QRadioButton(i18n("Use the existing directory without changing it."),textbox)
+ self.usehomedirectoryradio = TQRadioButton(i18n("Use the existing directory without changing it."),textbox)
textbox.setStretchFactor(self.usehomedirectoryradio,0)
# Replace home directory radio button
- self.replacehomedirectoryradio = QRadioButton(i18n("Delete the directory and replace it with a new home directory."),textbox)
+ self.replacehomedirectoryradio = TQRadioButton(i18n("Delete the directory and replace it with a new home directory."),textbox)
textbox.setStretchFactor(self.replacehomedirectoryradio ,0)
self.radiogroup.insert(self.usehomedirectoryradio,0)
self.radiogroup.insert(self.replacehomedirectoryradio,1)
# Buttons
- buttonbox = QHBox(self)
+ buttonbox = TQHBox(self)
toplayout.addWidget(buttonbox)
buttonbox.setSpacing(self.spacingHint())
toplayout.setStretchFactor(buttonbox,0)
- spacer = QWidget(buttonbox)
+ spacer = TQWidget(buttonbox)
buttonbox.setStretchFactor(spacer,1)
- okbutton = QPushButton(i18n("OK"),buttonbox)
+ okbutton = TQPushButton(i18n("OK"),buttonbox)
buttonbox.setStretchFactor(okbutton,0)
self.connect(okbutton,SIGNAL("clicked()"),self.slotOkClicked)
- cancelbutton = QPushButton(i18n("Cancel"),buttonbox)
+ cancelbutton = TQPushButton(i18n("Cancel"),buttonbox)
cancelbutton.setDefault(True)
buttonbox.setStretchFactor(cancelbutton,0)
self.connect(cancelbutton,SIGNAL("clicked()"),self.slotCancelClicked)
@@ -1512,7 +1512,7 @@
.arg(userobj.getHomeDirectory()).arg(userobj.getUsername()) )
self.radiogroup.setButton(0)
- if self.exec_loop()==QDialog.Accepted:
+ if self.exec_loop()==TQDialog.Accepted:
if self.radiogroup.selectedId()==0:
return OverwriteHomeDirectoryDialog.OK_KEEP
else:
@@ -1534,47 +1534,47 @@
self.admincontext = admincontext
- topvbox = QVBox(self)
+ topvbox = TQVBox(self)
topvbox.setSpacing(self.spacingHint())
self.setMainWidget(topvbox)
- detailspace = QWidget(topvbox)
+ detailspace = TQWidget(topvbox)
# Info about the group.
- editgrid = QGridLayout(detailspace,2,2)
+ editgrid = TQGridLayout(detailspace,2,2)
editgrid.setSpacing(self.spacingHint())
- label = QLabel(i18n("Group Name:"),detailspace)
+ label = TQLabel(i18n("Group Name:"),detailspace)
editgrid.addWidget(label,0,0)
self.groupnamelabel = KLineEdit("",detailspace)
self.groupnamelabel.setReadOnly(True)
editgrid.addWidget(self.groupnamelabel,0,1)
- label = QLabel(i18n("Group ID:"),detailspace)
+ label = TQLabel(i18n("Group ID:"),detailspace)
editgrid.addWidget(label,1,0)
self.groupidlabel = KLineEdit("",detailspace)
self.groupidlabel.setReadOnly(True)
editgrid.addWidget(self.groupidlabel,1,1)
# Available Groups
- tophbox = QHBox(topvbox)
+ tophbox = TQHBox(topvbox)
tophbox.setSpacing(self.spacingHint())
hbox = tophbox
- vbox = QVBox(hbox)
+ vbox = TQVBox(hbox)
vbox.setSpacing(self.spacingHint())
hbox.setStretchFactor(vbox,1)
- label = QLabel(i18n("Available Accounts"),vbox)
+ label = TQLabel(i18n("Available Accounts"),vbox)
vbox.setStretchFactor(label,0)
self.availablelist = TDEListBox(vbox)
vbox.setStretchFactor(self.availablelist,1)
# ->, <- Buttons
- vbox = QVBox(hbox)
+ vbox = TQVBox(hbox)
vbox.setSpacing(self.spacingHint())
hbox.setStretchFactor(vbox,0)
- spacer = QWidget(vbox);
+ spacer = TQWidget(vbox);
vbox.setStretchFactor(spacer,1)
self.addbutton = KPushButton(i18n("Add ->"),vbox)
self.connect(self.addbutton,SIGNAL("clicked()"),self.slotAddClicked)
@@ -1582,14 +1582,14 @@
self.removebutton = KPushButton(i18n("<- Remove"),vbox)
self.connect(self.removebutton,SIGNAL("clicked()"),self.slotRemoveClicked)
vbox.setStretchFactor(self.removebutton,0)
- spacer = QWidget(vbox);
+ spacer = TQWidget(vbox);
vbox.setStretchFactor(spacer,1)
# Selected Groups
- vbox = QVBox(hbox)
+ vbox = TQVBox(hbox)
vbox.setSpacing(self.spacingHint())
hbox.setStretchFactor(vbox,1)
- label = QLabel(i18n("Selected Accounts"),vbox)
+ label = TQLabel(i18n("Selected Accounts"),vbox)
vbox.setStretchFactor(label,0)
self.selectedlist = TDEListBox(vbox)
vbox.setStretchFactor(self.selectedlist,1)
@@ -1609,7 +1609,7 @@
self.__updateLists(availablemembers,originalmembers)
- if self.exec_loop()==QDialog.Accepted:
+ if self.exec_loop()==TQDialog.Accepted:
newmembers = []
for i in range(self.selectedlist.count()):
newmembers.append(unicode(self.selectedlist.item(i).text()))
@@ -1646,7 +1646,7 @@
self.__updateLists(availablemembers,[])
- if self.exec_loop()==QDialog.Accepted:
+ if self.exec_loop()==TQDialog.Accepted:
self.groupobj.setGroupname(unicode(self.groupnamelabel.text()))
newgroupid = int(unicode(self.groupidlabel.text()))
self.groupobj.setGID(newgroupid)

@ -46,7 +46,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
#Patch1: tde-guidance-14.0.0-tqt3.patch
Patch1: tde-guidance-14.0.0-userconfig.patch
BuildRequires: trinity-tqtinterface-devel >= %{tde_version}
BuildRequires: trinity-arts-devel >= 1:1.5.10
@ -60,19 +60,9 @@ BuildRequires: trinity-python-trinity
BuildRequires: chrpath
BuildRequires: gcc-c++
# SIP support
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: python-sip
%endif
%if 0%{?suse_version}
BuildRequires: python-sip-devel
%endif
%if 0%{?rhel} == 5
BuildRequires: trinity-sip-devel
%endif
%if 0%{?rhel} >= 6 || 0%{?fedora}
BuildRequires: sip-devel
%endif
# SIP
BuildRequires: trinity-sip4-tqt-devel >= 4.10.5
Requires: trinity-sip4-tqt >= 4.10.5
# PYTHON-QT support
BuildRequires: trinity-python-tqt-devel
@ -92,6 +82,9 @@ Requires: %{name}-backends = %{version}-%{release}
# POWERMANAGER support (requires HAL)
#define with_powermanager 1
# DISPLAYCONFIG support (deprecated)
#define with_displayconfig 1
Obsoletes: trinity-guidance < %{version}-%{release}
Provides: trinity-guidance = %{version}-%{release}
@ -109,8 +102,10 @@ or can be run as standalone applications.
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING README TODO
#%{tde_bindir}/displayconfig
#%{tde_bindir}/displayconfig-restore
%if 0%{?with_displayconfig}
%{tde_bindir}/displayconfig
%{tde_bindir}/displayconfig-restore
%endif
%{tde_bindir}/grubconfig
%{tde_bindir}/mountconfig
%{tde_bindir}/serviceconfig
@ -185,9 +180,11 @@ Guidance configuration tools.
%{python_sitearch}/%{name}/MicroHAL.py*
%{python_sitearch}/%{name}/ScanPCI.py*
%{python_sitearch}/%{name}/infimport.py*
%if 0%{?with_displayconfig}
%{python_sitearch}/%{name}/displayconfigabstraction.py*
%{python_sitearch}/%{name}/displayconfig-hwprobe.py*
%{python_sitearch}/%{name}/displayconfig-restore.py*
%endif
%{python_sitearch}/%{name}/drivedetect.py*
%{python_sitearch}/%{name}/execwithcapture.py*
%{python_sitearch}/%{name}/wineread.py*
@ -261,7 +258,7 @@ gtk-update-icon-cache --quiet %{tde_datadir}/icons/hicolor || :
%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
#patch1 -p1 -b .tqt3
%patch1 -p1 -b .userconfig
%if 0%{?rhel} || 0%{?mgaversion} || 0%{?mdkversion}
%__sed -i "userconfig/unixauthdb.py" \
@ -273,17 +270,17 @@ gtk-update-icon-cache --quiet %{tde_datadir}/icons/hicolor || :
%build
unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
export PYTHONPATH=%{python_sitearch}/python-tqt
# Avoids 'error: byte-compiling is disabled.' on Mandriva/Mageia
export PYTHONDONTWRITEBYTECODE=
# FTBFS on PCLOS ...
export CXXFLAGS="${RPM_OPT_FLAGS} -I%{tde_tdeincludedir} -I%{tde_includedir}"
export RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -I%{tde_tdeincludedir} -I%{tde_includedir}"
# Specific path for RHEL4
if [ -d /usr/X11R6 ]; then
export CXXFLAGS="${RPM_OPT_FLAGS} -I/usr/X11R6/include -L/usr/X11R6/%{_lib}"
export RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -I/usr/X11R6/include -L/usr/X11R6/%{_lib}"
%__sed -i "setup.py" -e "s|/usr/X11R6/lib|/usr/X11R6/%{_lib}|g"
fi
@ -294,6 +291,11 @@ fi
unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
export EXTRA_MODULE_DIR="%{python_sitearch}/%{name}"
export SIPTQT_DIR="%{python_sitearch}/sip4_tqt"
export PYTHONPATH="%{python_sitearch}/python-tqt"
# Support for 'sip4-tqt'
export PYTHONPATH="%{python_sitearch}/sip4_tqt:${PYTHONPATH}"
# For Mageia/Mandriva: Avoids 'error: byte-compiling must be disabled.
export PYTHONDONTWRITEBYTECODE=
@ -311,15 +313,13 @@ done
##### MAIN PACKAGE INSTALLATION (based on Debian/Ubuntu packaging rules)
# install icons to right place
%__mkdir_p %{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps
%__mv -f %{buildroot}%{tde_datadir}/apps/guidance/pics/hi32-app-daemons.png \
%__cp -f %{buildroot}%{tde_datadir}/apps/guidance/pics/hi32-app-daemons.png \
%{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/daemons.png
%__mv -f %{buildroot}%{tde_datadir}/apps/guidance/pics/kcmpartitions.png \
%__cp -f %{buildroot}%{tde_datadir}/apps/guidance/pics/kcmpartitions.png \
%{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/disksfilesystems.png
%__mv -f %{buildroot}%{tde_datadir}/apps/guidance/pics/hi32-user.png \
%__cp -f %{buildroot}%{tde_datadir}/apps/guidance/pics/hi32-user.png \
%{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/userconfig.png
%__mv -f %{buildroot}%{tde_datadir}/apps/guidance/pics/hi32-display.png \
%{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/displayconfig.png
%__mv -f %{buildroot}%{tde_datadir}/apps/guidance/pics/32-wine.png \
%__cp -f %{buildroot}%{tde_datadir}/apps/guidance/pics/32-wine.png \
%{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/wineconfig.png
%__install -D -p -m0644 kde/wineconfig/pics/16x16/wineconfig.png \
%{buildroot}%{tde_datadir}/icons/crystalsvg/16x16/apps/wineconfig.png
@ -334,15 +334,21 @@ chrpath -r %{tde_libdir} %{buildroot}%{tde_tdelibdir}/kcm_*.so
%__mkdir_p %{buildroot}%{python_sitearch}/%{name}
%__mv -f %{buildroot}%{tde_datadir}/apps/guidance/*.py* %{buildroot}%{python_sitearch}/%{name}
# fix the link properly
# Generates the startup scripts
%__rm -f %{buildroot}%{tde_bindir}/*
#%__ln_s -f %{python_sitearch}/%{name}/displayconfig.py %{buildroot}%{tde_bindir}/displayconfig
%__ln_s -f %{python_sitearch}/%{name}/mountconfig.py %{buildroot}%{tde_bindir}/mountconfig
%__ln_s -f %{python_sitearch}/%{name}/serviceconfig.py %{buildroot}%{tde_bindir}/serviceconfig
%__ln_s -f %{python_sitearch}/%{name}/userconfig.py %{buildroot}%{tde_bindir}/userconfig
%__ln_s -f %{python_sitearch}/%{name}/wineconfig.py %{buildroot}%{tde_bindir}/wineconfig
%__ln_s -f %{python_sitearch}/%{name}/grubconfig.py %{buildroot}%{tde_bindir}/grubconfig
cat <<EOF >%{?buildroot}%{tde_bindir}/userconfig
#!/bin/sh
export PYTHONPATH=%{python_sitearch}/%{name}:%{python_sitearch}/sip4-tqt
exec %{python_sitearch}/%{name}/userconfig.py
EOF
chmod +x %{buildroot}%{tde_bindir}/userconfig
# (obsolete) put this here since gnome people probably don't want it by default
#%__ln_s -f %{_python_sitearch}/%{name}/displayconfig-restore.py %{buildroot}%{tde_bindir}/displayconfig-restore
@ -350,12 +356,7 @@ chrpath -r %{tde_libdir} %{buildroot}%{tde_tdelibdir}/kcm_*.so
%__chmod 0755 %{buildroot}%{python_sitearch}/%{name}/fuser.py
%__chmod 0755 %{buildroot}%{python_sitearch}/%{name}/grubconfig.py
%__mv -f %{buildroot}%{tde_tdeappdir}/displayconfig.desktop %{buildroot}%{tde_tdeappdir}/guidance-displayconfig.desktop
##### BACKENDS INSTALLATION
# install displayconfig-hwprobe.py script
%__install -D -p -m0755 displayconfig/displayconfig-hwprobe.py \
%{buildroot}%{python_sitearch}/%{name}/displayconfig-hwprobe.py
# The xf86misc stuff should not go under /opt/trinity bur under /usr !!!
%__mv -f %{buildroot}%{tde_libdir}/python*/site-packages/ixf86misc.so %{buildroot}%{python_sitearch}
@ -384,9 +385,9 @@ chrpath -r %{tde_libdir} %{buildroot}%{tde_tdelibdir}/kcm_*.so
%__cp powermanager/tooltip.py %{buildroot}%{python_sitearch}/%{name}
# generate guidance-power-manager script
cat <<EOF >%{buildroot}%{tde_bindir}/guidance-power-manager
cat <<EOF >%{?buildroot}%{tde_bindir}/guidance-power-manager
#!/bin/sh
export PYTHONPATH=%{python_sitearch}/%{name}
export PYTHONPATH=%{python_sitearch}/%{name}:%{python_sitearch}/sip4-tqt
%{python_sitearch}/%{name}/guidance-power-manager.py &
EOF
chmod +x %{buildroot}%{tde_bindir}/guidance-power-manager
@ -396,7 +397,6 @@ chmod 0755 %{buildroot}%{python_sitearch}/%{name}/powermanage.py
chmod 0755 %{buildroot}%{python_sitearch}/%{name}/gpmhelper.py
%else
%__rm -f %{buildroot}%{python_sitearch}/%{name}/gpmhelper.py*
%__rm -f %{buildroot}%{python_sitearch}/%{name}/guidance-power-manager.py*
%__rm -f %{buildroot}%{python_sitearch}/%{name}/guidance_power_manager_ui.py*
@ -405,6 +405,27 @@ chmod 0755 %{buildroot}%{python_sitearch}/%{name}/gpmhelper.py
%endif
# DISPLAYCONFIG (obsolete)
%if 0%{?with_displayconfig}
%__cp -f %{buildroot}%{tde_datadir}/apps/guidance/pics/hi32-display.png \
%{buildroot}%{tde_datadir}/icons/crystalsvg/32x32/apps/displayconfig.png
%__ln_s -f %{python_sitearch}/%{name}/displayconfig.py %{buildroot}%{tde_bindir}/displayconfig
%__mv -f %{buildroot}%{tde_tdeappdir}/displayconfig.desktop %{buildroot}%{tde_tdeappdir}/guidance-displayconfig.desktop
# install displayconfig-hwprobe.py script
%__install -D -p -m0755 displayconfig/displayconfig-hwprobe.py \
%{buildroot}%{python_sitearch}/%{name}/displayconfig-hwprobe.py
%else
# Removes obsolete display config manager
%__rm -f %{?buildroot}%{python_sitearch}/%{name}/displayconfig*
%__rm -f %{?buildroot}/etc/X11/Xsession.d/40guidance-displayconfig_restore
%__rm -f %{?buildroot}%{tde_tdelibdir}/kcm_displayconfig.*
%__rm -f %{?buildroot}%{python_sitearch}/%{name}/displayconfig.py*
%__rm -f %{?buildroot}%{python_sitearch}/%{name}/displayconfigwidgets.py*
%endif
# Replace all '#!' calls to python with /usr/bin/python
# and make them executable
for i in `find %{buildroot} -type f`; do
@ -423,12 +444,6 @@ done
find %{buildroot} -name "*.egg-info" -exec rm -f {} \;
find %{buildroot}%{tde_libdir} -name "*.a" -exec rm -f {} \;
# Removes obsolete display config manager
%__rm -f %{?buildroot}/etc/X11/Xsession.d/40guidance-displayconfig_restore
%__rm -f %{?buildroot}%{tde_tdelibdir}/kcm_displayconfig.*
%__rm -f %{?buildroot}%{python_sitearch}/%{name}/displayconfig.py*
%__rm -f %{?buildroot}%{python_sitearch}/%{name}/displayconfigwidgets.py*
%clean
%__rm -rf %{buildroot}

@ -120,7 +120,7 @@ if [ $1 -eq 0 ]; then
for f in konqueror d3lphin; do
update-alternatives --remove \
media_safelyremove.desktop_${f} \
%{tde_datadir}/apps/${f}/servicemenus/media_safelyremove.desktop_tdeio-umountwrapper
%{tde_datadir}/apps/${f}/servicemenus/media_safelyremove.desktop_tdeio-umountwrapper || :
done
fi

@ -105,6 +105,7 @@ grpiud dependencies/arts
grpiud dependencies/libart-lgpl
grpiud dependencies/libcaldav
grpiud dependencies/libcarddav
grpiud dependencies/sip4-tqt
grpiud dependencies/tqca
if [ "${DIST}" != ".el4" ]; then
grpiud dependencies/avahi-tqt

@ -0,0 +1,33 @@
--- python-tqt/pyqtconfig.py.in.ORI 2013-12-28 15:49:34.901906208 +0100
+++ python-tqt/pyqtconfig.py.in 2013-12-28 15:49:42.849851496 +0100
@@ -21,7 +21,7 @@
# modules that %Import PyTQt modules.
-import sipconfig
+from sip4_tqt import sipconfig
# These are installation specific values created when PyTQt was configured.
--- python-tqt/build.py.ORI 2013-12-28 15:52:10.923832969 +0100
+++ python-tqt/build.py 2013-12-28 15:52:18.638779926 +0100
@@ -35,7 +35,7 @@
# Get the SIP configuration.
try:
- import sipconfig
+ from sip4_tqt import sipconfig
except:
print "Unable to import the sipconfig module. Please make sure you have"
print "SIP v3.9 or later installed."
--- python-tqt/configure.py.ORI 2013-12-28 15:52:31.294692944 +0100
+++ python-tqt/configure.py 2013-12-28 15:52:37.494650327 +0100
@@ -28,7 +28,7 @@
import shutil
import py_compile
-import sipconfig
+from sip4_tqt import sipconfig
src_dir = os.path.dirname(os.path.abspath(__file__))

@ -1,7 +1,7 @@
%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define tde_version 14.0.0
%define tde_prefix /usr
%define tde_prefix /opt/trinity
%define tde_bindir %{tde_prefix}/bin
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}
@ -14,7 +14,7 @@ License: GPL
Summary: TQt bindings for Python
Group: System Environment/Libraries
Obsoletes: PyQt
#Obsoletes: PyQt
Obsoletes: trinity-PyQt
Obsoletes: trinity-python-qt3
@ -26,19 +26,15 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
Patch1: python-tqt-14.0.0-sip4_tqt.patch
BuildRequires: gcc-c++
BuildRequires: trinity-tqtinterface-devel >= %{tde_version}
BuildRequires: trinity-tqscintilla-devel
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: sip-devel
%endif
%if 0%{?mdkversion} || 0%{?mgaversion}
BuildRequires: python-sip
%endif
%if 0%{?suse_version}
BuildRequires: python-sip-devel
%endif
# SIP
BuildRequires: trinity-sip4-tqt-devel >= 4.10.5
Requires: trinity-sip4-tqt >= 4.10.5
# TDE specific building variables
BuildRequires: trinity-tqt3-devel >= 3.5.0
@ -58,13 +54,15 @@ same way in both languages (with syntax differences, of course)
%files
%defattr(-,root,root,-)
%doc NEWS README
%{python_sitearch}/qt.so
%{python_sitearch}/qtcanvas.so
%{python_sitearch}/qtnetwork.so
%{python_sitearch}/qtsql.so
%{python_sitearch}/qttable.so
%{python_sitearch}/qtui.so
%{python_sitearch}/qtxml.so
%dir %{python_sitearch}/python_tqt
%{python_sitearch}/python_tqt/__init__.py*
%{python_sitearch}/python_tqt/qt.so
%{python_sitearch}/python_tqt/qtcanvas.so
%{python_sitearch}/python_tqt/qtnetwork.so
%{python_sitearch}/python_tqt/qtsql.so
%{python_sitearch}/python_tqt/qttable.so
%{python_sitearch}/python_tqt/qtui.so
%{python_sitearch}/python_tqt/qtxml.so
##########
@ -80,7 +78,7 @@ Linux, Windows and MacOS X).
%files gl
%defattr(-,root,root,-)
%{python_sitearch}/qtgl.so
%{python_sitearch}/python_tqt/qtgl.so
##########
@ -96,7 +94,7 @@ PyQt Extensions. Contains:
%files tqtext
%defattr(-,root,root,-)
%{python_sitearch}/qtext.so
%{python_sitearch}/python_tqt/qtext.so
##########
@ -111,8 +109,8 @@ pylupdate is the counterpart for TQt's lupdate. It updates TQt
Linguist translation files from Python code.
%files -n trinity-pytqt-tools
%{_bindir}/pylupdate
%{_bindir}/pyuic
%{tde_bindir}/pylupdate
%{tde_bindir}/pyuic
##########
@ -128,7 +126,7 @@ packages based on them, like PyTDE.
%files devel
%defattr(-,root,root,-)
%{python_sitearch}/pyqtconfig.py*
%{python_sitearch}/python_tqt/pyqtconfig.py*
%{_datadir}/sip/tqt/
##########
@ -137,9 +135,11 @@ packages based on them, like PyTDE.
%debug_package
%endif
##########
%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%patch1 -p1 -b .sip4tqt
%build
@ -149,15 +149,16 @@ mkdir build
cd build
# WTF ? CentOS 6 !
cp -rf ../pyuic3 ../pylupdate3 .
cp -rf ../pyuic3 ../pylupdate3
echo yes | python ../configure.py \
-c -n %{_includedir}/tqscintilla \
-q %{_datadir}/tqt3 \
-y tqt-mt \
-o %{_libdir} -u -j 10 \
-d %{python_sitearch} \
-d %{python_sitearch}/python_tqt \
-v %{_datadir}/sip/tqt \
-b %{tde_bindir} \
-w \
CXXFLAGS_RELEASE="" CXXFLAGS="${RPM_OPT_FLAGS} -I%{_includedir}/tqt" STRIP=""
@ -171,9 +172,12 @@ echo yes | python ../configure.py \
%__install -d %{?buildroot}%{_datadir}/sip/
%__cp -rf sip/* %{?buildroot}%{_datadir}/sip/tqt/
# Dummy file to make a Python module
touch %{?buildroot}%{python_sitearch}/python_tqt/__init__.py
%clean
%__rm -rf %{?buildroot}
%__rm -rf %{?buildroot}%{python_sitearch}/python_tqt/__init__.py
%changelog

@ -1,17 +1,20 @@
# Some distribution already provides this package.
# Mageia 3
# Default version for this component
%define tde_pkg sip4-tqt
%define tde_version 14.0.0
%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?tde_prefix}" != "/usr"
%define _variant .opt
%endif
# Always install under standard prefix
%define tde_prefix /usr
%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define tde_bindir %{tde_prefix}/bin
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}
Name: trinity-sip4-tqt
Epoch: 2
Version: 14.0.0
Name: trinity-%{tde_pkg}
Version: 4.10.5
Release: %{?!preversion:1}%{?preversion:0_%{preversion}}%{?dist}%{?_variant}
License: GPL
Summary: Python/C++ bindings generator runtime library
@ -23,48 +26,41 @@ Packager: Francois Andriot <francois.andriot@free.fr>
Prefix: %{tde_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{version}%{?preversion:~%{preversion}}.tar.gz
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
BuildRequires: trinity-tqtinterface-devel >= %{version}
# TDE specific building variables
BuildRequires: cmake >= 2.8
BuildRequires: trinity-tqt3-devel >= %{version}
BuildRequires: python
BuildRequires: trinity-tqt3-devel >= 3.5.0
%description
##########
%package -n python-sip
Summary: Python/C++ bindings generator runtime library
Epoch: 2
%description -n python-sip
SIP is a tool for generating bindings for C++ classes with some ideas
borrowed from SWIG, but capable of tighter bindings because of its
specificity towards C++ and Python.
%post -n python-sip
%post
/sbin/ldconfig || :
%postun -n python-sip
%postun
/sbin/ldconfig || :
%files -n python-sip
%files
%defattr(-,root,root,-)
%{python_sitearch}/sip.so
%{python_sitearch}/sipconfig.py
%{python_sitearch}/sipdistutils.py
%dir %{python_sitearch}/sip4_tqt
%{python_sitearch}/sip4_tqt/sip.so
%{python_sitearch}/sip4_tqt/sipconfig.py*
%{python_sitearch}/sip4_tqt/sipdistutils.py*
%{python_sitearch}/sip4_tqt/__init__.py*
##########
%package -n python-sip-devel
%package devel
Summary: Python/C++ bindings generator development files
Group: Development/Libraries
Requires: python-sip = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
%description -n python-sip-devel
%description devel
SIP is a tool for generating bindings for C++ classes with some ideas
borrowed from SWIG, but capable of tighter bindings because of its
specificity towards C++ and Python.
@ -86,16 +82,16 @@ Features:
This package contains the code generator tool and the development headers
needed to develop Python bindings with sip.
%post -n python-sip-devel
%post devel
/sbin/ldconfig || :
%postun -n python-sip-devel
%postun devel
/sbin/ldconfig || :
%files -n python-sip-devel
%files devel
%defattr(-,root,root,-)
%{_bindir}/sip
%{_includedir}/python*/sip.h
%{tde_bindir}/sip
%{tde_includedir}/sip.h
##########
@ -103,9 +99,10 @@ needed to develop Python bindings with sip.
%debug_package
%endif
##########
%prep
%setup -q -n %{name}-%{version}%{?preversion:~%{preversion}}
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%build
@ -115,7 +112,9 @@ export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig"
mkdir build
cd build
python ../configure.py \
-d %{python_sitearch} \
-b %{tde_bindir} \
-d %{python_sitearch}/sip4_tqt \
-e %{tde_includedir} \
-u STRIP="" \
CFLAGS="${RPM_OPT_FLAGS} -I%{_includedir}/tqt -I%{_includedir}/tqt3" \
CFLAGS_RELEASE="" \
@ -127,10 +126,14 @@ python ../configure.py \
%__rm -rf %{?buildroot}
%__make install DESTDIR=%{?buildroot} -C build
# Dummy file to allow loading as a module
touch %{?buildroot}%{python_sitearch}/sip4_tqt/__init__.py
%clean
%__rm -rf %{?buildroot}
%changelog
* Thu Feb 16 2012 Francois Andriot <francois.andriot@free.fr> - 14.0.0-1
* Fri Jul 05 2013 Francois Andriot <francois.andriot@free.fr> - 4.10.5-1
- Initial release for TDE R14, using 'tqt3' instead of 'qt3'

@ -0,0 +1,41 @@
--- pykdeextensions-3.5.13.1/src/kdedistutils.py.extramodule 2012-09-08 17:33:05.000000000 +0000
+++ pykdeextensions-3.5.13.1/src/kdedistutils.py 2012-10-02 19:19:40.185384207 +0000
@@ -712,6 +712,8 @@
# Build the 'stub' code.
cppcode = self.cpptemplate % {"moduledir": self.data_dir,
+ "extramodule": os.getenv("EXTRA_MODULE_DIR"),
+ "pyqt_dir": self.pyqt_dir,
"modulename": modulename,
"factoryfunction": factoryfunction,
"python_version": python_version}
@@ -854,6 +856,8 @@
#include <sip.h>
#define MODULE_DIR "%(moduledir)s"
+#define EXTRA_MODULE_DIR "%(extramodule)s"
+#define PYQT_DIR "%(pyqt_dir)s"
#define MODULE_NAME "%(modulename)s"
#define FACTORY "%(factoryfunction)s"
#define CPP_FACTORY %(factoryfunction)s
--- pykdeextensions-14.0.0/src/kdedistutils.py.ORI 2013-04-07 17:54:28.531813437 +0200
+++ pykdeextensions-14.0.0/src/kdedistutils.py 2013-04-07 17:56:15.510529614 +0200
@@ -903,6 +907,18 @@
if(!pyize->appendToSysPath (path.latin1 ())) {
return report_error ("***Failed to set sys.path\n");
}
+
+ // Add the extra path to the python script to the interpreter search path.
+ TQString extrapath = TQString(EXTRA_MODULE_DIR);
+ if(!pyize->appendToSysPath (extrapath.latin1 ())) {
+ return report_error ("***Failed to set extra sys.path\n");
+ }
+
+ // Add the PYQT path to the python script to the interpreter search path.
+ TQString pyqt_dir = TQString(PYQT_DIR);
+ if(!pyize->appendToSysPath (pyqt_dir.latin1 ())) {
+ return report_error ("***Failed to set PYQT sys.path\n");
+ }
// Load the Python script.
PyObject *pyModule = pyize->importModule ((char *)script.latin1 ());

@ -0,0 +1,33 @@
--- pytdeextensions/src/qtuicompiler.py.ORI 2013-12-28 17:06:51.749357267 +0100
+++ pytdeextensions/src/qtuicompiler.py 2013-12-28 17:07:03.539275908 +0100
@@ -17,7 +17,7 @@
import os
import sys
-import pyqtconfig
+from python_tqt import pyqtconfig
from distutils.spawn import *
import traceback
--- pytdeextensions/src/kdedistutils.py.ORI2 2013-12-28 17:20:38.828670001 +0100
+++ pytdeextensions/src/kdedistutils.py 2013-12-28 17:21:04.731492545 +0100
@@ -930,8 +930,8 @@
}
// Inject a helper function
- TQString bridge = TQString("import sip\n"
- "import qt\n"
+ TQString bridge = TQString("from sip4_tqt import sip\n"
+ "from python_tqt import qt\n"
"def kcontrol_bridge_" FACTORY "(parent,name):\n"
" if parent!=0:\n"
#if SIP_VERSION >= 0x040200
@@ -2019,7 +2019,7 @@
self.announce("Found Qt version %s." % qtver)
try:
self.announce("Checking for a working PyQt...")
- import qt
+ from python_tqt import qt
self.announce(" ...PyQt is working")
except:
raise SystemExit, "Couldn't import Qt! Please make sure that PyQt is installed and working."

@ -0,0 +1,58 @@
--- pytdeextensions/src/kdedistutils.py.ORI 2013-12-28 14:50:50.209401866 +0100
+++ pytdeextensions/src/kdedistutils.py 2013-12-28 15:36:18.381316251 +0100
@@ -892,7 +892,7 @@
return NULL;
}
-static TDECModule* return_instance( QWidget *parent, const char *name ) {
+static TDECModule* return_instance( TQWidget *parent, const char *name ) {
TDECModule* tdecmodule;
PyObject *pyTDECModuleTuple;
PyObject *pyTDECModule;
@@ -901,7 +901,7 @@
// Try to determine what py script we're loading. Note that "name"
// typically appears to be NULL.
- QString script(MODULE_NAME);
+ TQString script(MODULE_NAME);
// Reload libpython, but this time tell the runtime linker to make the
// symbols global and available for later loaded libraries/module.
@@ -914,8 +914,8 @@
}
// Add the path to the python script to the interpreter search path.
- QString path = QString(MODULE_DIR);
- if(path == QString::null) {
+ TQString path = TQString(MODULE_DIR);
+ if(path == TQString::null) {
return report_error ("***Failed to locate script path");
}
if(!pyize->appendToSysPath (path.latin1 ())) {
@@ -930,14 +930,14 @@
}
// Inject a helper function
- QString bridge = QString("import sip\n"
+ TQString bridge = TQString("import sip\n"
"import qt\n"
"def kcontrol_bridge_" FACTORY "(parent,name):\n"
" if parent!=0:\n"
#if SIP_VERSION >= 0x040200
- " wparent = sip.wrapinstance(parent,qt.QWidget)\n"
+ " wparent = sip.wrapinstance(parent,qt.TQWidget)\n"
#else
- " wparent = sip.wrapinstance(parent,'QWidget')\n"
+ " wparent = sip.wrapinstance(parent,'TQWidget')\n"
#endif
" else:\n"
" wparent = None\n"
@@ -997,7 +997,7 @@
extern "C" {
// Factory function that kcontrol will call.
- TDECModule* CPP_FACTORY(QWidget *parent, const char *name) {
+ TDECModule* CPP_FACTORY(TQWidget *parent, const char *name) {
return return_instance(parent, name);
}
}

@ -41,9 +41,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
# [pytdeextensions] Port to TQT3
Patch1: pytdeextensions-14.0.0-tqt.patch
Patch2: pytdeextensions-14.0.0-python_tqt.patch
# [pykdeextensions] Fix hardcoded path to Guidance python libraries [Bug #999]
Patch2: pykdeextensions-3.5.13.2-fix_extra_module_dir.patch
Patch3: pytdeextensions-14.0.0-fix_extra_module_dir.patch
# [pykdeextensions] Fix include directory search location
Patch5: pytdeextensions-14.0.0-fix_include_dir.patch
@ -56,9 +58,16 @@ BuildRequires: gettext
BuildRequires: trinity-python-tqt-devel
BuildRequires: trinity-python-trinity-devel
BuildRequires: trinity-pytqt-tools
Requires: trinity-python-tqt
Requires: trinity-python-trinity
Requires: trinity-libpythonize0 = %{version}-%{release}
# SIP
BuildRequires: trinity-sip4-tqt-devel >= 4.10.5
Requires: trinity-sip4-tqt >= 4.10.5
Obsoletes: trinity-pykdeextensions < %{version}-%{release}
Provides: trinity-pykdeextensions = %{version}-%{release}
@ -145,19 +154,23 @@ Requires: trinity-libpythonize0-devel = %{version}-%{release}
%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%patch2 -p1 -b .extramodule
%patch1 -p1 -b .tqt3
%patch2 -p1 -b .pythontqt
%patch3 -p1 -b .extramodule
%patch5 -p1 -b .incdir
# Changes library directory to 'lib64'
# Also other fixes for distributions ...
for f in src/*.py; do
%__sed -i "${f}" \
-e "s|%{tde_prefix}/lib/|%{tde_libdir}/|g" \
-e "s|/usr/lib/pyshared/python\*|%{python_sitearch}|g" \
-e "s|'pyqt-dir='.*'|'pyqt-dir=','%{python_sitearch}/python_tqt'|g" \
-e "s|self.pyqt_dir = .*|self.pyqt_dir = \"%{python_sitearch}/python_tqt\"|g" \
-e "s|'pytde-dir=',None,|'pytde-dir=','%{python_sitearch}',|g" \
-e "s|self.pytde_dir = None|self.pytde_dir = \"%{python_sitearch}\"|g" \
-e "s|%{tde_includedir}/kde|%{tde_tdeincludedir}|g" \
-e 's|"/kde"|"/tde"|'
-e "s|%{tde_includedir}/tde|%{tde_tdeincludedir}|g" \
-e 's|"/kde"|"/tde"|' \
-e 's|"-I" + self.kde_inc_dir + "/tde"|"-I/opt/trinity/include"|' \
-e "s|/usr/lib/pyshared/python\*|%{python_sitearch}|g"
done
# Do not look for 'libpython2.x.so' (from -devel) package.
@ -176,9 +189,14 @@ export PATH="%{tde_bindir}:${PATH}"
%__mkdir_p build
./setup.py build_libpythonize
%install
unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
#export PYTHONPATH=%{python_sitearch}/python-tqt
# Support for 'sip4-tqt'
#export PYTHONPATH=%{python_sitearch}/sip4_tqt:${PYTHONPATH}
# Avoids 'error: byte-compiling is disabled.' on Mandriva/Mageia
export PYTHONDONTWRITEBYTECODE=

@ -0,0 +1,11 @@
--- python-trinity/configure.py.ORI2 2013-12-28 17:02:32.849146767 +0100
+++ python-trinity/configure.py 2013-12-28 17:02:44.143068602 +0100
@@ -37,7 +37,7 @@
sys.exit (-1)
try:
- import pyqtconfig
+ from python_tqt import pyqtconfig
except:
sipconfig.error ("Can't find pyqtconfig.py in sys.path - exiting")

@ -0,0 +1,23 @@
--- python-trinity/configure.py.ORI 2013-12-28 15:55:54.269299304 +0100
+++ python-trinity/configure.py 2013-12-28 15:56:05.611221484 +0100
@@ -30,7 +30,7 @@
import py_compile
try:
- import sipconfig
+ from sip4_tqt import sipconfig
except:
print ("Can't find sipconfig.py (expected in sys.path)")
print ("Have you built the correct version of sip?")
--- python-trinity/pytdeconfig.py.in.ORI 2013-12-28 15:57:53.618481027 +0100
+++ python-trinity/pytdeconfig.py.in 2013-12-28 15:58:05.467399833 +0100
@@ -22,7 +22,8 @@
# modules that %Import PyKDE modules.
-import sipconfig, pyqtconfig
+from sip4_tqt import sipconfig
+import pyqtconfig
# These are installation specific values created when PyTQt was configured.

@ -43,8 +43,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
#Patch0: python-trinity-14.0.0-ftbfs.patch
#Patch1: python-trinity-14.0.0-ftbfs2.patch
Patch1: python-trinity-14.0.0-sip4_tqt.patch
Patch2: python-trinity-14.0.0-python_tqt.patch
BuildRequires: trinity-tqtinterface-devel >= %{tde_version}
BuildRequires: trinity-arts-devel >= 1:1.5.10
@ -55,22 +55,11 @@ BuildRequires: gettext
# PYTHON support
BuildRequires: python
BuildRequires: trinity-python-tqt-devel
Requires: trinity-python-tqt
# SIP support
%if 0%{?rhel} >= 4 && 0%{?rhel} <= 5
# RHEL 4/5 comes with old version, so we brought ours ...
BuildRequires: trinity-sip-devel
%endif
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: python-sip
%endif
%if 0%{?rhel} >= 6 || 0%{?fedora}
BuildRequires: sip-devel
%endif
%if 0%{?suse_version}
BuildRequires: python-sip-devel
%endif
# SIP
BuildRequires: trinity-sip4-tqt-devel >= 4.10.5
Requires: trinity-sip4-tqt >= 4.10.5
Obsoletes: python-trinity < %{version}-%{release}
Provides: python-trinity = %{version}-%{release}
@ -78,7 +67,7 @@ Provides: python-trinity = %{version}-%{release}
%description
Python binding module that provides wide access to the Trinity API,
also known as PyTDE. Using this, you'll get (for example) classes
from kio, kjs, khtml and kprint.
from tdeio, tdejs, tdehtml and tdeprint.
%package devel
@ -116,10 +105,8 @@ tips and working code you can use to learn from.
%prep
%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
%if 0%{?suse_version} == 1310
#patch0 -p1 -b .ftbfs
#patch1 -p1 -b .ftbfs
%endif
%patch1 -p1 -b .sip4tqt
%patch2 -p1 -b .pythontqt
%build

Loading…
Cancel
Save