Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 313447 - gnome-base/gnome-menus: Verify and potentially improve Python-related code
Summary: gnome-base/gnome-menus: Verify and potentially improve Python-related code
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: InVCS
: 325359 (view as bug list)
Depends on:
Blocks: 308257 313471
  Show dependency tree
 
Reported: 2010-04-06 17:01 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2010-11-08 22:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
python abi 2 patch (index.html.1,9.73 KB, patch)
2010-06-03 13:50 UTC, Michael Weber (RETIRED)
Details | Diff
second attempt to prevent it from failing against python 3 (gnome-menus-2.30.0.ebuild.patch,1.13 KB, patch)
2010-06-03 20:05 UTC, Michael Weber (RETIRED)
Details | Diff
second attempt to prevent it from failing against python 3 (gnome-menus-2.30.0.ebuild.patch,1.13 KB, patch)
2010-06-03 20:07 UTC, Michael Weber (RETIRED)
Details | Diff
gnome-menus.patch (gnome-menus.patch,3.21 KB, patch)
2010-06-16 01:34 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-06 17:01:54 UTC
- If this package can be used as a library and installs Python modules
  (*.so or *.py) into site-packages directories, then consider supporting
  installation for multiple Python versions.
  Please read section "Types of packages" in documentation [1] to decide
  if this package can support installation for multiple Python versions.

- Ensure that the ebuilds do not use deprecated functions or variables.

- Please check if Python 3 is supported by this package. You can temporarily
  set Python 3 as main active version of Python to properly test if this
  package supports Python 3.

- If this package does not support Python 3:
  - Specify dependency on Python 2.
    You can use PYTHON_DEPEND helper variable, which should be set before
    inheriting of python eclass.
    Please read section "Specification of dependency on Python" in
    documentation [1].

  - If this package cannot support installation for multiple versions of
    Python, then set active version of Python using
    python_set_active_version().

  - Ensure that shebangs in installed scripts specify correct version of
    Python. If shebangs are too generic (e.g. '#!/usr/bin/python'), then you
    can use python_convert_shebangs() to convert shebangs.
    (Wrapper scripts generated by python_generate_wrapper_scripts() do not
    require any changes.)
    Please read section "Shebangs in installed scripts" in documentation [1].

  - To ensure that changes applied to the ebuilds are sufficient, please
    temporarily set Python 3 as main active version of Python and test if
    this package can be properly installed and if it works at run time.

Please see documentation [1] for more details.
[1] http://www.gentoo.org/proj/en/Python/developersguide.xml
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-06-03 13:50:51 UTC
Created attachment 233973 [details, diff]
python abi 2 patch

this also affects 2.30.0 from the gnome overlay.
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-03 13:53:47 UTC
Comment on attachment 233973 [details, diff]
python abi 2 patch

You cannot call use() function in global scope.
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-06-03 15:49:35 UTC
(In reply to comment #2)
> (From update of attachment 233973 [details, diff])
> You cannot call use() function in global scope.
> 

the provide a patch by yourself instead of snide responses ...
Comment 4 Michael Weber (RETIRED) gentoo-dev 2010-06-03 20:05:44 UTC
Created attachment 234031 [details, diff]
second attempt to prevent it from failing against python 3
Comment 5 Michael Weber (RETIRED) gentoo-dev 2010-06-03 20:07:57 UTC
Created attachment 234033 [details, diff]
second attempt to prevent it from failing against python 3
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-16 01:34:45 UTC
Created attachment 235501 [details, diff]
gnome-menus.patch

This patch only removes deprecation warnings and fixes calls to python_mod_cleanup(). pkg_postrm() is executed with values of USE flags of previously installed ebuild. python_mod_cleanup() will trigger call to die(), when Python isn't installed. python_get_sitedir() in pkg_postrm() after calling python_mod_optimize() in pkg_postinst() prints path to site-packages directory of this version of Python, which was locally active in previously installed ebuild at the time when pkg_postinst() was run.

I will commit this patch, if you don't object in 1 week.
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-23 14:55:45 UTC
Comment on attachment 235501 [details, diff]
gnome-menus.patch

Committed.
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-24 15:47:58 UTC
*** Bug 325359 has been marked as a duplicate of this bug. ***
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-11-08 22:11:16 UTC
+  08 Nov 2010; Gilles Dartiguelongue <eva@gentoo.org>
+  -gnome-menus-2.26.2.ebuild, -gnome-menus-2.28.0.1.ebuild,
+  gnome-menus-2.30.4.ebuild:
+  Support mulitple-python installations, bug #313447. Clean up old
+  revisions.

Should be fine now. Thanks for reporting.