Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 466302 - dev-python/wxpython-2.8.12.1-r1 - mv: cannot stat ‘.../image//usr/lib64/python2.7/site-packages/wxversion.*’: No such file or directory
Summary: dev-python/wxpython-2.8.12.1-r1 - mv: cannot stat ‘.../image//usr/lib64/pytho...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 465402
  Show dependency tree
 
Reported: 2013-04-18 00:33 UTC by rottingdead
Modified: 2013-12-02 13:13 UTC (History)
4 users (show)

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


Attachments
Compile Error - wxversion : no such file or directory (build.log,292.36 KB, text/plain)
2013-04-18 00:33 UTC, rottingdead
Details
Trigger EGGinfo only by bdist_egg (0001-Trigger-EGGing-mode-only-by-bdist_egg-and-not-egg_in.patch,1.12 KB, patch)
2013-04-22 16:20 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rottingdead 2013-04-18 00:33:23 UTC
Created attachment 345842 [details]
Compile Error - wxversion : no such file or directory

There appears to be a compile error in wxpython:2.8, I've tried numerous times, and numerous things, even went into #gentoo IRC, still to no avail, not sure if it's an ebuild issue, or bug in the package. It's saying something about wxversion no such file or directory, I've included my build.log as an attachment below.
Comment 1 rottingdead 2013-04-18 00:34:30 UTC
emerge --info wxpython:2.8
Password: 
Portage 2.1.11.62 (default/linux/amd64/13.0/desktop/kde, gcc-4.6.3, glibc-2.17, 3.8.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.8.6-gentoo-x86_64-Pentium-R-_Dual-Core_CPU_E5400_@_2.70GHz-with-gentoo-2.1
KiB Mem:     8178916 total,   4824832 free
KiB Swap:    5242876 total,   5242876 free
Timestamp of tree: Wed, 17 Apr 2013 03:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p37
dev-lang/python:          2.6.8-r1, 2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://lug.mtu.edu/gentoo http://lug.mtu.edu/gentoo ftp://lug.mtu.edu/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 android apng aspell bazaar berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli cmake consolekit cracklib crypt cups cvs cxx dbus declarative dri dts dvd dvdr egl emboss encode examples exif extras fam fbcondecor ffmpeg firefox flac fortran gdbm gflags gif git gpm gps gsm gstreamer gtk gudev hwdb iconv imlib ipv6 jack jpeg jpg kde keymap kipi lame lcms ldap libkms libnotify libsamplerate lzma mad madde mercurial minizip mmx mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl ogg openal opengl openmp openvg orbit osmesa pam pango pcre pdf perl phonon plasma png policykit ppds python python3 qt3support qt4 readline ruby script sdl semantic-desktop session speex spell sql sqlite sse sse2 ssl startup-notification static-libs subversion svg tcpd theora tiff truetype udev udisks unicode upower usb valgrind vim-syntax vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de nl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 rottingdead 2013-04-18 14:36:14 UTC
Sorry, I didn't know where to put it, I found Gentoo - Linux fitting, is this a bug, or was I missing something after all? I reinstalled wxGTK multiple times, and still got the same error.
Comment 3 rottingdead 2013-04-18 14:38:33 UTC
(In reply to comment #2)
> Sorry, I didn't know where to put it, I found Gentoo - Linux fitting, is
> this a bug, or was I missing something after all? I reinstalled wxGTK
> multiple times, and still got the same error.

Erm, I also reinstalled python:2.7 numerous times as well, even ran python-updater, and perl-cleaner --all(As an educated guess).
Comment 4 cmuelle8 2013-04-18 18:59:21 UTC
same issue here 


running install_egg_info
Copying /var/tmp/paludis/dev-python-wxpython-2.8.12.1-r1/work/wxPython-src-2.8.12.1/wxPython-python2_7/build/wxPython.egg-info to /var/tmp/paludis/dev-python-wxpython-2.8.12.1-r1/image//_python2.7/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode/wxPython-2.8.12.1-py2.7.egg-info
warning: wx_install: path file '/var/tmp/paludis/dev-python-wxpython-2.8.12.1-r1/image//_python2.7/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode.pth' not created

mv: cannot stat '/var/tmp/paludis/dev-python-wxpython-2.8.12.1-r1/image//usr/lib64/python2.7/site-packages/wxversion.*': No such file or directory



looks as if 
    for file in "${D}$(python_get_sitedir)"/wx{version.*,.pth}; do
        mv "${file}" "${file}-${SLOT}" || die
    done

does not work as intended, e.g. $(python_get_sitedir) seems to result in an "" empty string, when it should result in "_python2.7" for the example given
Comment 5 cmuelle8 2013-04-18 19:11:22 UTC
(In reply to comment #4)
> does not work as intended, e.g. $(python_get_sitedir) seems to result in an
> "" empty string, when it should result in "_python2.7" for the example given

ok, it should be something along

  ${D}/_${EPYTHON}/$(python_get_sitedir)"/wx{version.*,.pth}

deductible from distutils-r1.eclass' distutils-r1_python_install function..  There is probably more than one line in the ebuild that needs this path usage fixed..
Comment 6 cmuelle8 2013-04-19 03:21:57 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > does not work as intended, e.g. $(python_get_sitedir) seems to result in an
> > "" empty string, when it should result in "_python2.7" for the example given
> 
> ok, it should be something along
> 
>   ${D}/_${EPYTHON}/$(python_get_sitedir)"/wx{version.*,.pth}
> 
> deductible from distutils-r1.eclass' distutils-r1_python_install function.. 
> There is probably more than one line in the ebuild that needs this path
> usage fixed..

I correct myself, the following patch install the needed files, but there is more to fix (no usr/bin files are installed to image).  distutils-r1_python_install does not install all files needed, maybe "--build-purelib" is too sparse..

--- wxpython-2.8.12.1-r1.ebuild.orig    2013-04-19 05:17:33.000000000 +0200
+++ wxpython-2.8.12.1-r1.ebuild 2013-04-19 05:06:02.000000000 +0200
@@ -95,6 +95,10 @@
        distutils-r1_python_install \
                build --build-purelib "${BUILD_DIR}"/lib.common
 
+       insinto "$(python_get_sitedir)"
+       doins "${BUILD_DIR}"/../wxversion/wxversion.*
+       doins "${BUILD_DIR}"/../src/wx.pth
+
        # adjust the filenames for wxPython slots.
        local file
        for file in "${D}$(python_get_sitedir)"/wx{version.*,.pth}; do
Comment 7 rottingdead 2013-04-19 03:45:27 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > does not work as intended, e.g. $(python_get_sitedir) seems to result in an
> > > "" empty string, when it should result in "_python2.7" for the example given
> > 
> > ok, it should be something along
> > 
> >   ${D}/_${EPYTHON}/$(python_get_sitedir)"/wx{version.*,.pth}
> > 
> > deductible from distutils-r1.eclass' distutils-r1_python_install function.. 
> > There is probably more than one line in the ebuild that needs this path
> > usage fixed..
> 
> I correct myself, the following patch install the needed files, but there is
> more to fix (no usr/bin files are installed to image). 
> distutils-r1_python_install does not install all files needed, maybe
> "--build-purelib" is too sparse..
> 
> --- wxpython-2.8.12.1-r1.ebuild.orig    2013-04-19 05:17:33.000000000 +0200
> +++ wxpython-2.8.12.1-r1.ebuild 2013-04-19 05:06:02.000000000 +0200
> @@ -95,6 +95,10 @@
>         distutils-r1_python_install \
>                 build --build-purelib "${BUILD_DIR}"/lib.common
>  
> +       insinto "$(python_get_sitedir)"
> +       doins "${BUILD_DIR}"/../wxversion/wxversion.*
> +       doins "${BUILD_DIR}"/../src/wx.pth
> +
>         # adjust the filenames for wxPython slots.
>         local file
>         for file in "${D}$(python_get_sitedir)"/wx{version.*,.pth}; do

Hmm, sorry, are you a developer or ebuild maintainer? Because I'm really confused as to what you're saying, if you can fix this, or what's going on here? I don't know anything about Python, so I can't fix it myself.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-19 12:39:58 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > does not work as intended, e.g. $(python_get_sitedir) seems to result in an
> > "" empty string, when it should result in "_python2.7" for the example given
> 
> ok, it should be something along
> 
>   ${D}/_${EPYTHON}/$(python_get_sitedir)"/wx{version.*,.pth}
> 
> deductible from distutils-r1.eclass' distutils-r1_python_install function.. 
> There is probably more than one line in the ebuild that needs this path
> usage fixed..

If you deduce from function, read it all. Or just read the docs. The files are moved from '_${EPYTHON}' back to ${D} before the function returns.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-22 15:44:23 UTC
Ok, I nailed it down.

The reason for the issue is that we pass 'egg_info' to enforce a location for storing egg-info. As a side effect, egg files creation is called explicitly (but in fact, they are created anyway).

The problem is that wxPython has very hacky setup.py. In config.py you can see:

  EGGing = 'bdist_egg' in sys.argv or 'egg_info' in sys.argv

which is triggered by our command-line and disables installing scripts and the symlinks.

Curious enough, I can't reproduce the issue with 2.9. This is because the following poor man's code is being used in 2.9:

  # EXPERIMENTAL Egg support...
  try:
    import ez_setup
    ez_setup.use_setuptools()
    from setuptools import setup, Extension
  except ImportError:
    print "Setuptools must be installed to build an egg"
    sys.exit(1)

since there's no ez_setup, the code raises an ImportError early and egg_info command is not available. The relevat snippet in 2.8 doesn't have the ez_setup part at all and that's why the code works.

The question remains: what do we want to do about it? This is somehow a bug in the build system, and a double one in 2.9.

I can comment out the egg_info part in the eclass for now, or since it settled already, we can hack wxPython to behave properly. We could also try fixing this upstream but I have serious doubts whether they would listen.

Dropping the:

  or 'egg_info' in sys.argv

part should be sufficient. Maybe it should even be upstreamable, since egg-build is rather intended with 'bdist_egg' or specific use of 'install', I think.
Comment 10 Mike Gilbert gentoo-dev 2013-04-22 15:52:40 UTC
(In reply to comment #9)

Nice work.

Lets start by modifying setup.py to work with the explicit egg_info command. If upstream does not want to accept the change, then we might just end up carrying a small patch.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-04-22 16:20:01 UTC
Created attachment 346306 [details, diff]
Trigger EGGinfo only by bdist_egg

I have just committed the attached patch to the tree. Please test it, and we'll try to upstream it then.
Comment 12 rottingdead 2013-04-22 16:58:10 UTC
Thanks to all who fixed this issue, and quick responses, so problem should be solved for now?
Comment 13 rottingdead 2013-04-23 14:42:44 UTC
thanks guys, the problem is fixed now.
Comment 14 cmuelle8 2013-05-08 02:55:10 UTC
(In reply to comment #8)
> If you deduce from function, read it all. Or just read the docs. The files
> are moved from '_${EPYTHON}' back to ${D} before the function returns.

Yeah, I knew, see comment #6.
Thanks for great digging and the proper fix.
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-02 13:13:36 UTC
Marking as fixed then.

Just FYI, we no longer pass egg_info there, so we don't need the fix anymore.