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

Bug 287439

Summary: dev-python/setuptools-0.6.8 fails tests with dev-lang/python:3.1 when {C,POSIX} locale is used
Product: Gentoo Linux Reporter: Ryan Hill (RETIRED) <rhill>
Component: New packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: steffen.bergner
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bitbucket.org/tarek/distribute/issue/103/
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: distribute-0.6.3-fix_tests.patch

Description Ryan Hill (RETIRED) gentoo-dev 2009-10-03 00:17:00 UTC
* Testing of dev-python/setuptools-0.6.3-r3 with Python 3.1...
running test                                                   
running egg_info                                               
writing distribute.egg-info/PKG-INFO                           
writing top-level names to distribute.egg-info/top_level.txt   
writing dependency_links to distribute.egg-info/dependency_links.txt
writing entry points to distribute.egg-info/entry_points.txt        
reading manifest file 'distribute.egg-info/SOURCES.txt'             
reading manifest template 'MANIFEST.in'                             
writing manifest file 'distribute.egg-info/SOURCES.txt'             
running build_ext                                                   
testExtractConst (setuptools.tests.DependsTests) ... ok             
testFindModule (setuptools.tests.DependsTests) ... ok               
testModuleExtract (setuptools.tests.DependsTests) ... ok            
testRequire (setuptools.tests.DependsTests) ... ok                  
testContents (setuptools.tests.DistroTests) ... ok                  
testDistroType (setuptools.tests.DistroTests) ... ok                
testEmpty (setuptools.tests.DistroTests) ... ok                     
testExcludePackage (setuptools.tests.DistroTests) ... ok            
testExcludePackages (setuptools.tests.DistroTests) ... ok           
testIncludeExclude (setuptools.tests.DistroTests) ... ok            
testInvalidIncludeExclude (setuptools.tests.DistroTests) ... ok     
testAvailability (setuptools.tests.FeatureTests) ... ok             
testDefaults (setuptools.tests.FeatureTests) ... ok                 
testFeatureOptions (setuptools.tests.FeatureTests) ... ok           
testFeatureWithInvalidRemove (setuptools.tests.FeatureTests) ... ok 
testUseFeatures (setuptools.tests.FeatureTests) ... ok              
testConflictingOptions (setuptools.tests.TestCommandTests) ... ok   
testDefaultSuite (setuptools.tests.TestCommandTests) ... ok         
testDefaultWModuleOnCmdLine (setuptools.tests.TestCommandTests) ... ok
testLongOptSuiteWNoDefault (setuptools.tests.TestCommandTests) ... ok 
testNoSuite (setuptools.tests.TestCommandTests) ... ok                
testTestIsCommand (setuptools.tests.TestCommandTests) ... ok          
Doctest: api_tests.txt ... ok                                         
test_install_site_py (setuptools.tests.test_easy_install.TestEasyInstallTest) ... Creating /var/tmp/portage/dev-python/setuptools-0.6.3-r3/temp/tmpaRHX9V/site.py                                                                                                                       
ok                                                                                                                                          
test_get_ext_filename (setuptools.tests.test_build_ext.TestBuildExtTest) ... ok                                                             
testCollection (setuptools.tests.test_resources.DistroTests) ... ok                                                                         
testDistroBasics (setuptools.tests.test_resources.DistroTests) ... ok                                                                       
testDistroDependsOptions (setuptools.tests.test_resources.DistroTests) ... ok                                                               
testDistroDependsSimple (setuptools.tests.test_resources.DistroTests) ... ok                                                                
testDistroMetadata (setuptools.tests.test_resources.DistroTests) ... ok                                                                     
testDistroParse (setuptools.tests.test_resources.DistroTests) ... ok                                                                        
testResolve (setuptools.tests.test_resources.DistroTests) ... ok                                                                            
testBasics (setuptools.tests.test_resources.EntryPointTests) ... ok                                                                         
testParse (setuptools.tests.test_resources.EntryPointTests) ... ok                                                                          
testParseList (setuptools.tests.test_resources.EntryPointTests) ... ok                                                                      
testParseMap (setuptools.tests.test_resources.EntryPointTests) ... ok                                                                       
testRejects (setuptools.tests.test_resources.EntryPointTests) ... ok                                                                        
testEmptyParse (setuptools.tests.test_resources.ParseTests) ... ok                                                                          
testSafeName (setuptools.tests.test_resources.ParseTests) ... ok                                                                            
testSafeVersion (setuptools.tests.test_resources.ParseTests) ... ok                                                                         
testSimpleRequirements (setuptools.tests.test_resources.ParseTests) ... ok                                                                  
testSplitting (setuptools.tests.test_resources.ParseTests) ... ok                                                                           
testVersionEquality (setuptools.tests.test_resources.ParseTests) ... ok                                                                     
testVersionOrdering (setuptools.tests.test_resources.ParseTests) ... ok                                                                     
testYielding (setuptools.tests.test_resources.ParseTests) ... ok                                                                            
testAdvancedContains (setuptools.tests.test_resources.RequirementsTests) ... ok                                                             
testBasicContains (setuptools.tests.test_resources.RequirementsTests) ... ok                                                                
testBasics (setuptools.tests.test_resources.RequirementsTests) ... ok                                                                       
testOptionsAndHashing (setuptools.tests.test_resources.RequirementsTests) ... ok                                                            
testOrdering (setuptools.tests.test_resources.RequirementsTests) ... ok                                                                     
testVersionEquality (setuptools.tests.test_resources.RequirementsTests) ... ok                                                              
test_get_script_header (setuptools.tests.test_resources.ScriptHeaderTests) ... ok                                                           
test_get_script_header_jython_workaround (setuptools.tests.test_resources.ScriptHeaderTests) ... ERROR                                      

