Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582300 - app-emulation/docker-compose: pkg_resources.DistributionNotFound: The 'py2-ipaddress>=3.4.1' distribution was not found and is required by docker-py
Summary: app-emulation/docker-compose: pkg_resources.DistributionNotFound: The 'py2-ip...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal critical
Assignee: Alex Brandt (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-06 18:06 UTC by Mateusz Lenik
Modified: 2016-05-15 21:19 UTC (History)
0 users

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 Mateusz Lenik 2016-05-06 18:06:25 UTC
>=docker-compose-1.6.2 has hard dependency on py2-ipaddress, but it doesn't seem to be specified as a dependency (checked via equery g)

My system has virtual/python-ipaddress pulled in, which in turn pulled in dev-python/ipaddress. It provides the same functionality py2-ipaddress provides, but as you can see below, docker-compose hardcodes py2-ipaddress package name.
Additionally py2-ipaddress was masked in #580388

$ docker-compose
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/docker-compose", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3080, in <module>
    @_call_aside
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3066, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3093, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 651, in _build_master
    ws.require(__requires__)
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 952, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 839, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'py2-ipaddress>=3.4.1' distribution was not found and is required by docker-py

$ emerge --info
Portage 2.2.26 (python 2.7.10-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.22-r4, 4.6.0-rc6 x86_64)
=================================================================
System uname: Linux-4.6.0-rc6-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-gentoo-2.2
KiB Mem:    16335076 total,  13660120 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Fri, 06 May 2016 12:30:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

mlen
    location: /var/lib/layman/mlen
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fno-omit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -fno-omit-frame-pointer -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 preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5 -l5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="X aac aacplus acl alsa amd64 audit berkdb bzip2 cgroups cli cracklib crypt cryptsetup cups cxx dbus dri faac flac fortran gdbm gif gtk gtk3 gtkstyle iconv idn infinality iproute2 ipv6 jpeg libedit libnotify llvm mmx mmxext modules mp3 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp opus oss pam pch pcre png policykit pulseaudio python qt5 readline seccomp session sound sse sse2 ssl startup-notification systemd tcpd theora tiff truetype udev udisks unicode vdpau vim-syntax vorbis webp x264 xattr xft xinerama zlib zsh-completion" 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" 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 ublox ubx" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby23 ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Alex Brandt (RETIRED) gentoo-dev 2016-05-09 14:50:05 UTC
Which specific version of docker-compose are you running into this issue with?
Comment 2 Mateusz Lenik 2016-05-09 14:52:34 UTC
This happens both on 1.6.2 and 1.7.0. I guess it works fine on python3, but I prefer to have python2 selected by default
Comment 3 Alex Brandt (RETIRED) gentoo-dev 2016-05-09 18:08:11 UTC
Yep, I figured that was the case.  I'll have to fix those ebuilds.  The choice of python shouldn't affect this package and I've started moving it to towards a python3 only package.  Please, keep an eye on it and let me know if this change causes any problems.

Are you sure you see this problem on 1.6.2 as well?  That version never required py2-ipaddress in the past.  I'll check that upstream hasn't mucked with a working build.
Comment 4 Alex Brandt (RETIRED) gentoo-dev 2016-05-09 18:22:42 UTC
Sorry about the noise.  Now I remember this one.  It's due to the version of docker-py and docker-compose.  Looks like they have an implicit dependence on that package.

Can you try re-installing docker-py and docker-compose and see if the versions change?  Regardless, can you print out the package info for docker-py and docker-compose afterwards?  I'm looking for a solution that doesn't require dropping python2 from old versions of docker-compose and I think I'll have to restrict the dependence on docker-py.

Let me know what versions you get and if the problem persists and I'll figure out next steps.
Comment 5 Mateusz Lenik 2016-05-09 18:26:44 UTC
I'm pretty sure, after 1.7.0 failed, I tried 1.6.2 in hopes it'll work fine.
Comment 6 Mateusz Lenik 2016-05-09 18:35:03 UTC
Missed the other comment, sorry. Will check in a moment.
Comment 7 Mateusz Lenik 2016-05-09 20:04:13 UTC
Reinstalled, the problem still occurs. I'm not sure if that's the package info you asked for, but here it goes :)

=================================================================
                        Package Settings
=================================================================

dev-python/docker-py-1.8.0_rc5::gentoo was built with the following:
USE="-doc -test" ABI_X86="64" PYTHON_TARGETS="python2_7 python3_4 -python3_3"


app-emulation/docker-compose-1.7.0::gentoo was built with the following:
USE="-test" ABI_X86="64" PYTHON_TARGETS="python2_7 python3_4"
Comment 8 Alex Brandt (RETIRED) gentoo-dev 2016-05-09 20:10:42 UTC
Alright, it looks like docker-py-1.8.0_rc5 had the same issues as 1.8.0 proper.  Can you try masking that version and seeing if everything works again?
Comment 9 Mateusz Lenik 2016-05-09 20:44:12 UTC
Works fine (== doesn't crash) with >dev-python/docker-py-1.8.0_rc2 mask.
Comment 10 Alex Brandt (RETIRED) gentoo-dev 2016-05-10 00:44:11 UTC
Alright, I'm removing the offending version from the tree.  Thanks for helping me find this one.  I was afraid of collateral damage from the linked issues.