Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312191 - dev-libs/libnatspec: Verify and potentially improve Python-related code
Summary: dev-libs/libnatspec: Verify and potentially improve Python-related code
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 308257
  Show dependency tree
 
Reported: 2010-03-30 19:40 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2015-08-14 06:17 UTC (History)
0 users

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


Attachments
ebuild patch (libnatspec.patch,1.36 KB, patch)
2011-11-13 14:57 UTC, Ian Delaney (RETIRED)
Details | Diff
libnatspec-0.2.6.ebuild.patch (libnatspec-0.2.6.ebuild.patch,1.89 KB, patch)
2011-11-14 18:56 UTC, Arfrever Frehtes Taifersar Arahesis
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-03-30 19:40:26 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 Ian Delaney (RETIRED) gentoo-dev 2011-11-13 14:57:15 UTC
Created attachment 292407 [details, diff]
ebuild patch

tested, emerges aok, good foy python 2&&3.  Usual EAPI bump 3.
Comment 2 SpanKY gentoo-dev 2011-11-13 16:40:06 UTC
Comment on attachment 292407 [details, diff]
ebuild patch

pretty sure this package works with more than just python-2.6

you wrote "kg_setup()" which means that func gets ignored

your src_install has commented/dead code in it

i don't see much point in declaring DOCS a global array variable unless the PM is taking care of it (i.e. EAPI=4)
Comment 3 Arfrever Frehtes Taifersar Arahesis 2011-11-14 18:55:47 UTC
PYTHON_DEPEND="*:2.6" means unconditional dependency on Python >=2.6, including 3.*.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2011-11-14 18:56:50 UTC
Created attachment 292547 [details, diff]
libnatspec-0.2.6.ebuild.patch

This patch adds support for installation for multiple Python ABIs.
Comment 5 SpanKY gentoo-dev 2011-11-14 19:58:34 UTC
this is way more complicated than it should be.  if this is "normal", the python.eclass needs a *lot* of work.
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2011-11-14 20:08:34 UTC
comment2
roger.

comment4.
roger.

comment5.
ehh, roger, that too.
Comment 7 Arfrever Frehtes Taifersar Arahesis 2011-11-14 20:10:40 UTC
(In reply to comment #5)

This is a standard solution for packages with autotools-based build system and optional installation of Python bindings.

Different packages require slightly different changes in ebuilds, so a generic solution for these packages in an eclass is rather not implementable.
E.g. dev-libs/libnatspec contains Python bindings in "${S}/src/python" directory, while dev-libs/xapian-bindings contains Python bindings in "${S}/python" directory. dev-libs/libnatspec uses PYTHON_INCLUDES variable (with initial "-I"), while dev-libs/xapian-bindings uses PYTHON_INC variable (without initial "-I").
Comment 8 SpanKY gentoo-dev 2011-11-18 21:19:12 UTC
(In reply to comment #7)

i know this is the current "standard solution".  my complaint is that python.eclass should not be crapping its guts all over ebuilds.  what libnatspec needs isn't exactly uncommon, so forcing duplication is undesirable.
Comment 9 Arfrever Frehtes Taifersar Arahesis 2011-11-19 01:41:10 UTC
python_execute_function() etc. is a standard public functionality, not any guts.
Comment 10 SpanKY gentoo-dev 2014-05-04 15:37:24 UTC
Comment on attachment 292547 [details, diff]
libnatspec-0.2.6.ebuild.patch

needs updating to a recent python eclass.  maybe the result will be reasonable.
Comment 11 SpanKY gentoo-dev 2015-08-14 06:17:11 UTC
the ebuild uses python-single-r1 now