~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to twisted/python/dist.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-17 14:52:35 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070117145235-btmig6qfmqfen0om
Tags: 2.5.0-0ubuntu1
New upstream version, compatible with python2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
twisted_subprojects = ["conch", "flow", "lore", "mail", "names",
16
16
                       "news", "pair", "runner", "web", "web2",
17
 
                       "words", "pb", "vfs"]
 
17
                       "words", "vfs"]
18
18
 
19
19
 
20
20
def setup(**kw):
204
204
 
205
205
 
206
206
 
207
 
def getScripts(projname):
 
207
def getScripts(projname, basedir=''):
208
208
    """
209
209
    Returns a list of scripts for a Twisted subproject; this works in
210
 
    any of an SVN checkout, a project-specific tarball, or the Sumo
211
 
    tarball.
 
210
    any of an SVN checkout, a project-specific tarball.
212
211
    """
213
 
    scriptdir = os.path.join('bin', projname)
 
212
    scriptdir = os.path.join(basedir, 'bin', projname)
214
213
    if not os.path.isdir(scriptdir):
215
214
        # Probably a project-specific tarball, in which case only this
216
215
        # project's bins are included in 'bin'
217
 
        scriptdir = 'bin'
 
216
        scriptdir = os.path.join(basedir, 'bin')
 
217
        if not os.path.isdir(scriptdir):
 
218
            return []
218
219
    thingies = os.listdir(scriptdir)
219
220
    if '.svn' in thingies:
220
221
        thingies.remove('.svn')
221
 
    return [os.path.join(scriptdir, x) for x in thingies]
 
222
    return filter(os.path.isfile, 
 
223
                  [os.path.join(scriptdir, x) for x in thingies])
222
224
 
223
225
 
224
226
## Helpers and distutil tweaks