[Python-bugs-list] [ python-Bugs-414032 ] clib option is broken
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 10 Aug 2001 13:25:28 -0700
Bugs item #414032, was opened at 2001-04-05 09:00
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=414032&group_id=5470
Category: Distutils
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Thomas Heller (theller)
Assigned to: A.M. Kuchling (akuchling)
Summary: clib option is broken
Initial Comment:
You cannot build a source distribution when the setup script contains libraries.
Here is the traceback:
C:\sf\py2exe>setup sdist
running sdist
Traceback (most recent call last):
File "C:\sf\py2exe\setup.py", line 317, in ?
package_dir={'py2exe.tools': "tools" + sys.version[:3]},
File "c:\python20\distutils\core.py", line 138, in setup
dist.run_commands()
File "c:\python20\distutils\dist.py", line 903, in run_commands
self.run_command(cmd)
File "c:\python20\distutils\dist.py", line 923, in run_command
cmd_obj.run()
File "C:\Python20\distutils\command\sdist.py", line 142, in run
self.get_file_list()
File "C:\Python20\distutils\command\sdist.py", line 241, in get_file_list
self.add_defaults()
File "C:\Python20\distutils\command\sdist.py", line 318, in add_defaults
self.filelist.extend(build_clib.get_source_files())
File "c:\python20\distutils\cmd.py", line 107, in __getattr__
raise AttributeError, attr
AttributeError: get_source_files
C:\sf\py2exe>
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2001-08-10 13:25
Message:
Logged In: YES
user_id=11375
Fixed in revision 1.23 of build_clib.py, by adding Rene's
.get_source_files() method. Thanks!
----------------------------------------------------------------------
Comment By: Rene Liebscher (rliebscher)
Date: 2001-08-07 01:01
Message:
Logged In: YES
user_id=28463
remove the line
self.check_extensions_list(self.extensions)
in the previous comment (it doesn't belong there,
it was accidently pasted in.)
----------------------------------------------------------------------
Comment By: Rene Liebscher (rliebscher)
Date: 2001-08-07 00:50
Message:
Logged In: YES
user_id=28463
(How can I attach files?)
def get_source_files (self):
filenames = []
for (lib_name, build_info) in self.libraries:
sources = build_info.get('sources')
if sources is None or type(sources) not in \
(ListType, TupleType):
raise DistutilsSetupError, \
("in 'libraries' option (library '%s'), "+ \
"'sources' must be present and must be "+ \
"a list of source filenames") % lib_name
filenames.extend(sources)
self.check_extensions_list(self.extensions)
return filenames
----------------------------------------------------------------------
Comment By: Rene Liebscher (rliebscher)
Date: 2001-08-07 00:46
Message:
Logged In: YES
user_id=28463
The problem is the missing get_source_files method in
distutils/command/build_clib.py.
I think someone has already solved the problem, it doesn't
seem too hard.
Adding a method similar to build_ext.py should
the problem.
See the attached file for a suggestion. (It is not tested by
me.)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=414032&group_id=5470