Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 326113 - dev-util/radare: Verify and potentially improve Python-related code
Summary: dev-util/radare: Verify and potentially improve Python-related code
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on: 297040
Blocks: 308257
  Show dependency tree
 
Reported: 2010-06-29 07:07 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2012-04-23 18:25 UTC (History)
2 users (show)

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


Attachments
the build log (adare.patch,1.00 KB, patch)
2011-11-13 23:14 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (radare.patch,1.04 KB, patch)
2011-11-21 16:12 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (radare.patch,1.65 KB, patch)
2011-11-26 14:55 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (radare.patch,2.51 KB, patch)
2011-11-28 01:54 UTC, Ian Delaney (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-06-29 07:07:03 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 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-15 12:01:38 UTC

*** This bug has been marked as a duplicate of bug 297040 ***
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-15 15:19:44 UTC
It's a different bug.
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2011-11-13 23:14:35 UTC
Created attachment 292441 [details, diff]
the build log

Tested, works with python 2 && 3
Comment 4 Arfrever Frehtes Taifersar Arahesis 2011-11-14 19:17:39 UTC
(In reply to comment #3)

PYTHON_DEPEND="2"
python.eclass should be inherited.
Such pkg_setup() is not needed.
This package doesn't install Python scripts, so python_convert_shebangs() is not needed.
python_mod_optimize() and python_mod_cleanup() should be used.

Build system of this package hardcodes installation for Python 2.5 and 2.6. It should be fixed to respect active version of Python.
Comment 5 Ian Delaney (RETIRED) gentoo-dev 2011-11-19 12:32:41 UTC
you got me on this one.  You will have to explain this further; irc.
Arfrever prompts

PYTHON_DEPEND="2"
then 
package hardcodes installation for Python 2.5 and 2.6; It
should be fixed to respect active version of Python;   beckons
PYTHON_DEPEND="2:2.5:2.6"
Respect I see to mean leave it as it is and adjust.  But it it's 2.4 or a 3.x, it needs 
 python_set_active_version 2
which goes in pkg_setup, 
"Such pkg_setup() is not needed"

This is like an emerge package conflict, something has to give.
Comment 6 Arfrever Frehtes Taifersar Arahesis 2011-11-20 06:50:03 UTC
(In reply to comment #5)

"Such pkg_setup()" means 'pkg_setup() { python_pkg_setup; }'. If you need to call also something else in pkg_setup(), then pkg_setup() is needed.
Example:
pkg_setup() {
	python_set_active_version 2
	python_pkg_setup
}
Comment 7 Ian Delaney (RETIRED) gentoo-dev 2011-11-21 16:12:36 UTC
Created attachment 293335 [details, diff]
revised ebuild patch
Comment 8 Arfrever Frehtes Taifersar Arahesis 2011-11-23 19:53:11 UTC
(In reply to comment #7)

PYTHON_DEPEND="2"
python.eclass should be inherited.
This package doesn't install Python scripts, so python_convert_shebangs() is
not needed.
python_mod_optimize() and python_mod_cleanup() should be used.

Build system of this package hardcodes installation for Python 2.5 and 2.6. It
should be fixed to respect active version of Python.
Comment 9 Ian Delaney (RETIRED) gentoo-dev 2011-11-26 14:55:01 UTC
Created attachment 293839 [details, diff]
revised ebuild patch

this works for me, not sure ,for you.
Comment 10 Arfrever Frehtes Taifersar Arahesis 2011-11-27 21:12:09 UTC
(In reply to comment #9)

"configure" contains:

check_library HAVE_LIB_PYTHON2_5 python2.5 0
check_library HAVE_LIB_PYTHON2_6 python2.6 0

Replace them:

sed \
	-e "s/check_library HAVE_LIB_PYTHON2_5 python2.5 0/check_library HAVE_LIB_PYTHON python 0/" \
	-e "/check_library HAVE_LIB_PYTHON2_6 python2.6 0/d" \
	-i configure

Fix src/plug/hack/Makefile to use HAVE_LIB_PYTHON and python.so. When calling emake, properly override variables from this Makefile (PY_CFLAGS, PY_LIBS).
Comment 11 Ian Delaney (RETIRED) gentoo-dev 2011-11-28 01:54:26 UTC
Created attachment 294013 [details, diff]
revised ebuild patch

this is as far as I can get with this.

Fix src/plug/hack/Makefile to use HAVE_LIB_PYTHON and python.so. When calling
emake, properly override variables from this Makefile (PY_CFLAGS, PY_LIBS).

override to me means trump, displace them all together.  In its current state it doesn't make a python.so, which I interpret it ought.  I think you mean change the values of PY_CFLAGS && PY_LIBS, really don't know
Comment 12 Pacho Ramos gentoo-dev 2012-04-23 18:25:06 UTC
dropped