Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 676024

Summary: dev-python/setuptools_scm-3.2.0 - ImportError: 'module' object has no attribute 'FILES_COMMAND'
Product: Gentoo Linux Reporter: tonich <koprut>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: eike, leho, mmokrejs, ostroffjh, stoffepojken, whissi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://trac.macports.org/ticket/57199
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 685518    
Attachments: build.log

Description tonich 2019-01-22 06:41:35 UTC
dev-python/setuptools_scm-3.2.0 failed to install

Reproducible: Always

Steps to Reproduce:
1. emerge =setuptools_scm-3.2.0

Actual Results:  
writing entry points to src/setuptools_scm.egg-info/entry_points.txt
Traceback (most recent call last):
  File "setup.py", line 117, in <module>
    setuptools.setup(**arguments)
  File "/usr/lib64/python2.7/site-packages/setuptools/__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib64/python2.7/distutils/command/install.py", line 575, in run
    self.run_command(cmd_name)
  File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/install_egg_info.py", line 34, in run
    self.run_command('egg_info')
  File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/egg_info.py", line 296, in run
    self.find_sources()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
    mm.run()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/egg_info.py", line 534, in run
    self.add_defaults()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/egg_info.py", line 573, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/usr/lib64/python2.7/site-packages/setuptools/command/sdist.py", line 20, in walk_revctrl
    for item in ep.load()(dirname):
  File "/var/tmp/portage/dev-python/setuptools_scm-3.2.0/work/setuptools_scm-3.2.0/src/setuptools_scm/integration.py", line 28, in find_files
    command = ep.load()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2356, in resolve
    raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'FILES_COMMAND'
 * ERROR: dev-python/setuptools_scm-3.2.0::gentoo failed (install phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_install
 *   environment, line 2644:  Called distutils-r1_src_install
 *   environment, line  847:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_install'
 *   environment, line  334:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 2178:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 1538:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line 1536:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_install'
 *   environment, line  546:  Called distutils-r1_run_phase 'distutils-r1_python_install'
 *   environment, line  815:  Called distutils-r1_python_install
 *   environment, line  731:  Called esetup.py 'install' '--root=/var/tmp/portage/dev-python/setuptools_scm-3.2.0/image/_python2.7'
 *   environment, line 1083:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/setuptools_scm-3.2.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/setuptools_scm-3.2.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-python/setuptools_scm-3.2.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/setuptools_scm-3.2.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/setuptools_scm-3.2.0/work/setuptools_scm-3.2.0'
 * S: '/var/tmp/portage/dev-python/setuptools_scm-3.2.0/work/setuptools_scm-3.2.0'


Portage 2.3.57 (python 2.7.15-final-0, default/linux/amd64/17.0/desktop, gcc-8.2.0, glibc-2.28-r5, 4.20.3-gentoo-64 x86_64)
=================================================================
System uname: Linux-4.20.3-gentoo-64-x86_64-AMD_FX-tm-8120_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    15349176 total,   1816128 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Mon, 10 Aug 2015 06:00:01 +0000
Head commit of repository gentoo: a9126617dc1735d2fdc9f6b5e5968b939451fa9c

sh bash 5.0
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.4 [disabled]
app-shells/bash:          5.0::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.0::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5-r1::gentoo, 3.6.6::gentoo, 3.7.0::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.13.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.40.3::gentoo
sys-apps/sandbox:         2.15::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r3::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.20::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git://anongit.gentoo.org/repo/gentoo.git
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/php/cli-php7.2/ext-active/ /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 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j9"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 apache2 avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cdda cdr cli consolekit crypt cups curl cxx dbus djvu dri dts dv dvd dvdr dvi emboss encode examples exif fam ffmpeg flac fortran gdbm gif glamor glitz gnome-keyring gnutls gphoto2 gpm gtk gtk2 hal haskell iconv icu idn introspection ipv6 irmc jabber java6 jbig jpeg jpeg2k lame lcms ldap libnotify libsecret libtirpc linguas_ru mad mailwrapper mate mms mmx mng mozdevelop mozsvg mozxmlterm mp3 mp4 mpeg mtp multilib ncurses nls nptl nptlonly ogg opengl openmp opus pam pango pascal pcre pdf php png policykit ppds pulseaudio python qmail qt5 readline ruby samba scanner sdl seccomp semantic-desktop spell sql sse sse2 ssl startup-notification svg t1lib tcpd theora tiff truetype udev udisks unicode upower usb v4l v4l2 vaapi vala vcd vdpau vhosts vorbis vulkan webp win32codecs wxwidgets x264 x265 xattr xcb xine xinerama xml xmp xulrunner xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="cmipci emu10k1 emu10k1x ens1370 ens1371 hda-intel hdsp hdspm ice1712 ice1724 intel8x0 intel8x0m mpu401 via82xx via82xx-modem atiixp" APACHE2_MODULES="socache_shmcb authn_core authz_core unixd access auth authz_host auth_dbm auth_anon auth_digest alias file-cache echo charset-lite cache disk-cache mem-cache filter deflate mime-magic cern-meta expires headers usertrack unique_id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template toshiba_pdrm11" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2 mmxext" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev wacom synaptics mutouch" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer pdfimport scripting-beanshell scripting-javascript wiki-publisher nlpsolver" LLVM_TARGETS="AMDGPU BPF X86 NVPTX" NETBEANS_MODULES="php webcommon websvccommon" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi addition dav dav_ext gunzip gzip_static naxsi realip spdy sticky" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1 php7-2" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_5 python3_6 python3_7" QEMU_SOFTMMU_TARGETS="x86_64 i386 mipsel" QEMU_USER_TARGETS="x86_64 i386 mipsel" RUBY_TARGETS="ruby24 ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="intel nouveau radeon radeonsi amdgpu 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
Comment 1 tonich 2019-01-22 06:45:55 UTC
$ mkvirtualenv stools
(stools) $ pip -v install --no-binary=:all: setuptools_scm

works fine:

(stools) $ pip list
Package        Version
-------------- -------
pip            18.1   
setuptools     40.6.3 
setuptools-scm 3.2.0  
wheel          0.32.3
Comment 2 tonich 2019-01-22 07:36:53 UTC
Created attachment 562506 [details]
build.log
Comment 3 tonich 2019-01-22 07:48:52 UTC
after removing of the old version of setuptools_scm

# emerge -C setuptools_scm
...
 dev-python/setuptools_scm
    selected: 1.15.6-r1 
   protected: none 
     omitted: none

setuptools_scm-3.2.0 installed successfully
Comment 4 OzTiram 2019-03-06 05:36:23 UTC
I can confirm this issue and that the steps by tonich solved the issue for me.
Comment 5 Tom Gillespie 2019-03-16 04:12:04 UTC
Also confirming the issue and the fix.
Comment 6 Andreas Billmeier 2019-03-19 20:14:11 UTC
Confirm bug, after removing setuptools-scm-1.15.7 it compiled without errors.
Comment 7 atosser 2019-03-24 04:49:03 UTC
Confirmed issue with 1.15.6 -> 3.2.0 and the fix.
Comment 8 Larry the Git Cow gentoo-dev 2019-05-10 14:36:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d55fb2434771a28e4e0d8a8929bdb6212b4f32b

commit 0d55fb2434771a28e4e0d8a8929bdb6212b4f32b
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-05-10 14:30:56 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-05-10 14:35:59 +0000

    dev-python/setuptools_scm: Block old versions
    
    Block old versions since presence of one causes the build to fail.
    A better solution than a blocker would be preferred but after spending
    over an hour fighitng it I wasn't able to come up with one.
    
    Closes: https://bugs.gentoo.org/676024
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/setuptools_scm/setuptools_scm-3.2.0.ebuild | 1 +
 dev-python/setuptools_scm/setuptools_scm-3.3.1.ebuild | 1 +
 2 files changed, 2 insertions(+)
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-05-12 19:58:18 UTC
*** Bug 685752 has been marked as a duplicate of this bug. ***
Comment 10 Jack 2019-05-14 03:21:43 UTC
Is there anything that can be done so users aren't left with an unexpected and unexplained hard blocker that doesn't easily make any sense?  How about a new item for a minimal heads up?
Comment 11 Rolf Eike Beer archtester 2019-07-13 14:11:28 UTC
*** Bug 689766 has been marked as a duplicate of this bug. ***
Comment 12 Leho Kraav (:macmaN @lkraav) 2020-03-28 11:33:01 UTC
Yeah, news item would've helped me.

Although https://forums.gentoo.org/viewtopic-t-1092260-start-0.html was relatively easy to find on Google as well.