Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312205 - dev-libs/syck: Verify and potentially improve Python-related code
Summary: dev-libs/syck: 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: Gentoo Perl team
: 359317 (view as bug list)
Depends on:
Blocks: 308257
  Show dependency tree
Reported: 2010-03-30 19:43 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2011-04-10 19:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---
dabbott: Bugday+

syck-0.55.ebuild.diff (syck-0.55.ebuild.diff,760 bytes, text/plain)
2010-04-29 18:47 UTC, David Abbott
syck-0.55-r5.ebuild (syck-0.55-r5.ebuild,1.14 KB, text/plain)
2010-05-07 23:42 UTC, David Abbott
EAPI-2 syck-0.55-r6.ebuild (syck-0.55-r6.ebuild,1.12 KB, text/plain)
2010-05-08 00:16 UTC, David Abbott
syck-0.55-r5.ebuild (syck-0.55-r5.ebuild,1.10 KB, text/plain)
2010-05-08 18:35 UTC, David Abbott
syck-0.55-r5.ebuild (syck-0.55-r5.ebuild,1.14 KB, text/plain)
2010-07-26 00:28 UTC, David Abbott

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:43:53 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-04-29 17:19:31 UTC
Fails with python 3;
pyext.c:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PyTypeObject'
pyext.c: In function 'syck_PyIntMaker':
pyext.c:33: warning: return makes pointer from integer without a cast
pyext.c: At top level:
pyext.c:47: warning: initialization from incompatible pointer type
pyext.c: In function 'py_syck_node_alloc':
pyext.c:56: error: 'SyckNodeType' undeclared (first use in this function)
pyext.c:56: error: (Each undeclared identifier is reported only once
pyext.c:56: error: for each function it appears in.)
pyext.c: In function 'py_syck_node_getattr':

Comment 2 David Abbott gentoo-dev 2010-04-29 18:47:27 UTC
Created attachment 229717 [details]

Ok got it to work even when Python 3 is set as main active version of Python.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-07 02:54:21 UTC
RESTRICT_PYTHON_ABIS is intended only for packages, which can be installed for e.g. both Python 2.6 and 2.7 simultaneously.
distutils.eclass inherits python.eclass.
PYTHON_DEPEND="python? 2" should be set before inherit().
Comment 4 David Abbott gentoo-dev 2010-05-07 23:42:52 UTC
Created attachment 230757 [details]
Comment 5 David Abbott gentoo-dev 2010-05-08 00:16:21 UTC
Created attachment 230759 [details]
EAPI-2 syck-0.55-r6.ebuild
Comment 6 David Abbott gentoo-dev 2010-05-08 18:35:58 UTC
Created attachment 230811 [details]

After reviewing some of arfrever's ebuilds and starting to understand the guide this is my latest :)
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-08 19:01:44 UTC
There can be: DEPEND="python? ( !dev-python/pysyck )"

python_set_active_version should be inside 'if use python; then ...; fi' block.
Comment 8 David Abbott gentoo-dev 2010-07-26 00:28:34 UTC
Created attachment 240165 [details]

Ok hope this is correct, seems to work as expected :)
Comment 9 Eric G 2011-03-18 15:51:44 UTC
Looks like we have two items to address.
1. The ebuild needs to be updated to require python 2.7
e.g. PYTHON_DEPEND="2:2.7"
2. Need a workaround to install this package on a machine that has been updated to python 3.x

Any ideas?
Comment 10 Torsten Veller (RETIRED) gentoo-dev 2011-03-25 09:32:46 UTC
*** Bug 359317 has been marked as a duplicate of this bug. ***
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-04-10 19:56:51 UTC
Fixed in dev-libs/syck-0.55-r4.