figure out why "FreeStorm Win7-amd64-mingw py2.6" is red on the "test-with-fake-pkg" step #1246
Labels
No labels
c/code
c/code-dirnodes
c/code-encoding
c/code-frontend
c/code-frontend-cli
c/code-frontend-ftp-sftp
c/code-frontend-magic-folder
c/code-frontend-web
c/code-mutable
c/code-network
c/code-nodeadmin
c/code-peerselection
c/code-storage
c/contrib
c/dev-infrastructure
c/docs
c/operational
c/packaging
c/unknown
c/website
kw:2pc
kw:410
kw:9p
kw:ActivePerl
kw:AttributeError
kw:DataUnavailable
kw:DeadReferenceError
kw:DoS
kw:FileZilla
kw:GetLastError
kw:IFinishableConsumer
kw:K
kw:LeastAuthority
kw:Makefile
kw:RIStorageServer
kw:StringIO
kw:UncoordinatedWriteError
kw:about
kw:access
kw:access-control
kw:accessibility
kw:accounting
kw:accounting-crawler
kw:add-only
kw:aes
kw:aesthetics
kw:alias
kw:aliases
kw:aliens
kw:allmydata
kw:amazon
kw:ambient
kw:annotations
kw:anonymity
kw:anonymous
kw:anti-censorship
kw:api_auth_token
kw:appearance
kw:appname
kw:apport
kw:archive
kw:archlinux
kw:argparse
kw:arm
kw:assertion
kw:attachment
kw:auth
kw:authentication
kw:automation
kw:avahi
kw:availability
kw:aws
kw:azure
kw:backend
kw:backoff
kw:backup
kw:backupdb
kw:backward-compatibility
kw:bandwidth
kw:basedir
kw:bayes
kw:bbfreeze
kw:beta
kw:binaries
kw:binutils
kw:bitcoin
kw:bitrot
kw:blacklist
kw:blocker
kw:blocks-cloud-deployment
kw:blocks-cloud-merge
kw:blocks-magic-folder-merge
kw:blocks-merge
kw:blocks-raic
kw:blocks-release
kw:blog
kw:bom
kw:bonjour
kw:branch
kw:branding
kw:breadcrumbs
kw:brians-opinion-needed
kw:browser
kw:bsd
kw:build
kw:build-helpers
kw:buildbot
kw:builders
kw:buildslave
kw:buildslaves
kw:cache
kw:cap
kw:capleak
kw:captcha
kw:cast
kw:centos
kw:cffi
kw:chacha
kw:charset
kw:check
kw:checker
kw:chroot
kw:ci
kw:clean
kw:cleanup
kw:cli
kw:cloud
kw:cloud-backend
kw:cmdline
kw:code
kw:code-checks
kw:coding-standards
kw:coding-tools
kw:coding_tools
kw:collection
kw:compatibility
kw:completion
kw:compression
kw:confidentiality
kw:config
kw:configuration
kw:configuration.txt
kw:conflict
kw:connection
kw:connectivity
kw:consistency
kw:content
kw:control
kw:control.furl
kw:convergence
kw:coordination
kw:copyright
kw:corruption
kw:cors
kw:cost
kw:coverage
kw:coveralls
kw:coveralls.io
kw:cpu-watcher
kw:cpyext
kw:crash
kw:crawler
kw:crawlers
kw:create-container
kw:cruft
kw:crypto
kw:cryptography
kw:cryptography-lib
kw:cryptopp
kw:csp
kw:curl
kw:cutoff-date
kw:cycle
kw:cygwin
kw:d3
kw:daemon
kw:darcs
kw:darcsver
kw:database
kw:dataloss
kw:db
kw:dead-code
kw:deb
kw:debian
kw:debug
kw:deep-check
kw:defaults
kw:deferred
kw:delete
kw:deletion
kw:denial-of-service
kw:dependency
kw:deployment
kw:deprecation
kw:desert-island
kw:desert-island-build
kw:design
kw:design-review-needed
kw:detection
kw:dev-infrastructure
kw:devpay
kw:directory
kw:directory-page
kw:dirnode
kw:dirnodes
kw:disconnect
kw:discovery
kw:disk
kw:disk-backend
kw:distribute
kw:distutils
kw:dns
kw:do_http
kw:doc-needed
kw:docker
kw:docs
kw:docs-needed
kw:dokan
kw:dos
kw:download
kw:downloader
kw:dragonfly
kw:drop-upload
kw:duplicity
kw:dusty
kw:earth-dragon
kw:easy
kw:ec2
kw:ecdsa
kw:ed25519
kw:egg-needed
kw:eggs
kw:eliot
kw:email
kw:empty
kw:encoding
kw:endpoint
kw:enterprise
kw:enum34
kw:environment
kw:erasure
kw:erasure-coding
kw:error
kw:escaping
kw:etag
kw:etch
kw:evangelism
kw:eventual
kw:example
kw:excess-authority
kw:exec
kw:exocet
kw:expiration
kw:extensibility
kw:extension
kw:failure
kw:fedora
kw:ffp
kw:fhs
kw:figleaf
kw:file
kw:file-descriptor
kw:filename
kw:filesystem
kw:fileutil
kw:fips
kw:firewall
kw:first
kw:floatingpoint
kw:flog
kw:foolscap
kw:forward-compatibility
kw:forward-secrecy
kw:forwarding
kw:free
kw:freebsd
kw:frontend
kw:fsevents
kw:ftp
kw:ftpd
kw:full
kw:furl
kw:fuse
kw:garbage
kw:garbage-collection
kw:gateway
kw:gatherer
kw:gc
kw:gcc
kw:gentoo
kw:get
kw:git
kw:git-annex
kw:github
kw:glacier
kw:globalcaps
kw:glossary
kw:google-cloud-storage
kw:google-drive-backend
kw:gossip
kw:governance
kw:grid
kw:grid-manager
kw:gridid
kw:gridsync
kw:grsec
kw:gsoc
kw:gvfs
kw:hackfest
kw:hacktahoe
kw:hang
kw:hardlink
kw:heartbleed
kw:heisenbug
kw:help
kw:helper
kw:hint
kw:hooks
kw:how
kw:how-to
kw:howto
kw:hp
kw:hp-cloud
kw:html
kw:http
kw:https
kw:i18n
kw:i2p
kw:i2p-collab
kw:illustration
kw:image
kw:immutable
kw:impressions
kw:incentives
kw:incident
kw:init
kw:inlineCallbacks
kw:inotify
kw:install
kw:installer
kw:integration
kw:integration-test
kw:integrity
kw:interactive
kw:interface
kw:interfaces
kw:interoperability
kw:interstellar-exploration
kw:introducer
kw:introduction
kw:iphone
kw:ipkg
kw:iputil
kw:ipv6
kw:irc
kw:jail
kw:javascript
kw:joke
kw:jquery
kw:json
kw:jsui
kw:junk
kw:key-value-store
kw:kfreebsd
kw:known-issue
kw:konqueror
kw:kpreid
kw:kvm
kw:l10n
kw:lae
kw:large
kw:latency
kw:leak
kw:leasedb
kw:leases
kw:libgmp
kw:license
kw:licenss
kw:linecount
kw:link
kw:linux
kw:lit
kw:localhost
kw:location
kw:locking
kw:logging
kw:logo
kw:loopback
kw:lucid
kw:mac
kw:macintosh
kw:magic-folder
kw:manhole
kw:manifest
kw:manual-test-needed
kw:map
kw:mapupdate
kw:max_space
kw:mdmf
kw:memcheck
kw:memory
kw:memory-leak
kw:mesh
kw:metadata
kw:meter
kw:migration
kw:mime
kw:mingw
kw:minimal
kw:misc
kw:miscapture
kw:mlp
kw:mock
kw:more-info-needed
kw:mountain-lion
kw:move
kw:multi-users
kw:multiple
kw:multiuser-gateway
kw:munin
kw:music
kw:mutability
kw:mutable
kw:mystery
kw:names
kw:naming
kw:nas
kw:navigation
kw:needs-review
kw:needs-spawn
kw:netbsd
kw:network
kw:nevow
kw:new-user
kw:newcaps
kw:news
kw:news-done
kw:news-needed
kw:newsletter
kw:newurls
kw:nfc
kw:nginx
kw:nixos
kw:no-clobber
kw:node
kw:node-url
kw:notification
kw:notifyOnDisconnect
kw:nsa310
kw:nsa320
kw:nsa325
kw:numpy
kw:objects
kw:old
kw:openbsd
kw:openitp-packaging
kw:openssl
kw:openstack
kw:opensuse
kw:operation-helpers
kw:operational
kw:operations
kw:ophandle
kw:ophandles
kw:ops
kw:optimization
kw:optional
kw:options
kw:organization
kw:os
kw:os.abort
kw:ostrom
kw:osx
kw:osxfuse
kw:otf-magic-folder-objective1
kw:otf-magic-folder-objective2
kw:otf-magic-folder-objective3
kw:otf-magic-folder-objective4
kw:otf-magic-folder-objective5
kw:otf-magic-folder-objective6
kw:p2p
kw:packaging
kw:partial
kw:password
kw:path
kw:paths
kw:pause
kw:peer-selection
kw:performance
kw:permalink
kw:permissions
kw:persistence
kw:phone
kw:pickle
kw:pip
kw:pipermail
kw:pkg_resources
kw:placement
kw:planning
kw:policy
kw:port
kw:portability
kw:portal
kw:posthook
kw:pratchett
kw:preformance
kw:preservation
kw:privacy
kw:process
kw:profile
kw:profiling
kw:progress
kw:proxy
kw:publish
kw:pyOpenSSL
kw:pyasn1
kw:pycparser
kw:pycrypto
kw:pycrypto-lib
kw:pycryptopp
kw:pyfilesystem
kw:pyflakes
kw:pylint
kw:pypi
kw:pypy
kw:pysqlite
kw:python
kw:python3
kw:pythonpath
kw:pyutil
kw:pywin32
kw:quickstart
kw:quiet
kw:quotas
kw:quoting
kw:raic
kw:rainhill
kw:random
kw:random-access
kw:range
kw:raspberry-pi
kw:reactor
kw:readonly
kw:rebalancing
kw:recovery
kw:recursive
kw:redhat
kw:redirect
kw:redressing
kw:refactor
kw:referer
kw:referrer
kw:regression
kw:rekey
kw:relay
kw:release
kw:release-blocker
kw:reliability
kw:relnotes
kw:remote
kw:removable
kw:removable-disk
kw:rename
kw:renew
kw:repair
kw:replace
kw:report
kw:repository
kw:research
kw:reserved_space
kw:response-needed
kw:response-time
kw:restore
kw:retrieve
kw:retry
kw:review
kw:review-needed
kw:reviewed
kw:revocation
kw:roadmap
kw:rollback
kw:rpm
kw:rsa
kw:rss
kw:rst
kw:rsync
kw:rusty
kw:s3
kw:s3-backend
kw:s3-frontend
kw:s4
kw:same-origin
kw:sandbox
kw:scalability
kw:scaling
kw:scheduling
kw:schema
kw:scheme
kw:scp
kw:scripts
kw:sdist
kw:sdmf
kw:security
kw:self-contained
kw:server
kw:servermap
kw:servers-of-happiness
kw:service
kw:setup
kw:setup.py
kw:setup_requires
kw:setuptools
kw:setuptools_darcs
kw:sftp
kw:shared
kw:shareset
kw:shell
kw:signals
kw:simultaneous
kw:six
kw:size
kw:slackware
kw:slashes
kw:smb
kw:sneakernet
kw:snowleopard
kw:socket
kw:solaris
kw:space
kw:space-efficiency
kw:spam
kw:spec
kw:speed
kw:sqlite
kw:ssh
kw:ssh-keygen
kw:sshfs
kw:ssl
kw:stability
kw:standards
kw:start
kw:startup
kw:static
kw:static-analysis
kw:statistics
kw:stats
kw:stats_gatherer
kw:status
kw:stdeb
kw:storage
kw:streaming
kw:strports
kw:style
kw:stylesheet
kw:subprocess
kw:sumo
kw:survey
kw:svg
kw:symlink
kw:synchronous
kw:tac
kw:tahoe-*
kw:tahoe-add-alias
kw:tahoe-admin
kw:tahoe-archive
kw:tahoe-backup
kw:tahoe-check
kw:tahoe-cp
kw:tahoe-create-alias
kw:tahoe-create-introducer
kw:tahoe-debug
kw:tahoe-deep-check
kw:tahoe-deepcheck
kw:tahoe-lafs-trac-stream
kw:tahoe-list-aliases
kw:tahoe-ls
kw:tahoe-magic-folder
kw:tahoe-manifest
kw:tahoe-mkdir
kw:tahoe-mount
kw:tahoe-mv
kw:tahoe-put
kw:tahoe-restart
kw:tahoe-rm
kw:tahoe-run
kw:tahoe-start
kw:tahoe-stats
kw:tahoe-unlink
kw:tahoe-webopen
kw:tahoe.css
kw:tahoe_files
kw:tahoewapi
kw:tarball
kw:tarballs
kw:tempfile
kw:templates
kw:terminology
kw:test
kw:test-and-set
kw:test-from-egg
kw:test-needed
kw:testgrid
kw:testing
kw:tests
kw:throttling
kw:ticket999-s3-backend
kw:tiddly
kw:time
kw:timeout
kw:timing
kw:to
kw:to-be-closed-on-2011-08-01
kw:tor
kw:tor-protocol
kw:torsocks
kw:tox
kw:trac
kw:transparency
kw:travis
kw:travis-ci
kw:trial
kw:trickle
kw:trivial
kw:truckee
kw:tub
kw:tub.location
kw:twine
kw:twistd
kw:twistd.log
kw:twisted
kw:twisted-14
kw:twisted-trial
kw:twitter
kw:twn
kw:txaws
kw:type
kw:typeerror
kw:ubuntu
kw:ucwe
kw:ueb
kw:ui
kw:unclean
kw:uncoordinated-writes
kw:undeletable
kw:unfinished-business
kw:unhandled-error
kw:unhappy
kw:unicode
kw:unit
kw:unix
kw:unlink
kw:update
kw:upgrade
kw:upload
kw:upload-helper
kw:uri
kw:url
kw:usability
kw:use-case
kw:utf-8
kw:util
kw:uwsgi
kw:ux
kw:validation
kw:variables
kw:vdrive
kw:verify
kw:verlib
kw:version
kw:versioning
kw:versions
kw:video
kw:virtualbox
kw:virtualenv
kw:vista
kw:visualization
kw:visualizer
kw:vm
kw:volunteergrid2
kw:volunteers
kw:vpn
kw:wapi
kw:warners-opinion-needed
kw:warning
kw:weapi
kw:web
kw:web.port
kw:webapi
kw:webdav
kw:webdrive
kw:webport
kw:websec
kw:website
kw:websocket
kw:welcome
kw:welcome-page
kw:welcomepage
kw:wiki
kw:win32
kw:win64
kw:windows
kw:windows-related
kw:winscp
kw:workaround
kw:world-domination
kw:wrapper
kw:write-enabler
kw:wui
kw:x86
kw:x86-64
kw:xhtml
kw:xml
kw:xss
kw:zbase32
kw:zetuptoolz
kw:zfec
kw:zookos-opinion-needed
kw:zope
kw:zope.interface
p/blocker
p/critical
p/major
p/minor
p/normal
p/supercritical
p/trivial
r/cannot reproduce
r/duplicate
r/fixed
r/invalid
r/somebody else's problem
r/was already fixed
r/wontfix
r/worksforme
t/defect
t/enhancement
t/task
v/0.2.0
v/0.3.0
v/0.4.0
v/0.5.0
v/0.5.1
v/0.6.0
v/0.6.1
v/0.7.0
v/0.8.0
v/0.9.0
v/1.0.0
v/1.1.0
v/1.10.0
v/1.10.1
v/1.10.2
v/1.10a2
v/1.11.0
v/1.12.0
v/1.12.1
v/1.13.0
v/1.14.0
v/1.15.0
v/1.15.1
v/1.2.0
v/1.3.0
v/1.4.1
v/1.5.0
v/1.6.0
v/1.6.1
v/1.7.0
v/1.7.1
v/1.7β
v/1.8.0
v/1.8.1
v/1.8.2
v/1.8.3
v/1.8β
v/1.9.0
v/1.9.0-s3branch
v/1.9.0a1
v/1.9.0a2
v/1.9.0b1
v/1.9.1
v/1.9.2
v/1.9.2a1
v/cloud-branch
v/unknown
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: tahoe-lafs/trac#1246
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(Note that the two failures here have different causes. From comment:4 onwards, this ticket is about the second one.)
MM's buildslave "MM netbsd5 i386 warp" fails the test-from-egg step, like this:
FS's buildslave "FreeStorm Win7-amd64-mingw py2.6" fails the test-with-fake-pkg step, like this:
(In a subsequent build, this buildslave hung, and then in subsequent builds it was unable to start due to a process holding a handle to the
build
directory.)For the warp client, there isn't an allmydata egg except inside the egginstalldir itself; therefore the issue seems to be:
Code highlighting:
**Right in here... **
If I change the above os.chdir('.') to os.chdir('egginstalldir') then the test proceeds as normal. Since this is ostensibly a test from the egginstalldir location, I fail to see why it should be globbing the eggs from the enclosing directory prior to changing directory into the egginstalldir and then running the trial from that directory after overriding PYTHONPATH.
So I guess I am failing to pierce the meaning behind the way we are prepending the eggs' realpath() to PYTHONPATH from pre- to post- chdir().
Attachment buildmaster-search-parent-for-eggs.darcs.patch (81043 bytes) added
buildmaster bbsupport.py: have the test-from-egg step look for eggs in the egginstalldir as well as its parent. refs #1246
zooko: please apply attachment:buildmaster-search-parent-for-eggs.darcs.patch and restart the buildmaster.
Replying to davidsarah:
Done:
http://tahoe-lafs.org/buildbot/builders/MM%20netbsd5%20i386%20warp/builds/135
It looks like MM's buildslave is all fixed up now. FreeStorm's Win67-amd64-mingw-py2.6 is not, though:
http://tahoe-lafs.org/buildbot/builders/FreeStorm%20Win7-amd64-mingw%20py2.6/builds/154/steps/test-with-fake-pkg/logs/stdio
figure out why MM's and FS's buildslaves are red on some stepsto figure out why "FreeStorm Win7-amd64-mingw py2.6" is red on the "test-with-fake-pkg" stepReplying to [zooko]comment:3:
The
Requirements: ['allmydata-tahoe==1.8.0-r4803', ...]
line indicates what source:misc/build_helpers/run_trial.py set the*requires*_
variable to. That is supposed to tellpkg_resources
to insert entries onsys.path
so that only modules from exactly that version of Tahoe-LAFS will be imported. But in fact the installed version (which cannot be 1.8.0-r4803 because that number increases with each build) is being run.I asked freestorm to modify
run_trial.py
to print outsys.path
just before and just after importingpkg_resources
. The results show no specific version of theallmydata-tahoe
package on either of these paths. In particular, thesrc
directory of the Tahoe-LAFS distribution is not on the "before" path, as I would have expected. (That is the current directory when executingrun_trial.py
from source:misc/build_helpers/test-with-fake-pkg.py.)The code in
pkg_resources
that inserts path entries is difficult to follow, but I think that it only reorders entries and adds .egg files from directories that are already on thesys.path
, which would explain why it's not able to find the correct version ofallymydata-tahoe
. Perhaps it would help to explicitly add thesrc
directory to thePYTHONPATH
variable intest-with-fake-pkg.py
; I'll ask freestorm to try that.Attachment freestorm-test-with-fake-pkg-output.txt (6336 bytes) added
output of test-with-fake-pkg.py on freestorm's builder, with printing of sys.path before and after 'import pkg_resources' in run_trial.py
Replying to [davidsarah]comment:4:
Sorry, I was mistaken. It is on line 24 "before" and line 68 "after". The reason why the installed Tahoe is being picked up instead is that
c:\python26\lib\site-packages
is earlier thanc:\buildbot_tahoe_0.8.2\freestorm_win7-amd64-mingw_py2.6\build\src
on the "after" path, even though it is later on the "before" path. So importingpkg_resources
incorrectly changed the order of these two entries.Replying to [davidsarah]comment:5:
Freestorm and I had a long debugging session and worked out what was causing this. The buildslave has three distributions that are installed directly in
C:\Python26\lib\site-packages
:allmydata_tahoe-1.8.0c1_r4687-py2.6
,pywin32-214-py2.6.egg-info
andTwisted-10.1.0-py2.6
. Each is installed as an.egg-info
directory and source files with the same root (e.g.Twisted-10.1.0-py2.6
andtwisted
both insite-packages
).That meant that when
pkg_resources
tried to add an entry for Twisted (10.1.0) tosys.path
, it added the locationC:\Python26\lib\site-packages
, which effectively also added Tahoe 1.8.0c1-r4687 tosys.path
with the same priority. The correct Tahoe 1.8.0-r4803 was also later on the path, butpkg_resources
makes no attempt to order the requirements specified in*requires*
relative to each other..egg-info
installations directly intosite-packages
are apparently quite common :-( On my machine I have Tahoe (several .egg-infos for different versions), pywin32, Twisted 9.0.0, pycairo, pyflakes, and zetuptoolz installed in that way. The pywin32 and Twisted.exe
installers apparently do this by default.According to [http://stackoverflow.com/questions/256417/python-packages-and-egg-info-directories this stackoverflow answer], ".egg-info directories get only created if
--single-version-externally-managed
was used to install the egg". My conclusion from this is that we should never use--single-version-externally-managed
to install Tahoe into any directory where other distributions might also be installed.Anyway, Freestorm deleted the
allmydata
andallmydata_tahoe-1.8.0c1_r4687-py2.6.egg-info
directories fromsite-packages
(after taking a copy), and that [http://tahoe-lafs.org/buildbot/builders/FreeStorm%20Win7-amd64-mingw%20py2.6/builds/157/steps/test-with-fake-pkg/logs/stdio made test-with-fake-pkg go green].So if I understand correctly, the problem you are focussing on is that sometimes distributions get installed by copying their modules directly into some directory which is on
sys.path
. This makes it so thatimport $MODULENAME
will subsequently work but it is a problem, if I understand you correctly, if more than one distribution is installed into the same directory because then there is no way to prioritize one of the distributions without thereby also prioritizing all the other distributions in the same directory. By "prioritize" here I guess I mean move it closer to the front ofsys.path
. Other methods of manipulating its precedence before importing would be moving it closer to the end of thesys.path
or removing the directory from thesys.path
entirely. None of these can be done on only a single distribution if more than one distribution has been installed "directly" (by dint of copying its modules into place) in a single directory.One thing to note is that the standard distutils, without setuptools/zetuptoolz/distribute, always installs things in this way! If you're using the standard distutils, the only way to avoid doing this would be to create a new empty directory and install into that (with
--prefix
) and then add that to thesys.path
. You would have to do that for every distribution that you install.Okay, so now I can appreciate David-Sarah's conclusion: "We should never use
--single-version-externally-managed
to install Tahoe into any directory where other distributions might also be installed.". That makes sense. We already do avoid that, as far as I know. For example, quickstart.html doesn't advise the user to do that.Replying to [zooko]comment:8:
Exactly.
However, the problem in this ticket only applies to Tahoe-LAFS dependencies (direct or indirect, including the
allmydata-tahoe
package itself) that are installed in this way.This could be worked around in several ways:
a) change zetuptoolz to order "development" dists (directories containing Python code and an
.egg-info
subdirectory) after non-development dists when satisfying*requires*
lists. Note: thepkg_resources
code involved is complicated and I don't understand it.b) change zetuptoolz so that it does not view development dists as satisfying a dependency. That would cause a non-development dist to be used automatically instead. (pywin32 is a potential spanner in the works because it can't currently be installed as an egg, but maybe #142 could be fixed.) Fixing #1233 is important here, because otherwise you would have regressions where a package is already installed but only as a development dist, and building a new version of it fails because it can't be compiled.
c) change the wrapper scripts not to use the
*requires*
mechanism and to put the dependencies directly at the start ofsys.path
itself. This would still have to avoid viewing development dists as satisfying a dependency, or else it would run into the same problem.[...]
As far as I can see, nothing in our docs advises against installing Tahoe using
setup.py install
oreasy_install
. That's a standard way of installing Python packages.Besides, there's no good reason why that shouldn't work (that is, make the installed version the default, but still allow running other versions). Design failings in distutils and/or setuptools are a bad reason.
Replying to [davidsarah]comment:9:
Hmm, one way to make this work is for
setup.py install
(and thereforeeasy_install
) to actually do a build rather than an install, but also install atahoe
wrapper script for that build to the global scripts directory.Replying to [davidsarah]comment:10:
Maybe this is as simple as putting "
install = darcsver --count-all-patches develop --prefix=support make_executable build install_scripts
" in place of the existinginstall
alias in Tahoe's source:setup.cfg.Replying to [davidsarah]comment:11:
Apparently not. That does cause
python setup.py install
to build Tahoe successfully and generateC:\Python26\Scripts\tahoe.pyscript
, and the resulting script has a correct*requires*
line. Nevertheless it fails (on this machine) with the errorThis is understandable because
pycryptopp>=0.5.20
is not globally installed, the support dir of the Tahoe build is not on thePYTHONPATH
, andC:\Python26\Scripts\tahoe.pyscript
does not put it onto thePYTHONPATH
(since it is a zetuptoolz-generated script rather than the one from Tahoe'sbin
directory). Also note that it is usingpkg_resources
fromsetuptools-0.6c16dev
, which is the globally installed version.Getting
setup.py install
to work as I want it to is possible, but might have to wait for Brian's "unsuck" branch, since it's probably not a good idea to make the zetuptoolz-generated script as complicated as [the 'bin/tahoe' one]source:bin/tahoe-script.template.Attachment install-should-only-install-scripts.darcs.patch (19728 bytes) added
setup.py, setup.cfg, bin/tahoe-script.template: make it so that 'python setup.py install' just does a build and installs a script pointing to that build. refs #1246
Replying to [davidsarah]comment:10:
attachment:install-should-only-install-scripts.darcs.patch implements that. If we agree that it's a good idea, we would need a buildbot step to test it.
Replying to [davidsarah]comment:13:
... and reconsider how to implement install-to-prefix, which this patch breaks.
Replying to [davidsarah]comment:6:
Unfortunately, that's probably not sufficient (although it is necessary). The bug requires that at least one Tahoe dependency be installed as an
.egg-info
, but the other distribution in the same directory that gets imported by mistake does not itself have to have an.egg-info
directory.So, we should never use
--single-version-externally-managed
or equivalent to install Tahoe or any of its dependencies into any directory where other distributions might also be installed. But we can't control how users install, say, Twisted or pywin32 (which have installers that are equivalent to using--single-version-externally-managed
).Attachment misc-build_helper-test-1246.darcs.patch (12919 bytes) added
attachment:misc-build_helper-test-1246.darcs.patch is my attempt to exercise this problem. However, I don't think this attempt succeeds. When I run
python misc/build_helpers/test-dists-in-shared-directory.py
, I get this result:Maybe this means that the current
zetuptoolz
-based build system passes this test? Maybe the test that we want has two versions of the package, both of which are of a sufficiently high version number, and we are trying to show that the build system mistakenly imports one whenpkg_resources
reports that it uses the other.Note that this test works only if you don't have a sufficient version of
pycryptopp
installed in your system. If there is already a sufficient version of pycryptopp, then you'll get a skip.Whoops, in fact you get some sort of failure-to-run trial:
In at least some cases (#1258),
setup.py
finds the correct code butbin/tahoe
does not. Perhaps that difference is involved in the attachment:misc-build_helper-test-1246.darcs.patch test's failure to reproduce the problem (since the test invokesrun_trial.py
which invokessetup.py
).Replying to davidsarah:
Here is a untried test that imports pycryptopp in a subprocess, similar to
test_import_from_repl
in attachment🎫1258:add-test-import-in-repl.darcs.patch. Unfortunately it is complicated and depends on more than we want to depend on for this test, but let's see whether it helps to reproduce the problem.[to fix an import error.]Edited
The test in comment:18 does reproduce the error for me:
It still needs work, though. If I delete the temp directory and the code that creates the fake pycryptopp 0.5.13, I get a spurious failure:
That is, the repl indirectly attempts to import
pycryptopp.cipher.aes
. Working around that by removing the dependency on AES fromfileutil.py
, I get a skip:(0.5.25-!r757 is the version of pycryptopp that normally gets used when running Tahoe on this system. It is not installed in site-packages.)
The reason why this happens is that the
bin/tahoe
script adds thesupport/{Lib,lib/pythonx.x}/site-packages
directory to PYTHONPATH before the entries that were inherited fromtest-dists-in-shared-directory.py
. Therefore, it finds the real pycryptopp before the fake pycryptopp 99.0.0. I confirmed that by modifying the test to print PYTHONPATH in the repl, which gives (one entry on each line for clarity):(Ignore the foolscap entry, that's a workaround for foolscap 0.6.0 not being found on my system.)
My conclusion at this point is that we need to know why the problem is only occurring in subprocesses, before we can write a reliable test.
Removing
review-needed
. I will try to write a test.In changeset:e52d97a917364cb0:
Replying to davidsarah:
This is due to a different order for entries in
*requires*
. With help from abadger1999 (Toshio Kuratomi), we worked out a reliable test, using only three dists (two versions of one package and one of another), that will be independent of any globally installed packages. I'll prepare a patch for that.I'm now sure that this is the same issue as #1258, so I'm marking it as a duplicate (but all of the discussion in this ticket from comment:4 on is still relevant).