Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 313417 - dev-python/compizconfig-python - pyrex is not a runtime dependency
Summary: dev-python/compizconfig-python - pyrex is not a runtime dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Desktop-Effects herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-06 15:21 UTC by m_zwart
Modified: 2010-09-05 00:15 UTC (History)
1 user (show)

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


Attachments
build system changes to remove pyrex dependency (compizconfig-python-0.8.4-disable-pyrex.patch,788 bytes, patch)
2010-04-06 15:22 UTC, m_zwart
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description m_zwart 2010-04-06 15:21:33 UTC
This is similar to bug 308503. There are two issues here:

compizconfig-python has an RDEPEND on pyrex. This is unnecessary: pyrex is a compile-time code generator without any runtime library or the like. If a pyrex dependency is kept it should be just a DEPEND, not an RDEPEND.

It is possible to remove the dependency completely, because the pyrex-generated C code is included in the tarball. The build process does not run pyrex. Unfortunately configure checks for pyrex and fails if it is not found. The attached patch removes that check and modifies the make rule that runs pyrex to fail unconditionally (so that if the build system somehow ends up calling pyrex anyway it will always fail instead of working on systems that happen to have pyrex installed). With this patch applied and an eautoreconf in src_prepare the pyrex dependency can be removed completely.

I've tested the Makefile change works by adding a "touch src/compizconfig.pyx" in src_prepare. This causes the build to fail as expected.

Reproducible: Always

Steps to Reproduce:
1. install compizconfig-python

Actual Results:  
pyrex gets installed.

Expected Results:  
pyrex does not get installed.

Portage 2.2_rc67 (default/linux/x86/10.0/desktop/gnome, gcc-4.4.3, glibc-2.11-r1, 2.6.32-19-generic i686)
=================================================================
System uname: Linux-2.6.32-19-generic-i686-AMD_Athlon-tm-_XP_2600+-with-gentoo-2.0.1
Timestamp of tree: Tue, 06 Apr 2010 11:45:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p2-r1
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r1, 3.1.2-r1
dev-python/pycrypto: 2.1.0
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA PUEL skype-eula"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-ggdb -O2 -fomit-frame-pointer -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-ggdb -O2 -fomit-frame-pointer -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests cached-virtuals candy ccache distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict test unmerge-logs unmerge-orphans userfetch verify-rdepend"
GENTOO_MIRRORS="http://gentoo.tiscali.nl/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_GB en_US nl fy fy_NL"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/cross /usr/local/portage/canon-overlay /usr/local/portage/mzbot-overlay /usr/local/portage/java-overlay /usr/local/portage/private"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acpi alsa applet avahi branding bzip2 cairo canberra caps cdda cddax cdio cdr cli consolekit crypt cups cxx dbus dia doc dri dts dvd dvdr dvi emacs emboss evo exif expat fbcon fbcondecor fbsplash ffmpeg firefox flac fluidsynth fontconfig fortran fuse gif glib gmp gnome gsf gstreamer gtk hal iconv idn inotify jack jpeg ladspa lash latex lcms libcaca libnotify libsamplerate lzma maildir matroska mmx mmxext mng modules mozdevelop mp3 mp4 mpeg nautilus ncurses network nls nptl nptlonly objc offensive ogg opengl pam pango pch pdf playlist png policykit pppd preview-latex pulseaudio python qt4 quote readline realtime reflection rtc rtsp schroedinger secure-delete session sftp sound speex spell spl sqlite sse ssl startup-notification stream svg sysfs tagwriting test theora toolkit-scroll-bars truetype udev unicode usb vorbis wxwidgets x264 x86 xcb xcomposite xft xinerama xml xorg xslt xterm-color xulrunner xv zlib zsh-completion" ALSA_CARDS="intel8x0" 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="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 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" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB en_US nl fy fy_NL" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 m_zwart 2010-04-06 15:22:10 UTC
Created attachment 226739 [details, diff]
build system changes to remove pyrex dependency
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2010-04-07 09:53:21 UTC
Well, we build from source...
Comment 3 m_zwart 2010-04-07 11:02:11 UTC
Of course you do, but the pyrex source is more like a configure.ac file than like a .c file. Just like ebuilds for an autotools-based build system do not depend on autoconf or automake unless they patch configure.ac or Makefile.am python packages using pyrex should not depend on pyrex unless they patch the .pyx file.

In fact the pyrex documentation recommends *against* running pyrex in cases like this one:

Pyrex-0.9.8.6/Doc/Manual/source_files.html says:
> It is strongly recommended that you distribute the generated .c files as well 
> as your Pyrex sources, so that users can install your module without needing 
> to have Pyrex available.
>
> It is also recommended that Pyrex compilation not be enabled by default in
> the version you distribute. Even if the user has Pyrex installed, he probably 
> doesn't want to use it just to install your module. Also, the version he has 
> may not be the same one you used, and may not compile your sources correctly.

And notice that even though configure checks for pyrex without my patch, make does *not* run pyrex (even without my patch). I'm only patching the Makefile to confirm that, there should be no behavioral change there. The only behavioral change is that the unnecessary configure-time check is removed.
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-04-07 11:11:49 UTC
This is an issue with upstream's build system, so please contact them to fix it.

I'll fix the dependency by moving pyrex to DEPEND asap.
Comment 5 m_zwart 2010-04-07 12:59:44 UTC
I found a cleaner way to avoid the dependency: running "./configure PYREX=/bin/false" gets you past the check. 

Unfortunately the Makefile ignores the result of the pyrex check in the configure script (it has "pyrexc" hardcoded). So if some future version of the ebuild or upstream package needs pyrex run it will silently reintroduce the dependency. The build system patch fixing that is http://bugs.opencompositing.org/show_bug.cgi?id=1286 . "./configure PYREX=/bin/false" works without that patch for *this* version of the package and ebuild, but I recommend applying it or waiting for upstream to apply it to avoid accidents.
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-05 00:15:07 UTC
I'll count this as fixed although it's not-entirely-fixed.

Now pyrex is just a build-time dependency, but since there are new releases from upstream that I'll try to work at tomorrow, it might end up being fixed entirely there.