Patches item #1183712, was opened at 2005-04-15 14:34 Message generated for change (Comment added) made by calvin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1183712&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Distutils and setup.py Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Wummel (calvin) Assigned to: Nobody/Anonymous (nobody) Summary: package_data chops off first char of default package Initial Comment: If the package name is an empty string (ie the default package), all package_data files have the first character chopped off. Attached is a test package pytest.tar.gz where running python2.4 setup.py build_py produces this error: running build_py creating build creating build/lib copying __init__.py -> build/lib error: can't copy 'ATA': doesn't exist or not a regular file Also attached is a fix proposal, though I have tested this only against the test package. ---------------------------------------------------------------------- >Comment By: Wummel (calvin) Date: 2006-05-22 22:13 Message: Logged In: YES user_id=9205 I found it in another Python program (don't remember which though). So I did not think of this as an undocumented feature. I tried it and it worked (except the data file stuff :). The patch should not break any currently working setup.py installation, since src_dir is only empty when using '' (empty string) as package name. Perhaps a cleaner approach would be to forbid an empty package name instead of silently accepting it? I am not sure. At least the documentation should mention that empty package names are not allowed. ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2006-04-15 10:23 Message: Logged In: YES user_id=21627 Why are you using an empty name as the package name? There is no default package in Python, so this shouldn't work at all. ---------------------------------------------------------------------- Comment By: Hervé Cauwelier (hcauwelier) Date: 2005-10-05 13:03 Message: Logged In: YES user_id=1216236 The patch worked well for me, thanks for it! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1183712&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches