[Python-bugs-list] [ python-Bugs-444589 ] install_data.py does not record dirs

noreply@sourceforge.net noreply@sourceforge.net
Tue, 04 Sep 2001 13:42:42 -0700


Bugs item #444589, was opened at 2001-07-25 13:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=444589&group_id=5470

Category: Distutils
Group: Feature Request
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jon Nelson (jnelson)
Assigned to: A.M. Kuchling (akuchling)
Summary: install_data.py does not record dirs

Initial Comment:
Let's say I want to create a directory but not put
anything in it. Logically, I would add:

data_files = [ ('directory', [] ) ],

to my setup.py file.

However, it doesn't work.
The following small patch allows special behavior for
empty file lists.  It is quite useful for normal
installs, as well as for bdist and friends.


--- install_data.py.orig        Wed Jul 25 15:27:19
2001
+++ install_data.py     Wed Jul 25 15:26:54 2001
@@ -63,6 +63,8 @@
                 elif self.root:
                     dir = change_root(self.root, dir)
                 self.mkpath(dir)
+               if f[1] == []:
+                       self.outfiles.append(dir)
                 for data in f[1]:
                     data = convert_path(data)
                     (out, _) = self.copy_file(data,
dir)




----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2001-09-04 13:42

Message:
Logged In: YES 
user_id=11375

Applied to revision 1.19 of 
distutils/commands/install_data.py.  Thanks!



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=444589&group_id=5470