Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 311523 - app-misc/gramps: Verify and potentially improve Python-related code
Summary: app-misc/gramps: 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 normal (vote)
Assignee: Steve Dibb (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 308257
  Show dependency tree
 
Reported: 2010-03-26 21:30 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2010-04-08 15:27 UTC (History)
1 user (show)

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


Attachments

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-03-26 21:30:29 UTC
- If this package can be used as a library and installs Python modules
  (*.so or *.py) into directories specific to given versions of Python,
  then consider supporting installation for multiple Python versions.
  Please read section "Types of packages" in documentation [1].

- 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.

  - 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.)

  - 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 Christian Faulhammer (RETIRED) gentoo-dev 2010-04-07 15:15:46 UTC
For the record.  This is fixed in 3.2.0, which will be stabilised as soon as it is time for it.
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-07 21:02:46 UTC
Are you sure that it's fixed? app-misc/gramps-3.2.0 doesn't set active version of Python, but depends on e.g. dev-python/pygtk which doesn't support Python 3. I only see that calls to deprecated python_version() have been removed.
Comment 3 Christian Faulhammer (RETIRED) gentoo-dev 2010-04-07 22:16:02 UTC
(In reply to comment #2)
> Are you sure that it's fixed? app-misc/gramps-3.2.0 doesn't set active version
> of Python, but depends on e.g. dev-python/pygtk which doesn't support Python 3.
> I only see that calls to deprecated python_version() have been removed.

 There is no assumption on missing setting, I assume.  Reopen until I have time to test with Python 3.
Comment 4 Christian Faulhammer (RETIRED) gentoo-dev 2010-04-07 22:43:16 UTC
Does not work with Python 3, so setting a version of Python 2 as DEPEND.
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-08 01:00:58 UTC
Dependencies are now correct, but are you sure that app-misc/gramps-3.2.0 builds/installs correctly when a version of Python 3 is set as main active version of Python?

python_get_sitedir() (which is used in src_prepare()) prints e.g. "/usr/lib/python3.1/site-packages" when Python 3.1 is set as main active version of Python. Ebuilds can easily set active version of Python. In ebuilds not supporting installation for multiple Python ABIs, you should use python_set_active_version(). In ebuilds supporting installation for multiple Python ABIs, you should usually use python_execute_function(). python_set_active_version() and python_execute_function() are documented in documentation.
Comment 6 Christian Faulhammer (RETIRED) gentoo-dev 2010-04-08 07:26:19 UTC
So I got it right by setting the active version in pkg_setup only?  If yes, this bug should be finally fixed.
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-08 15:27:51 UTC
(In reply to comment #6)

It now looks good (but I haven't tested it).