Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Gentoo Development <gentoo-dev@g.o>
From: Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>
Subject: Patch for python.eclass
Date: Mon, 20 Sep 2010 03:18:51 +0200
This patch for python.eclass has been divided into 3 subpatches to simplify review.

Subpatch #1 fixes preservation of whitespace.

Subpatch #2 renames 2 local arrays in python_mod_optimize() function:
  site_packages_absolute_dirs  -> dirs
  site_packages_absolute_files -> files

Subpatch #3 adds --allow-evaluated-non-sitedir-paths option to python_mod_optimize() and
python_mod_cleanup() functions.
In rare cases, packages supporting installation for multiple Python ABIs install .py files
outside of site-packages directories. python_mod_optimize() and python_mod_cleanup()
functions currently don't support such paths. It's better to not allow such paths by
default, so this subpatch adds new --allow-evaluated-non-sitedir-paths option to these
functions. This option is disallowed in packages not supporting installation for multiple
Python ABIs. Such paths are internally evaluated inside these functions. Such paths work
correctly only if they contain '${PYTHON_ABI}' or '$(python_get_version)' (probably with
'$(python_get_implementation)') or '$(custom_function)' (where custom_function() uses
"${PYTHON_ABI}" or "$(python_get_version)" and prints appropriate output), so there are
sanity checks, which ensure that such paths contain '$'.

Example usage:

pkg_postinst() {
    python_mod_optimize --allow-evaluated-non-sitedir-paths '/usr/share/package_name/${PYTHON_ABI}'
}

pkg_postrm() {
    python_mod_cleanup --allow-evaluated-non-sitedir-paths '/usr/share/package_name/${PYTHON_ABI}'
}

This functionality is needed by Zope 2.12 / 2.13.

-- 
Arfrever Frehtes Taifersar Arahesis
Attachment:
python.eclass.patch (Text Data)
Attachment:
python.eclass.patch.1 (Text Data)
Attachment:
python.eclass.patch.2 (Text Data)
Attachment:
python.eclass.patch.3 (Text Data)
Attachment:
signature.asc (This is a digitally signed message part.)
Replies:
Re: Patch for python.eclass
-- Arfrever Frehtes Taifersar Arahesis
Re: Patch for python.eclass
-- Mike Frysinger
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Automated Package Removal and Addition Tracker, for the week ending 2010-09-19 23h59 UTC
Next by thread:
Re: Patch for python.eclass
Previous by date:
Automated Package Removal and Addition Tracker, for the week ending 2010-09-19 23h59 UTC
Next by date:
Re: openrc stabilization update


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.