Skip to content

Commit

Permalink
Remove import of preamble to quiet pyflakes.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rodrigc committed Aug 3, 2017
1 parent 0c4b87d commit f480bff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
10 changes: 1 addition & 9 deletions bin/admin/build-apidocs
Original file line number Diff line number Diff line change
Expand Up @@ -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:])
10 changes: 1 addition & 9 deletions bin/admin/build-docs
Original file line number Diff line number Diff line change
Expand Up @@ -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:])
10 changes: 1 addition & 9 deletions bin/admin/check-topfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:])

0 comments on commit f480bff

Please sign in to comment.