Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312183 - dev-libs/gobject-introspection: Verify and potentially improve Python-related code
Summary: dev-libs/gobject-introspection: Verify and potentially improve Python-related...
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
Depends on:
Blocks: 308257 313471
  Show dependency tree
 
Reported: 2010-03-30 19:37 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2010-11-02 20:00 UTC (History)
1 user (show)

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


Attachments
restrict python 3 abi (gobject-introspection-0.6.9.ebuild.diff,644 bytes, patch)
2010-06-03 12:38 UTC, Michael Weber (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-03-30 19:37:39 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 12:38:59 UTC
Created attachment 233959 [details, diff]
restrict python 3 abi

Patch works agains 0.6.9 (latest in tree). I've updated my bump at
http://svn.xmw.de/websvn/gentoo-overlay/dev-libs/gobject-introspection/
too. Please consider adding it for gnome-shell-2.31.1

The Error was:

checking for headers required to compile python extensions...   File "<string>", line 1
    import sys; print sys.prefix
                        ^
SyntaxError: invalid syntax
  File "<string>", line 1
    import sys; print sys.exec_prefix
                        ^
SyntaxError: invalid syntax
not found
configure: error: Python headers not found
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-03 13:51:28 UTC
Comment on attachment 233959 [details, diff]
restrict python 3 abi

RESTRICT_PYTHON_ABIS variable has any meaning only in ebuilds supporting installation for multiple Python ABIs (e.g. 2.6 and 2.7) simultaneously.
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-06-03 20:16:04 UTC
Ok, thenn it's just

--- gobject-introspection-0.6.9.ebuild	2010-03-19 15:15:08.000000000 +0100
+++ gobject-introspection-0.6.9.ebuild.new	2010-06-03 22:14:18.000000000 +0200
@@ -4,6 +4,8 @@
 
 EAPI="2"
 
+PYTHON_DEPEND="2:2.5"
+
 inherit python gnome2
 
 DESCRIPTION="Introspection infrastructure for gobject library bindings"
@@ -15,7 +17,6 @@
 IUSE="doc"
 
 RDEPEND=">=dev-libs/glib-2.19.0
-	>=dev-lang/python-2.5
 	virtual/libffi"
 DEPEND="${RDEPEND}
 	doc? ( >=dev-util/gtk-doc-1.12 )
@@ -30,6 +31,8 @@
 
 	# Don't pre-compile .py
 	ln -sf $(type -P true) py-compile
+
+	python_set_active_version 2
 }
 
 pkg_postinst() {
Comment 4 Michael Weber (RETIRED) gentoo-dev 2010-06-05 23:06:46 UTC
plus a shebang switch on the g-ir-scanner

@ -35,6 +35,11 @@
        python_set_active_version 2
 }
 
+src_install() {
+       gnome2_src_install
+       python_convert_shebangs -r 2 "${D}"
+}
+
 pkg_postinst() {
        python_mod_optimize /usr/$(get_libdir)/${PN}/giscanner
        python_need_rebuild
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-11-02 19:59:38 UTC
*gobject-introspection-0.9.12 (13 Oct 2010)

  13 Oct 2010; Gilles Dartiguelongue <eva@gentoo.org>
  +gobject-introspection-0.9.12.ebuild:
  Version bump. More multi ABI python changes.

*gobject-introspection-0.9.10 (02 Oct 2010)
*gobject-introspection-0.9.0-r1 (02 Oct 2010)

  02 Oct 2010; Gilles Dartiguelongue <eva@gentoo.org>
  -gobject-introspection-0.6.9.ebuild,
  +gobject-introspection-0.9.0-r1.ebuild,
  +files/gobject-introspection-0.9.0-python27.patch,
  +gobject-introspection-0.9.10.ebuild:
  Version bump. Fix build with python 2.7, bug #327759. Install
  documentation with USE=doc, bug #335110.


should be fine now.