Opened 16 years ago

Closed 16 years ago

Last modified 5 years ago

#1797 defect closed fixed (fixed)

twisted/web/topfiles/setup.py fails during build_scripts

Reported by: Jean-Paul Calderone Owned by:
Priority: highest Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

copying twisted/web/woven/controller.py -> build/lib/twisted/web/woven
copying twisted/web/woven/interfaces.py -> build/lib/twisted/web/woven
copying twisted/web/woven/flashconduit.py -> build/lib/twisted/web/woven
running build_scripts
error: Is a directory
Error: Subprocess exited with result 1 for project web
exarkun@kunai:~/Projects/Twisted/trunk$ 

Attachments (1)

patch-1797.diff (506 bytes) - added by amberite 16 years ago.

Download all attachments as: .zip

Change History (15)

Changed 16 years ago by amberite

Attachment: patch-1797.diff added

comment:1 Changed 16 years ago by amberite

The problem here is really in twisted.dist.getScripts, which is returning an erroneous list of scripts to the twisted/web/topfiles/setup.py installer. This is happening because twisted.dist.getScripts doesn't know what to do with a project that has no scripts, as in the case of twisted.web.

The attached patch only spackles over the problem, by passing an empty list in the "scripts" keyword argument of the setup.py file. I don't know how best to fix the real problem, in dist.getScripts, as that code needs to work for both sumo and individual distros.

comment:2 Changed 16 years ago by amberite

Keywords: review added
Owner: changed from radix to Jean-Paul Calderone

comment:3 Changed 16 years ago by Glyph

Priority: highhighest

Review tickets should be "highest" priority so they don't languish.

comment:4 Changed 16 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to radix

It seems to me that getScripts() should be fixed.

comment:5 Changed 16 years ago by radix

Just noting that this probably only happens in trunk, and the 2.4 release is fine.

comment:6 Changed 16 years ago by radix

Keywords: review added
Index: twisted/python/dist.py
===================================================================
--- twisted/python/dist.py      (revision 17384)
+++ twisted/python/dist.py      (working copy)
@@ -218,7 +218,7 @@
     thingies = os.listdir(scriptdir)
     if '.svn' in thingies:
         thingies.remove('.svn')
-    return [os.path.join(scriptdir, x) for x in thingies]
+    return filter(os.path.isfile, [os.path.join(scriptdir, x) for x in thingies])
 
 
 ## Helpers and distutil tweaks

comment:7 Changed 16 years ago by radix

Keywords: review removed

comment:8 Changed 16 years ago by radix

Keywords: review added

Ready for review in source:/branches/setup-web-without-scripts-1797

comment:9 Changed 16 years ago by Jean-Paul Calderone

Owner: changed from radix to Jean-Paul Calderone
Status: newassigned

comment:10 Changed 16 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to radix
Status: assignednew

How about a couple tests for when there are scripts, too? Also I think the getScripts call in test_noScriptsInSubproject is missing a basedir=basedir. Otherwise this branch looks really nice.

comment:11 Changed 16 years ago by radix

Keywords: review added
Owner: changed from radix to Jean-Paul Calderone

Ok, done.

comment:12 Changed 16 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

This was merged a while ago.

comment:13 Changed 11 years ago by <automation>

Owner: Jean-Paul Calderone deleted

comment:14 Changed 5 years ago by hawkowl

Keywords: review removed

[mass edit] Removing review from closed tickets.

Note: See TracTickets for help on using tickets.