Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513266 - dev-python/pycxx-6.2.6 does nonsense install_data subst that breaks PyPy
Summary: dev-python/pycxx-6.2.6 does nonsense install_data subst that breaks PyPy
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-15 00:32 UTC by Patrick Lauer
Modified: 2016-06-10 18:39 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2014-06-15 00:32:51 UTC
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_pypy/usr/lib64/pypy/include
copying CXX/Python2/Config.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/CxxDebug.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/Exception.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/ExtensionModule.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/ExtensionOldType.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/Extensions.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/ExtensionType.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/ExtensionTypeBase.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/IndirectPythonInterface.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/Objects.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Python2/PythonType.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/Version.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
copying CXX/WrapPython.h -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/include
running install_data
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_pypy/usr/lib64/pypy/share
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_pypy/usr/lib64/pypy/share/python2.7
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_pypy/usr/lib64/pypy/share/python2.7/CXX
copying Src/Python2/cxx_extensions.cxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/share/python2.7/CXX
copying Src/Python2/cxxsupport.cxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/share/python2.7/CXX
copying Src/Python2/cxxextensions.c -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/share/python2.7/CXX
copying Src/IndirectPythonInterface.cxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/share/python2.7/CXX
running install_egg_info
Writing /var/tmp/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/site-packages/CXX-6.2.4-py2.7.egg-info
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_python3.3/usr/include
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_python3.3/usr/include/python3.3
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/Config.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/CxxDebug.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/Exception.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/ExtensionModule.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/ExtensionOldType.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/Extensions.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/ExtensionType.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/ExtensionTypeBase.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/IndirectPythonInterface.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/Objects.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Python3/PythonType.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/Version.hxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
copying CXX/WrapPython.h -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/include/python3.3/CXX
running install_data
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_python3.3/usr/share
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_python3.3/usr/share/python3.3
creating /var/tmp/portage/dev-python/pycxx-6.2.5/image/_python3.3/usr/share/python3.3/CXX
copying Src/Python3/cxx_extensions.cxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/share/python3.3/CXX
copying Src/Python3/cxxsupport.cxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/share/python3.3/CXX
copying Src/Python3/cxxextensions.c -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/share/python3.3/CXX
copying Src/IndirectPythonInterface.cxx -> /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/share/python3.3/CXX
running install_egg_info
Writing /var/tmp/portage/dev-python/pycxx-6.2.5/image//_python3.3/usr/lib64/python3.3/site-packages/CXX-6.2.4-py3.3.egg-info
 * ERROR: dev-python/pycxx-6.2.5::gentoo failed (install phase):
 *   Package installs 'share' in PyPy prefix, see bug #465546.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2014-06-15 16:39:10 UTC
Any fix for this?
Comment 2 Mike Gilbert gentoo-dev 2014-06-15 16:45:10 UTC
Not at the moment. See bug 465546.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-15 18:43:51 UTC
(In reply to Justin Lecher from comment #1)
> Any fix for this?

Suggested solution: remove pypy from PYTHON_COMPAT until it is made really working.
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2014-07-03 02:43:12 UTC
(In reply to Justin Lecher from comment #1)
> Any fix for this?

Yes


~/cvsPortage/gentoo-x86/dev-python/pycxx $ ebuild pycxx-6.2.5.ebuild clean install

yields

------------------------------------------------------
running install_egg_info
Writing /mnt/gen2/TmpDir/portage/dev-python/pycxx-6.2.5/image//_pypy/usr/lib64/pypy/site-packages/CXX-6.2.4-py2.7.egg-info
bad share folder removed for now
 * python2_7: running distutils-r1_run_phase python_install_all
>>> Completed installing pycxx-6.2.5 into /mnt/gen2/TmpDir/portage/dev-python/pycxx-6.2.5/image/

ecompressdir: bzip2 -9 /usr/share/doc

So; I have made a one line adjustment to the distutils-r1 eclass. The "bad share folder removed for now" is (ofc.) a temp msg to mark the action.
At this point;
- I have edited installed pypy files, 2 of them, each with the same one line edit.
- Rationale: It takes 160 min. to build and install a pypy.
- It's simply a case of re-assigning the apt var.
- The apt var however is repeated a few times in the source files, therefore
- currently the pypy still installs the unwanted {base}/share as well as the content thereof into the desired /usr/share.

Meaning a patch with what I have would 'work' but it's simply a case of tracking the other files that also set {base} or $base and re-assigning them to make it comprehensive and elegant
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-10 18:27:22 UTC
So it's not exactly PyPy's fault.

The setup.py does:

    def finalize_options (self):                                                 
        if not self.install_data or (len(self.install_data) < 8) :               
            self.install_data = "$base/share/python$py_version_short"            
        install.finalize_options (self)


I'm not going to comment on the length check idea though I probably should really take a hammer to help the explanation. But the exact problem is that it uses the $base that specifically does not mean what they it does. Furthermore, if we fixed it, it would still have collisions because of the 'python$py_version_short' collisions.

Those files should really end up somewhere in site-packages.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-10 18:39:32 UTC
So, the only revdep of pycxx is pysvn, and it doesn't have pypy support enabled. And that's probably because it won't work since pysvn is unable to find pycxx includes. Which is because pycxx never supported pypy even though Ian tried hard to force keeping it in even though it never worked.


commit 4f6961452baf934870733711315469cb895c1694
Author: Michał Górny <mgorny@gentoo.org>
Date:   Fri Jun 10 20:33:29 2016

    dev-python/pycxx: Disable known-broken PyPy support, #513266


As far as I'm concerned, this concludes the issue at hand. If someone cares, it would be good idea to preach upstream on how stupid their code is and how bad it is to redefine datadir like this and to install C++ files into /usr/share.