setup: remove custom Trial class inside our setup.py and use the setuptools_trial plugin

This commit is contained in:
Zooko O'Whielacronx 2008-12-05 17:22:07 -07:00
parent 2d90087420
commit a56df2587a
2 changed files with 1 additions and 27 deletions

View File

@ -35,7 +35,7 @@
<p>Run <cite>python setup.py build_tahoe</cite> to build and to install the <cite>tahoe</cite> executable into a subdirectory of the current directory named <cite>bin</cite>.</p>
<p>Run <cite>python trial</cite> to verify that it built correctly and passes all tests.</p>
<p>Run <cite>python setup.py trial</cite> to verify that it built correctly and passes all tests.</p>
<p>Run <cite>bin/tahoe --version</cite> to verify that the executable tool runs and prints out the right version number (the "allmydata" version number is the version number of the Tahoe package).</p>

View File

@ -86,10 +86,6 @@ from setuptools.command import sdist
from distutils.core import Command
from pkg_resources import require
import pkg_resources
pkg_resources.require('setuptools_trial')
from setuptools_trial.setuptools_trial import TrialTest
# Make the dependency-version-requirement, which is used by the Makefile at
# build-time, also available to the app at runtime:
import shutil
@ -299,27 +295,6 @@ class BuildTahoe(Command):
print >>sys.stderr, "'setup.py develop' exited with rc", rc
sys.exit(rc)
class Trial(TrialTest):
# Custom sub-class of the TrialTest class from the setuptools_trial
# plugin so that we can ensure certain options are set by default.
#
# Examples:
# setup.py trial # run all tests
# setup.py trial -a allmydata.test.test_util # run some tests
# setup.py trial -a '--reporter=text allmydata.test.test_util' #other args
def initialize_options(self):
TrialTest.initialize_options(self)
# We want to set the reactor to 'poll', because of bug #402
# (twisted bug #3218).
if sys.platform in ("linux2", "cygwin"):
# poll on linux2 to avoid #402 problems with select
# poll on cygwin since selectreactor runs out of fds
self.reactor = "poll"
class MySdist(sdist.sdist):
""" A hook in the sdist command so that we can determine whether this the
tarball should be 'SUMO' or not, i.e. whether or not to include the
@ -383,7 +358,6 @@ setup(name='allmydata-tahoe',
"run_with_pythonpath": RunWithPythonPath,
"check_auto_deps": CheckAutoDeps,
"build_tahoe": BuildTahoe,
"trial": Trial,
"sdist": MySdist,
},
package_dir = {'':'src'},