Fixed debian packaging for SE under Python 3.

This commit is contained in:
Virgil Dupras 2010-08-17 07:26:46 -07:00
parent 29163ed053
commit 250a496a78
5 changed files with 22 additions and 7 deletions

1
debian_se/compat Normal file
View File

@ -0,0 +1 @@
7

View File

@ -8,5 +8,5 @@ Homepage: http://www.hardcoded.net
Package: dupeguru-se
Architecture: any
Depends: python (>= 2.6), python-qt4 (>= 4.6)
Depends: python3 (>= 3.1)
Description: dupeGuru

View File

@ -42,9 +42,9 @@ install: build
dh_installdirs
chmod +x src/start.py
cp -R src/ $(CURDIR)/debian/tmp/usr/local/share/dupeguru_se
cp $(CURDIR)/debian/dupeguru_se.desktop $(CURDIR)/debian/tmp/usr/share/applications
ln -s /usr/local/share/dupeguru_se/start.py $(CURDIR)/debian/tmp/usr/local/bin/dupeguru_se
cp -R src/ $(CURDIR)/debian/dupeguru-se/usr/local/share/dupeguru_se
cp $(CURDIR)/debian/dupeguru_se.desktop $(CURDIR)/debian/dupeguru-se/usr/share/applications
ln -s /usr/local/share/dupeguru_se/start.py $(CURDIR)/debian/dupeguru-se/usr/local/bin/dupeguru_se
# Build architecture-independent files here.

View File

@ -74,6 +74,7 @@ def package_windows(edition, dev):
def package_debian(edition):
add_to_pythonpath('qt')
add_to_pythonpath(op.join('qt', 'base'))
add_to_pythonpath(op.join('qt', edition))
from app import DupeGuru
@ -89,6 +90,14 @@ def package_debian(edition):
if edition == 'me':
packages.append('hsaudiotag')
copy_packages(packages, srcpath)
import PyQt4
qtsrcpath = op.dirname(PyQt4.__file__)
qtdestpath = op.join(srcpath, 'PyQt4')
os.makedirs(qtdestpath)
shutil.copy(op.join(qtsrcpath, '__init__.py'), qtdestpath)
shutil.copy(op.join(qtsrcpath, 'Qt.so'), qtdestpath)
shutil.copy(op.join(qtsrcpath, 'QtCore.so'), qtdestpath)
shutil.copy(op.join(qtsrcpath, 'QtGui.so'), qtdestpath)
shutil.copytree(ed('debian_{0}'), op.join(destpath, 'debian'))
yaml_path = op.join(help_src, 'changelog.yaml')
changelog_dest = op.join(destpath, 'debian', 'changelog')

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "HS" License as described in the "LICENSE" file,
@ -6,6 +6,7 @@
# http://www.hardcoded.net/licenses/hs_license
import sys
import os.path
import sip
sip.setapi('QVariant', 1)
@ -14,12 +15,16 @@ from PyQt4.QtGui import QApplication, QIcon, QPixmap
import base.dg_rc
if sys.platform == 'linux2':
# Under Python3, we have to add 'base' to pythonpath because UI files don't use
# relative imports.
sys.path.append(os.path.dirname(base.dg_rc.__file__))
from app import DupeGuru
if sys.platform == 'win32':
import base.cxfreeze_fix
if __name__ == "__main__":
app = QApplication(sys.argv)
app.setWindowIcon(QIcon(QPixmap(":/logo_se")))
@ -27,4 +32,4 @@ if __name__ == "__main__":
QCoreApplication.setApplicationName(DupeGuru.NAME)
QCoreApplication.setApplicationVersion(DupeGuru.VERSION)
dgapp = DupeGuru()
sys.exit(app.exec_())
sys.exit(app.exec_())