Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442272 - dev-python/pylint-0.26.0 merges with python 2.6 but not 2.7
Summary: dev-python/pylint-0.26.0 merges with python 2.6 but not 2.7
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
Depends on:
Reported: 2012-11-07 22:28 UTC by Guillaume BINET
Modified: 2015-07-28 07:57 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume BINET 2012-11-07 22:28:35 UTC
I am confused about this one and still wonder if it is something specific about my install.

eselect python set python2.6; emerge -1 dev-python/pylint

eselect python set python2.7; emerge -1 dev-python/pylint 
results in :
AttributeError: Distribution instance has no attribute 'namespace_packages'

at python setup install phase

Reproducible: Always

Steps to Reproduce:
eselect python set python2.7; emerge -1 dev-python/pylint 
Actual Results:  
eselect python set python2.7; emerge -1 dev-python/pylint 
results in :
running install_lib
Traceback (most recent call last):
  File "", line 189, in <module>
  File "", line 185, in install
  File "/usr/lib64/python2.7/distutils/", line 152, in setup
  File "/usr/lib64/python2.7/distutils/", line 953, in run_commands
  File "/usr/lib64/python2.7/distutils/", line 972, in run_command
  File "/usr/lib64/python2.7/distutils/command/", line 575, in run
  File "/usr/lib64/python2.7/distutils/", line 326, in run_command
  File "/usr/lib64/python2.7/distutils/", line 972, in run_command
  File "", line 122, in run
  File "/usr/lib64/python2.7/site-packages/setuptools/command/", line 21, in run
    outfiles = self.install()
  File "/usr/lib64/python2.7/distutils/command/", line 115, in install
    outfiles = self.copy_tree(self.build_dir, self.install_dir)
  File "/usr/lib64/python2.7/site-packages/setuptools/command/", line 47, in copy_tree
    exclude = self.get_exclusions()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/", line 28, in get_exclusions
    nsp = self.distribution.namespace_packages
AttributeError: Distribution instance has no attribute 'namespace_packages'

Expected Results:  
it should merge

# emerge --info
Portage (default/linux/amd64/10.0/desktop/kde, gcc-4.7.2, glibc-2.16.0, 3.6.6-gentoo x86_64)
System uname: Linux-3.6.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.2
Timestamp of tree: Wed, 07 Nov 2012 18:15:01 +0000
ld GNU ld (GNU Binutils) 2.23
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p39
dev-java/java-config:     2.1.12
dev-lang/python:          2.6.8, 2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.4
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.4
sys-devel/binutils:       2.23
sys-devel/gcc:            4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo zugaina gbin plab ikelos sunrise pentoo sabayon sabayon-distro mv kde
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -O2 -pipe -flto"
CONFIG_PROTECT="/etc /opt/openfire/resources/security/ /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa"
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/terminfo"
CXXFLAGS="-march=native -O2 -pipe -flto"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LINGUAS="en en_US"
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"
PORTDIR_OVERLAY="/var/lib/layman/zugaina /var/lib/layman/gbin-overlay /var/lib/layman/plab /var/lib/layman/ikelos /var/lib/layman/sunrise /var/lib/layman/pentoo /var/lib/layman/sabayon /var/lib/layman/sabayon-distro /var/lib/layman/mv /var/lib/layman/kde"
USE="X Xaw3d a52 aac aacplus aalib acl acpi alsa amd64 aotuv ares asf avahi avx berkdb bluetooth branding bzip2 cairo cdaudio cdda cdr cjk cli consolekit cracklib crypt cups cxx dbus declarative directfb divx4linux dri dts dv dvd dvdr dvdread emboss emul-linux-x86 encode exif fam fbcon fbsplash ffmpeg firefox flac fortran freetype gcj gd gdbm geoip gif glitz go gpm gtk gtk2 htmlhandbook http i8x0 iconv icu idn imagemagick immqt-bc jack java java6 javascript jfs joystick jpeg jpeg2k kde kdepim kdexdeltas kipi laptop lcms libcaca lzma m17n-lib mad midi mmap mmx mng modplug modules mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz ncurses nls nptl nsplugin ntfs obex ogg oggvorbis openexr opengl openmp pam pango pch pcmcia pcre pdf phonon plasma png policykit postgres ppds pppd python python3 qt3 qt3support qt4 rdesktop readline reiserfs samba sasl scanner sdl semantic-desktop session socks5 speex spell sqlite sse sse2 sse3 ssl ssse3 startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb usepackagedmakefiles v4l v4l2 vaapi vcd vhosts vim-syntax vorbis wavpack wifi wmf wxwidgets x264 xcb xcomposite xine xinerama xpm xv xvid xvmc zeroconf zlib zsh-completion" ALSA_CARDS="hda-intel" 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="canon" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7 python3_2 pypy1_9" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="intel" 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"
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-11-08 06:52:49 UTC
I am confused too, it builds fine for me. As a formality, could you attach the full build log, and `emerge '-pv' pylint setuptools python`?
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2012-11-22 13:20:00 UTC
I'm not quite so confused. 'namespace_packages' has a familiar ring. Please paste / post  output of 

$ layman -l
Comment 3 Guillaume BINET 2012-11-30 18:04:29 UTC
⚫ sal ~ # layman -l

 * gbin-overlay              [Git       ] (                                         )
 * ikelos                    [Git       ] (git://                                 )
 * kde                       [Git       ] (git://                                   )
 * mv                        [Git       ] (git://                                    )
 * pentoo                    [Subversion] (                             )
 * plab                      [Git       ] (git://                                  )
 * sabayon                   [Git       ] (git://                       )
 * sabayon-distro            [Git       ] (git://                          )
 * sunrise                   [Git       ] (git://                      )
 * zugaina                   [Rsync     ] (rsync://                                   )
Comment 4 Guillaume BINET 2012-12-05 23:58:15 UTC
I found a "solution" to this :
for any package with this error (AttributeError: Distribution instance has no attribute 'namespace_packages')

1. unmerge setuptools
2. modify the package in my private overlay and remove the setuptools dependency
3. emerge the package successfully
4. reemerge setuptools which is a real dependency for other packages

I dichotomized this problem by doing a "python" build directly from the source package in a virtualenv that worked correctly and got a usr/lib64/python2.7/distutils/ UserWarning: Unknown distribution option: 'namespace_packages'

for the same source tree under my gentoo python environment.

I hope it will help you finding what is really going on.
Comment 5 SpanKY gentoo-dev 2015-07-28 07:57:08 UTC
python2.6 is no longer supported and pylint in the tree def works with python2.7