Bugfixes.
This commit is contained in:
parent
13443ea79e
commit
97ce11aa49
|
@ -275,7 +275,7 @@ class Publisher:
|
||||||
'''Creates a Debian package for Appy.'''
|
'''Creates a Debian package for Appy.'''
|
||||||
j = os.path.join
|
j = os.path.join
|
||||||
Debianizer(j(self.genFolder, 'appy'), j(appyPath, 'versions'),
|
Debianizer(j(self.genFolder, 'appy'), j(appyPath, 'versions'),
|
||||||
appVersion=self.versionShort).run()
|
appVersion=self.versionShort, depends=[]).run()
|
||||||
|
|
||||||
def createDistRelease(self):
|
def createDistRelease(self):
|
||||||
'''Create the distutils package.'''
|
'''Create the distutils package.'''
|
||||||
|
|
|
@ -20,7 +20,8 @@ class Debianizer:
|
||||||
package.'''
|
package.'''
|
||||||
|
|
||||||
def __init__(self, app, out, appVersion='0.1.0',
|
def __init__(self, app, out, appVersion='0.1.0',
|
||||||
pythonVersions=('2.6', '2.7')):
|
pythonVersions=('2.6', '2.7'),
|
||||||
|
depends=('zope2.12', 'openoffice.org')):
|
||||||
# app is the path to the Python package to Debianize.
|
# app is the path to the Python package to Debianize.
|
||||||
self.app = app
|
self.app = app
|
||||||
self.appName = os.path.basename(app)
|
self.appName = os.path.basename(app)
|
||||||
|
@ -30,6 +31,8 @@ class Debianizer:
|
||||||
self.appVersion = appVersion
|
self.appVersion = appVersion
|
||||||
# On which Python versions will the Debian package depend?
|
# On which Python versions will the Debian package depend?
|
||||||
self.pythonVersions = pythonVersions
|
self.pythonVersions = pythonVersions
|
||||||
|
# Debian package dependencies
|
||||||
|
self.depends = depends
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
'''Generates the Debian package.'''
|
'''Generates the Debian package.'''
|
||||||
|
@ -56,10 +59,15 @@ class Debianizer:
|
||||||
# Create the control file
|
# Create the control file
|
||||||
f = file('control', 'w')
|
f = file('control', 'w')
|
||||||
nameSuffix = ''
|
nameSuffix = ''
|
||||||
depends = ''
|
dependencies = []
|
||||||
if self.appName != 'appy':
|
if self.appName != 'appy':
|
||||||
nameSuffix = '-%s' % self.appName
|
nameSuffix = '-%s' % self.appName.lower()
|
||||||
depends = ', python-appy'
|
dependencies.append('python-appy')
|
||||||
|
if self.depends:
|
||||||
|
for d in self.depends: dependencies.append(d)
|
||||||
|
depends = ''
|
||||||
|
if dependencies:
|
||||||
|
depends = ', ' + ', '.join(dependencies)
|
||||||
f.write(debianInfo % (nameSuffix, self.appVersion, size,
|
f.write(debianInfo % (nameSuffix, self.appVersion, size,
|
||||||
self.pythonVersions[0], self.pythonVersions[1],
|
self.pythonVersions[0], self.pythonVersions[1],
|
||||||
depends))
|
depends))
|
||||||
|
|
Loading…
Reference in a new issue