What is the purpose of DISTUTILS_DEBUG , if I set it to one, I cannot get
anything to run ?
For instance:
"""
from distutils.core import setup
import glob
thefiles = []
for afile in glob.glob('data dir/*'):
if afile.endswith( '.not'): continue
thefiles.append (afile)
print "Packaging up", thefiles
setup(name='jus tdata', data_files = [ [ 'foodir', thefiles ] ] )
"""
Here's an example of how this works:
[alex@lancelot tryp]$ ls datadir
aa.yes bb.not cc.yes
[alex@lancelot tryp]$ python setup.py bdist
Then try it with
export DISTUTILS_DEBUG =1
I get:
Packaging up ['bin/libgdcmijpeg8.s o', 'bin/libgdcmijpeg12. so',
'bin/libgdcmljpeg.so ', 'bin/libgdcm.so', 'bin/libvtkgdcm.so',
'bin/_gdcm.so', 'bin/libvtkgdcmPytho n.so']
Distribution.pa rse_config_file s():
options (after parsing config files):
no commands known yet
options (after parsing command line):
option dict for 'bdist' command:
{}
running bdist
Distribution.ge t_command_obj() : creating 'bdist' command object
Distribution.ge t_command_obj() : creating 'build' command object
Distribution.ge t_command_obj() : creating 'bdist_dumb' command object
bdist.run: format=gztar, command=bdist_d umb, rest=[]
running bdist_dumb
running build
Distribution.ge t_command_obj() : creating 'install' command object
installing to build/bdist.linux-i686/dumb
running install
pre-finalize_{unix, other}:
prefix: None
exec_prefix: None
home: None
install_base: None
install_platbas e: None
root: build/bdist.linux-i686/dumb
install_purelib : None
install_platlib : None
install_lib: None
install_headers : None
install_scripts : None
install_data: None
compile: None
Traceback (most recent call last):
File "setup.py", line 12, in ?
setup(name='jus tdata', data_files = [ [ 'foodir', thefiles ] ] )
File "/usr/lib/python2.2/distutils/core.py", line 138, in setup
dist.run_comman ds()
File "/usr/lib/python2.2/distutils/dist.py", line 902, in run_commands
self.run_comman d(cmd)
File "/usr/lib/python2.2/distutils/dist.py", line 922, in run_command
cmd_obj.run()
File "/usr/lib/python2.2/distutils/command/bdist.py", line 135, in run
self.run_comman d(cmd_name)
File "/usr/lib/python2.2/distutils/cmd.py", line 330, in run_command
self.distributi on.run_command( command)
File "/usr/lib/python2.2/distutils/dist.py", line 922, in run_command
cmd_obj.run()
File "/usr/lib/python2.2/distutils/command/bdist_dumb.py", line 81,
in run
self.run_comman d('install')
File "/usr/lib/python2.2/distutils/cmd.py", line 330, in run_command
self.distributi on.run_command( command)
File "/usr/lib/python2.2/distutils/dist.py", line 921, in run_command
cmd_obj.ensure_ finalized()
File "/usr/lib/python2.2/distutils/cmd.py", line 112, in ensure_finalize d
self.finalize_o ptions()
File "/usr/lib/python2.2/distutils/command/install.py", line 252, in
finalize_option s
self.dump_dirs( "pre-finalize_{unix, other}")
File "/usr/lib/python2.2/distutils/command/install.py", line 350, in
dump_dirs
val = getattr(self, opt_name)
File "/usr/lib/python2.2/distutils/cmd.py", line 107, in __getattr__
raise AttributeError, attr
AttributeError: no_compile
Could someone please fix the documentation saying that one should not
use it.
Thanks
Mathieu
Mathieu Malaterre wrote:
Hello,
I thought this would be easy but I guess I didn't get the distutil
feeling. I am trying to write a setup for install my package but I don't
understand how to do that.
organisation:
setup.py
/bin/
gdcm.py
_gdcm.so
libvtkgdcmPytho n.so
/gdcmPython/
gdcm.pth
How do you specify setup you want to install library ? Do you use
'data_files' ? Same thing for gdcm.pth is this a 'data_files' also ?
Thanks
Mathieu