Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312211 - dev-perl/Inline-Python: Verify and potentially improve Python-related code
Summary: dev-perl/Inline-Python: 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: Gentoo Perl team
URL:
Whiteboard:
Keywords:
: 358191 (view as bug list)
Depends on:
Blocks: 308257
  Show dependency tree
 
Reported: 2010-03-30 19:45 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2014-12-10 23:42 UTC (History)
2 users (show)

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


Attachments
Inline-Python.diff (Inline-Python.diff,228 bytes, text/plain)
2010-04-29 16:21 UTC, David Abbott (RETIRED)
Details
Inline-Python.diff (Inline-Python.diff,449 bytes, text/plain)
2010-04-29 18:58 UTC, David Abbott (RETIRED)
Details
Inline-Python-0.35-r1.ebuild (Inline-Python-0.35-r1.ebuild,628 bytes, text/plain)
2010-05-02 19:18 UTC, David Abbott (RETIRED)
Details

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:45: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 David Abbott (RETIRED) gentoo-dev 2010-04-29 16:20:31 UTC
Program uses old style print function;
Using /usr/bin/python
  File "<string>", line 1
    import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBS')
                                              ^
SyntaxError: invalid syntax
  File "<string>", line 1
    import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY')
                                              ^
SyntaxError: invalid syntax
  File "<string>", line 1
    import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')
                                              ^
SyntaxError: invalid syntax
  File "<string>", line 1
    import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBRARY')
                                              ^
SyntaxError: invalid syntax


Comment 2 David Abbott (RETIRED) gentoo-dev 2010-04-29 16:21:21 UTC
Created attachment 229701 [details]
Inline-Python.diff

# Dependency on any version of Python 2.
PYTHON_DEPEND="2"
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-29 17:17:34 UTC
The ebuild should also ensure that this package uses Python 2 at build time and at run time, even when Python 3 is set as main active version of Python.
Comment 4 David Abbott (RETIRED) gentoo-dev 2010-04-29 17:56:36 UTC
(In reply to comment #3)
> The ebuild should also ensure that this package uses Python 2 at build time and
> at run time, even when Python 3 is set as main active version of Python.
> 
So add this before 'inherit'.;

RESTRICT_PYTHON_ABIS="3.*"
Comment 5 David Abbott (RETIRED) gentoo-dev 2010-04-29 18:58:30 UTC
Created attachment 229723 [details]
Inline-Python.diff

Ok got it to work even when Python 3 is set as main active version of Python.
How is this?
Comment 6 David Abbott (RETIRED) gentoo-dev 2010-05-02 19:18:41 UTC
Created attachment 230077 [details]
Inline-Python-0.35-r1.ebuild

Updated ebuild, did not work with python-2.4 or 3.*
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-03 16:30:51 UTC
(In reply to comment #6)

RESTRICT_PYTHON_ABIS affects only packages supporting installation for multiple Python ABIs simultaneously (e.g. 2.6 and 2.7).
Comment 8 Torsten Veller (RETIRED) gentoo-dev 2011-03-11 11:07:15 UTC
@python:

feel free to fix Inline-Python.

> <http://search.cpan.org/~nine/Inline-Python-0.39/Python.pod#SUPPORTED_PLATFORMS>:
> This version of Inline::Python has been tested with Python versions from 2.5 to
> 2.7. It may work on older versions but will almost certainly not work with
> Python 3.
Comment 9 Torsten Veller (RETIRED) gentoo-dev 2011-03-11 11:09:20 UTC
*** Bug 358191 has been marked as a duplicate of this bug. ***
Comment 10 Ian Delaney (RETIRED) gentoo-dev 2011-11-28 14:18:11 UTC
This is a tiny package, not run time python dep.  emerges on python{2 && 3}. Don't think it needs anything more other than >=dev-lang/python-2.4, don't see import python is really needed, other than a created Python.so
Comment 11 Andreas K. Hüttel archtester gentoo-dev 2014-12-10 23:42:32 UTC
Fixed in Inline-Python-0.460.0