Commit a1192d3b authored by Nicolas Dumazet's avatar Nicolas Dumazet

We need different binaries depending on the architecture


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32893 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 93a51cac
from setuptools import setup, find_packages
name = "erp5.recipe.openoffice"
version = '0.1'
setup(
name = name,
version = version,
author = "Nicolas Dumazet",
author_email = "nicolas.dumazet@nexedi.com",
description = "ZC Buildout recipe to install openoffice",
license = "ZPL 2.1",
keywords = "openoffice buildout",
classifiers=[
"License :: OSI Approved :: Zope Public License",
"Framework :: Buildout",
],
packages = find_packages('src'),
include_package_data = True,
package_dir = {'':'src'},
namespace_packages = ['erp5', 'erp5.recipe'],
install_requires = [
'z3c.recipe.openoffice',
],
zip_safe=False,
entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
)
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Copyright (c) 2006-2008 Zope Corporation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import z3c.recipe.openoffice.recipe as original
import platform
class Recipe(original.Recipe):
"""
Wrap z3c.recipe.openoffice to allow selecting the architecture
"""
def __init__(self, buildout, name, options):
machine = platform.uname()[-2]
if machine in ('i386', 'i586', 'i686'):
target = 'x86_32'
elif machine == 'x86_64':
target = 'x86_64'
else:
raise ValueError('Unknown machine')
options['download-url'] = options['download-%s' % target]
original.Recipe.__init__(self, buildout, name, options)
[buildout]
parts =
openoffice-bin
develop =
recipes/erp5.recipe.openoffice
[openoffice-bin]
recipe = z3c.recipe.openoffice
recipe = erp5.recipe.openoffice
install-pyuno-egg = no
hack-openoffice-python = no
download-url =
download-x86_64 =
http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_LinuxX86-64_install_wJRE_en-US.tar.gz
download-x86_32 =
http://download.services.openoffice.org/files/stable/3.2.0/OOo_3.2.0_LinuxIntel_install_wJRE_en-US.tar.gz
unpack-name = OOO320_m12_native_packed-1_en-US.9483
# below version is internally used in recipe
version = 3
......
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