======================================================================
ERROR: test_get_script_header_jython_workaround (setuptools.tests.test_resources.ScriptHeaderTests)
----------------------------------------------------------------------                             
Traceback (most recent call last):                                                                 
  File "build/src/setuptools/tests/test_resources.py", line 527, in test_get_script_header_jython_workaround
    executable=self.non_ascii_exe),                                                                         
  File "build/src/setuptools/command/easy_install.py", line 1462, in get_script_header                      
    executable = fix_jython_executable(executable, options)                                                 
  File "build/src/setuptools/command/easy_install.py", line 1575, in fix_jython_executable                  
    if sys.platform.startswith('java') and is_sh(executable):                                               
  File "build/src/setuptools/command/easy_install.py", line 1501, in is_sh                                  
    fp = open(executable)                                                                                   
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 10: ordinal not in range(128)   

----------------------------------------------------------------------
Ran 53 tests in 0.109s                                                

FAILED (errors=1)
 *               
 * ERROR: dev-python/setuptools-0.6.3-r3 failed.
 * Call stack:                                  
 *               ebuild.sh, line   49:  Called src_test
 *             environment, line 3126:  Called python_execute_function 'tests'
 *             environment, line 2763:  Called die                            
 * The specific snippet of code:                                              
 *                       die "${failure_message}";                            
 *  The die message:                                                          
 *   Testing failed with Python 3.1 in tests() function
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2009-10-03 00:17:31 UTC
Portage 2.2_rc42 (default/linux/amd64/10.0/developer, gcc-4.4.1, glibc-2.10.1-r0, 2.6.31-gentoo-r1 x86_64)
=================================================================                                         
System uname: Linux-2.6.31-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-2.0.1  
Timestamp of tree: Sat, 03 Oct 2009 00:00:01 +0000                                                        
ccache version 2.4 [enabled]                                                                              
app-shells/bash:     4.0_p33                                                                              
dev-java/java-config: 2.1.9-r1                                                                            
dev-lang/python:     2.6.2-r2, 3.1.1-r1                                                                   
dev-util/ccache:     2.4-r8                                                                               
dev-util/cmake:      2.6.4-r3                                                                             
sys-apps/baselayout: 2.0.1                                                                                
sys-apps/openrc:     0.4.3-r3                                                                             
sys-apps/sandbox:    2.1                                                                                  
sys-devel/autoconf:  2.13, 2.63-r1                                                                        
sys-devel/automake:  1.9.6-r2, 1.10.2, 1.11                                                               
sys-devel/binutils:  2.20.51.0.1                                                                          
sys-devel/gcc-config: 1.4.1                                                                               
sys-devel/libtool:   2.2.6a                                                                               
virtual/os-headers:  2.6.30-r1                                                                            
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                            
CBUILD="x86_64-unknown-linux-gnu"                                                                         
CFLAGS="-O2 -g -march=core2 -msse4.1 -fomit-frame-pointer -pipe"                                          
CHOST="x86_64-unknown-linux-gnu"                                                                          
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"  
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/terminfo /etc/udev/rules.d"                                                                                     
CXXFLAGS="-O2 -g -march=core2 -msse4.1 -fomit-frame-pointer -pipe"                                                                          
DISTDIR="/usr/portage/distfiles"                                                                                                            
FEATURES="assume-digests ccache collision-protect cvs distlocks fixpackages multilib-strict parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict test test-fail-continue unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"             
GENTOO_MIRRORS="http://gentoo.mirrors.tera-byte.com/ http://distfiles.gentoo.org/"                                                          
LANG="en_CA.utf8"                                                                                                                           
LC_ALL="C"                                                                                                                                  
LDFLAGS="-Wl,--as-needed -Wl,--hash-style=gnu"                                                                                              
LINGUAS="en en_US"                                                                                                                          
MAKEOPTS="-j3"                                                                                                                              
PKGDIR="/usr/portage/packages"                                                                                                              
PORTAGE_CONFIGROOT="/"                                                                                                                      
PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/metadata/cache"                                                                                        
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="/home/dirtyepic/svn/gcc-porting /home/dirtyepic/svn/toolchain /home/dirtyepic/svn/dirtyepic /home/dirtyepic/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi akonadi alsa amd64 archive ass autotrace avahi bash-completion berkdb bonjour bs2b bzip2 cairo caps cdaudio cdda cddb cdio cdr cli consolekit cracklib crypt css cue cups curl custom-cflags dbus device-mapper dirac disk-partition dri dts dvd dvdnav dvdr emboss enca encode evo exif expat faac faad fam ffmpeg fftw firefox firefox3 flac fontconfig fontforge gdbm gif git gmp gmplayer graphite graphviz gstreamer gtk guidexml hal hpn iconv id3tag imap inotify isdnlog jadetex java jpeg kde kdehiddenvisibility lame laptop lastfmradio libburn libmms libnotify lzma mad maildir mdnsresponder-compat mmap mmx mmxext mng modules mp2 mp3 mp4 mpeg mplayer multilib musicbrainz nautilus ncurses network-cron nntp nptl nptlonly nsplugin ogg opengl openmp openssl osdmenu pam pcre pdf perl phonon pic png policykit ppds pppd python qt3support qt4 quicktime rar readline reflection rtc schroedinger scrobbler session shm smp sndfile snmp spell spl sse sse2 sse3 ssl ssse3 startup-notification subversion svg sysfs taglib tcpd theora threads threadsafe thumbnail thunar tiff tremor truetype unicode urandom usb utempter vim-syntax vim-with-x vorbis wicd wma wmf wxwidgets wxwindows x264 xattr xcb xcomposite xml xmp xorg xulrunner xv xvid xvmc zeroconf zip zlib" 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="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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-10-03 01:04:23 UTC
(In reply to comment #0)                             
> test_get_script_header_jython_workaround
> (setuptools.tests.test_resources.ScriptHeaderTests) ... ERROR                   
> 
> ======================================================================
> ERROR: test_get_script_header_jython_workaround
> (setuptools.tests.test_resources.ScriptHeaderTests)
> ----------------------------------------------------------------------          
> Traceback (most recent call last):                                              
>   File "build/src/setuptools/tests/test_resources.py", line 527, in
> test_get_script_header_jython_workaround
>     executable=self.non_ascii_exe),                                             
>   File "build/src/setuptools/command/easy_install.py", line 1462, in
> get_script_header                      
>     executable = fix_jython_executable(executable, options)                     
>   File "build/src/setuptools/command/easy_install.py", line 1575, in
> fix_jython_executable                  
>     if sys.platform.startswith('java') and is_sh(executable):                   
>   File "build/src/setuptools/command/easy_install.py", line 1501, in is_sh      
>     fp = open(executable)                                                       
> UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 10:
> ordinal not in range(128)   

Do you have dev-java/jython installed?
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-10-03 01:25:36 UTC
Created attachment 205891 [details, diff]
distribute-0.6.3-fix_tests.patch

I can't reproduce this bug, but please try this patch.
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-10-03 01:36:33 UTC
This bug occurs only when non-UTF-8 locale is used.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2009-10-03 01:42:46 UTC
no jython installed here.  sorry, patch doesn't change anything.

  File "build/src/setuptools/command/easy_install.py", line 1501, in is_sh                                  
    fp = open(executable, "rb")                                                                             
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 10: ordinal not in range(128) 


my locale is en_CA.utf8.
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2009-10-03 01:44:58 UTC
> 
> my locale is en_CA.utf8.
> 

wait, no it's not. ;)  i'm overriding it to C in make.conf.
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-08 16:55:22 UTC
test_get_script_header_jython_workaround is now skipped when C locale is used.
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-12-01 13:49:02 UTC
Also fails with POSIX.

You *could* just look for an utf-8 compatible locale and use that for testing.
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-12-04 19:07:14 UTC
Fixed.