setup: the .tac files created by create_node.py call pkg_resources.require() so that they can load tahoe and twisted packages which were installed with setuptools multi-version mode

Also the create_node.py script itself uses pkg_resources.require() for the same reason.
This commit is contained in:
Zooko O'Whielacronx 1970-01-01 17:50:05 -07:00
parent 68f366b584
commit 1aed9fcfa1

View File

@ -1,5 +1,8 @@
import os, sys
import pkg_resources
pkg_resources.require('allmydata-tahoe')
pkg_resources.require('twisted')
from twisted.python import usage
from allmydata.scripts.common import BasedirMixin, NoDefaultBasedirMixin
@ -26,6 +29,9 @@ class CreateIntroducerOptions(NoDefaultBasedirMixin, usage.Options):
client_tac = """
# -*- python -*-
import pkg_resources
pkg_resources.require('allmydata-tahoe')
pkg_resources.require('twisted')
from allmydata import client
from twisted.application import service
@ -38,6 +44,9 @@ c.setServiceParent(application)
introducer_tac = """
# -*- python -*-
import pkg_resources
pkg_resources.require('allmydata-tahoe')
pkg_resources.require('twisted')
from allmydata import introducer
from twisted.application import service