Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 313503 - media-gfx/inkscape: Verify and potentially improve Python-related code
Summary: media-gfx/inkscape: 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 Graphics Project
URL:
Whiteboard:
Keywords:
Depends on: 223067
Blocks: 308257
  Show dependency tree
 
Reported: 2010-04-06 17:29 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2013-05-03 22:12 UTC (History)
1 user (show)

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


Attachments
ebuild patch (inkscape.patch,724 bytes, text/plain)
2011-11-15 17:17 UTC, Ian Delaney (RETIRED)
Details
revised ebuild patch (inkscape.patch,749 bytes, patch)
2011-11-17 02:10 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (inkscape.patch,1.11 KB, patch)
2011-11-18 14:47 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (inkscape.patch,1.11 KB, patch)
2011-11-21 13:28 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (inkscape.patch,1.17 KB, patch)
2011-11-24 22:04 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (inkscape.patch,1.16 KB, patch)
2011-11-26 10:48 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (inkscape.patch,1.17 KB, patch)
2011-11-28 01:56 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-04-06 17:29:23 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 Samuli Suominen (RETIRED) gentoo-dev 2010-04-16 10:56:29 UTC
Arfrever, notice also bug 223067... Patches are accepted, but otherwise this is a very low priority to the graphics team, sorry.
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2011-11-15 17:17:57 UTC
Created attachment 292655 [details]
ebuild patch

supports most all python versions.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2011-11-16 19:09:40 UTC
(In reply to comment #2)

This package doesn't support Python 3.
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2011-11-17 02:10:14 UTC
Created attachment 292839 [details, diff]
revised ebuild patch
Comment 5 Arfrever Frehtes Taifersar Arahesis 2011-11-18 01:29:16 UTC
(In reply to comment #4)

Delete '|| ( dev-lang/python[xml] dev-python/pyxml )' from COMMON_DEPEND.

Call 'python_set_active_version 2' before 'python_pkg_setup'.
Comment 6 Arfrever Frehtes Taifersar Arahesis 2011-11-18 01:30:49 UTC
python_mod_optimize() and python_mod_cleanup() should be called. See bug #223067.
Comment 7 Ian Delaney (RETIRED) gentoo-dev 2011-11-18 14:47:13 UTC
Created attachment 292993 [details, diff]
revised ebuild patch

thx Arfrever
Comment 8 Arfrever Frehtes Taifersar Arahesis 2011-11-20 03:30:19 UTC
(In reply to comment #7)

Use PYTHON_DEPEND="2".

src_postint() and src_postrm() functions are not used by package managers. You should define pkg_postinst() and pkg_postrm().

python_mod_optimize() and python_mod_cleanup() require at least 1 argument.
Comment 9 Ian Delaney (RETIRED) gentoo-dev 2011-11-21 13:28:52 UTC
Created attachment 293307 [details, diff]
revised ebuild patch
Comment 10 Ian Delaney (RETIRED) gentoo-dev 2011-11-21 13:44:01 UTC
hmm, a correction again.

pkg_postrm() {
        python_mod_cleanup "${ED}"

}
remove arg "-r"
Comment 11 Arfrever Frehtes Taifersar Arahesis 2011-11-23 17:42:40 UTC
(In reply to comment #9 and comment #10)

PYTHON_DEPEND="2"
python_mod_optimize() and python_mod_cleanup() require paths to Python modules, relative to "${EROOT%/}" or site-packages directories.
Comment 12 Ian Delaney (RETIRED) gentoo-dev 2011-11-24 22:04:56 UTC
Created attachment 293665 [details, diff]
revised ebuild patch
Comment 13 Arfrever Frehtes Taifersar Arahesis 2011-11-25 21:22:58 UTC
(In reply to comment #12)

Re-read comment #11.
Comment 14 Ian Delaney (RETIRED) gentoo-dev 2011-11-26 10:48:50 UTC
Created attachment 293809 [details, diff]
revised ebuild patch

sorry, missed it
Comment 15 Arfrever Frehtes Taifersar Arahesis 2011-11-27 18:12:23 UTC
(In reply to comment #14)

The second suggestion from comment #11 means:

pkg_postint() {
	python_mod_optimize /usr/share/${PN}-extensions
}

pkg_postrm() {
	python_mod_cleanup /usr/share/${PN}-extensions
}
Comment 16 Ian Delaney (RETIRED) gentoo-dev 2011-11-28 01:56:20 UTC
Created attachment 294015 [details, diff]
revised ebuild patch

got caught out by my own typo, - in place of /. anyway this works
Comment 17 Tim Harder gentoo-dev 2013-05-03 22:12:10 UTC
Python related stuff should be fine in 0.48.4-r1 now.