Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 313545 - media-libs/pdflib: Verify and potentially improve Python-related code
Summary: media-libs/pdflib: Verify and potentially improve Python-related code
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: No maintainer - Look at if you want to take care of it
Depends on:
Blocks: 308257 355971
  Show dependency tree
Reported: 2010-04-06 17:44 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2011-04-28 15:43 UTC (History)
4 users (show)

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


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:44:08 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

  - 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.
Comment 1 David Abbott gentoo-dev 2010-05-01 01:40:30 UTC
Does not look to me like the Python Bindings are even installed into the Python Path. The bindings end up;

 qlist media-libs/pdflib

Python 3.1.2 (r312:79147, Apr 28 2010, 21:42:33) 
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib64/', '/usr/lib64/python3.1', '/usr/lib64/python3.1/plat-linux2', '/usr/lib64/python3.1/lib-dynload', '/usr/lib64/python3.1/site-packages', '/usr/lib64/portage/pym']
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-01-30 18:52:46 UTC
Wait - you changed only that so you could conveniently "fix" some python eclass, without fixing the other horrible python-related offences against kittens in the same ebuild, like the one pointed out in comment #1 /before/ you did that commit?

# ChangeLog for media-libs/pdflib
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/media-libs/pdflib/ChangeLog,v 1.104 2010/05/28 18:05:21 arfrever Exp $

  28 May 2010; Arfrever Frehtes Taifersar Arahesis <>
  Delete calls to deprecated python_version().

Index: pdflib-7.0.2_p8.ebuild
RCS file: /var/cvsroot/gentoo-x86/media-libs/pdflib/pdflib-7.0.2_p8.ebuild,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -B -r1.11 -r1.12
--- pdflib-7.0.2_p8.ebuild      30 Sep 2009 09:47:59 -0000      1.11
+++ pdflib-7.0.2_p8.ebuild      28 May 2010 18:05:21 -0000      1.12
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/pdflib/pdflib-7.0.2_p8.ebuild,v 1.11 2009/09/30 09:47:59 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/pdflib/pdflib-7.0.2_p8.ebuild,v 1.12 2010/05/28 18:05:21 arfrever Exp $
@@ -70,8 +70,7 @@
        use perl || myconf="${myconf} --with-perl=no"
        if use python ; then
-               python_version
-               myconf="${myconf} --with-py=/usr --with-pyincl=/usr/include/python${PYVER}"
+               myconf="${myconf} --with-py=/usr --with-pyincl=$(python_get_includedir)"
                myconf="${myconf} --with-py=no"
@@ -115,8 +114,7 @@
        # this should create the correct lib dirs for perl and python.
        if use python ; then
-               python_version
-               dodir /usr/$(get_libdir)/python${PYVER}/lib-dynload
+               dodir $(python_get_libdir)/lib-dynload
        if use perl ; then
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-01-30 19:55:57 UTC
My commit didn't refer to this bug.

(In reply to comment #2)
> in the same ebuild

I changed pdflib-7.0.2_p8.ebuild, while comment #1 is about pdflib-7.0.4_p4-r2.ebuild, which was never in the tree :).

Anyway, if maintainer is unable to fix this bug, then I can try to do it when I have time.
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2011-04-28 15:43:07 UTC
Removed from main tree.