Commit 0d0348b3 authored by Łukasz Nowak's avatar Łukasz Nowak

Initial import of slapos.tool.zcbworkarounds

parent 28f694d6
1.0 (unreleased)
----------------
0.2 (2010-10-08)
----------------
- Fixed a bug when extension was used on fresh buildout, in such case
installed file (mostly .installed.cfg) does not exists yet.
[Lukasz Nowak]
0.1 (2010-10-07)
----------------
- Added workaround for zc.buildout issue 163776 found in ERP5 Appliance
openoffice-bin part.
- Initial version.
[Lukasz Nowak]
include README.txt
include CHANGES.txt
Workarounds for zc.buildout issues related to ERP5 Appliance
============================================================
This egg is an extensions to zc.buildout to solve specific issues related with
zc.buildout bugs.
It is only allowed to add solutions for already known bugs by zc.buildout
developers. As soon as upstream bug is fixed and fix is released, workaround
shall be removed.
[egg_info]
tag_build = .dev
tag_svn_revision = 1
from setuptools import setup
version = '1.0'
name = "slapos.tool.zcbworkarounds"
setup(
name=name,
version=version,
description="A zc.buildout extensions to workaround zc.buildout issues"\
" which are impacting ERP5 Appliance",
long_description=open("README.txt").read() + "\n\n" +
open("CHANGES.txt").read(),
classifiers=[
"Programming Language :: Python",
"Framework :: Buildout :: Extension",
"Topic :: Software Development :: Libraries :: Python Modules",
],
py_modules=['workarounds'],
entry_points={
'zc.buildout.extension': ['extension = workarounds:extension'],
},
zip_safe=True,
license='GPLv3',
)
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program 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.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import logging
import os
def extension(buildout):
Workaround(buildout)()
class Workaround:
def __init__(self, buildout):
self.buildout = buildout
self.logger = logging.getLogger(__name__)
def __call__(self):
self.workaround_openoffice_bin_zc163776()
def workaround_openoffice_bin_zc163776(self):
"""Workaround for: https://bugs.launchpad.net/zc.buildout/+bug/163776"""
installed_path = self.buildout['buildout']['installed']
if not os.path.exists(installed_path):
return
installed = open(installed_path).read()
if 'z3c.recipe.openoffice==0.3.1dev' in installed:
self.logger.warn('Fixing issue #163776 for z3c.recipe.openoffice')
open(installed_path, 'w').write(installed.replace(
'z3c.recipe.openoffice==0.3.1dev', 'z3c.recipe.openoffice'))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment