Remove import of preamble to quiet pyflakes.

We don't really need preamble any more in these scripts, because
these scripts are run inside tox environments which properly
install Twisted in a virtualenv with the correct paths set up.

These scripts are not distributed as part of Twisted, but are used
during the Twisted release process.
This commit is contained in:
Craig Rodrigues 2017-08-03 16:59:57 -07:00
parent 0c4b87d2da
commit f480bff780
3 changed files with 3 additions and 27 deletions

View File

@ -6,15 +6,7 @@
# This script is not meant to be distributed to users of Twisted.
# It is only for use in making upstream Twisted releases.
import sys, os
extra = os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), "src")
sys.path.insert(0, extra)
try:
import _preamble
except ImportError:
pass
sys.path.remove(extra)
import sys
from twisted.python._release import BuildAPIDocsScript
BuildAPIDocsScript().main(sys.argv[1:])

View File

@ -6,15 +6,7 @@
# This script is not meant to be distributed to users of Twisted.
# It is only for use in making upstream Twisted releases.
import sys, os
extra = os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), "src")
sys.path.insert(0, extra)
try:
import _preamble
except ImportError:
pass
sys.path.remove(extra)
import sys
from twisted.python._release import SphinxBuilder
SphinxBuilder().main(sys.argv[1:])

View File

@ -8,15 +8,7 @@ Check that the current commits since branching have a topfile.
from __future__ import absolute_import, division, print_function
import sys, os
extra = os.path.dirname(os.path.dirname(sys.argv[0]))
sys.path.insert(0, extra)
try:
import _preamble
except ImportError:
pass
sys.path.remove(extra)
import sys
from twisted.python._release import CheckTopfileScript
CheckTopfileScript(print).main(sys.argv[1:])