Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 112464 - emerge pylibpcap fails
Summary: emerge pylibpcap fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-13 16:17 UTC by Marc Vilanova
Modified: 2005-11-19 10:34 UTC (History)
0 users

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


Attachments
setup.py patch (setup.py.patch,423 bytes, patch)
2005-11-17 15:22 UTC, Marc Vilanova
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Vilanova 2005-11-13 16:17:40 UTC
emerge pylibpcap fails

Reproducible: Always
Steps to Reproduce:
1.emerge pylibpcap
2.
3.

Actual Results:  
>>> emerge (1 of 1) dev-python/pylibpcap-0.4 to /
>>> md5 files   ;-) pylibpcap-0.4.ebuild
>>> md5 files   ;-) files/digest-pylibpcap-0.4
>>> md5 src_uri ;-) pylibpcap-0.4.tar.gz
>>> Unpacking source...
>>> Unpacking pylibpcap-0.4.tar.gz to /var/tmp/portage/pylibpcap-0.4/work
>>> Source unpacked.
 * pre-compile state
/usr/lib/python2.4/distutils/dist.py:222: UserWarning: 'licence' distribution
option is deprecated; use 'license'
  warnings.warn(msg)
running build
running build_py
creating build
creating build/lib.linux-i686-2.4
copying pcap.py -> build/lib.linux-i686-2.4
running build_ext
building 'pcapcmodule' extension
Traceback (most recent call last):
  File "setup.py", line 104, in ?
    cmdclass = {'clean': pcapclean, 'build_ext':pcap_build_ext},
  File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.4/distutils/command/build.py", line 112, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.4/distutils/command/build_ext.py", line 279, in run
    self.build_extensions()
  File "/usr/lib/python2.4/distutils/command/build_ext.py", line 405, in
build_extensions
    self.build_extension(ext)
  File "/usr/lib/python2.4/distutils/command/build_ext.py", line 442, in
build_extension
    sources = self.swig_sources(sources, ext)
TypeError: swig_sources() takes exactly 2 arguments (3 given)


Expected Results:  
emerge clearly

neohydra neohydra_overlay # emerge --info
Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2,
2.6.14-suspend2 i686)
=================================================================
System uname: 2.6.14-suspend2 i686 Intel(R) Pentium(R) M processor 1.60GHz
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -mtune=pentium-m -O3 -pipe -fomit-frame-pointer -mmmx
-msse -msse2 -ftracer -fforce-addr -fprefetch-loop-arrays -funroll-loops
-maccumulate-outgoing-args"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt /stuff/enemy-territory /usr/kde/2/share/config
/usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/local/portage /usr/share/config
/usr/share/hibernate/scriptlets.d /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/
/usr/share/vim/vim63/colors /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /usr/X11R6/bin/startx /etc/env.d"
CXXFLAGS="-march=pentium-m -mtune=pentium-m -O3 -pipe -fomit-frame-pointer -mmmx
-msse -msse2 -ftracer -fforce-addr -fprefetch-loop-arrays -funroll-loops
-maccumulate-outgoing-args"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache digest distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://linuv.uv.es/mirror/gentoo/
ftp://gentoo.blueyonder.co.uk/mirrors/gentoo
http://pandemonium.tiscali.de/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/"
LANG="ca_ES@euro"
LC_ALL="ca_ES@euro"
LINGUAS="ca en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/neohydra/trunk
/usr/local/portage/overlays/bmg-main.alternative
/usr/local/portage/overlays/ferdy-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac acl acpi alsa arts audiofile avi bash-completion berkdb
bitmap-fonts browserplugin bzip2 cardbus cdda cddb cdio cdparanoia cdr crypt
cscope css cups curl dbus divx4linux dts dvd dvdread eds encode esd ethereal
exif expat extras fam ffmpeg flac foomaticdb gd gdbm gif glut gmp gnome gphoto2
gpm gstreamer gtk gtk2 guile idn ieee1394 imagemagick imlib ipv6 jabber java
jikes john jpeg junit kde kdeenablefinal lcms libwww logrotate lua mad mikmod
mmx mng motif mozilla mp3 mpeg mysql ncurses nls nptl nptlonly nsplugin nvidia
offensive ogg oggvorbis opengl oss pam pcmcia pcre pda pdflib perl png posix
python qt quicktime rar readline real recode reiserfs sdl shorten slang snmp
spell sse sse2 ssl svga symlink tcltk tcpd tetex theora tiff truetype
truetype-fonts type1-fonts udev usb userlocales v4l v4l2 vcd vidix vim-with-x
vorbis wifi win32codecs xml2 xmms xosd xv xvid xvmc zlib linguas_ca linguas_en
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS
Comment 1 Fernando Garrido Vaz 2005-11-17 14:12:31 UTC
As a workaround, change the unpacked source: 
1. Open ${PORTAGE_TMPDIR}/pylibpcap-0.4/setup.py in a text editor 
2. Change line 28 from: 
def swig_sources(self, sources) 
 
to: 
def swig_sources(self, sources, extension=None) 
 
3.In that directory, run 
python setup.py build 
python setup.py install 
 
That is very, very ugly, but at least gets the package installed.  Apparently 
the original package is broken.  Someone more knowledgeable than me could put 
together a patch, perhaps? 
Comment 2 Marc Vilanova 2005-11-17 15:22:37 UTC
Created attachment 73109 [details, diff]
setup.py patch
Comment 3 Marc Vilanova 2005-11-17 15:24:24 UTC
Thanks for your suggestions. I have made a little patch that solves this problem:

--- setup.py.orig       2005-11-18 00:11:02.000000000 +0100
+++ setup.py    2005-11-18 00:11:29.000000000 +0100
@@ -21,7 +21,7 @@
 #    self.run_command('make_clean')
 
 class pcap_build_ext(build_ext):
-  def swig_sources(self, sources):
+  def swig_sources(self, sources, extension=None):
   
       """Walk the list of source files in 'sources', looking for SWIG
       interface (.i) files.  Run SWIG on all that are found, and
Comment 4 Alastair Tse (RETIRED) gentoo-dev 2005-11-19 10:34:25 UTC
fixed. thanks for the patch. however, i've also bumped the version to 0.5.1 which seems to be working 
better.