distutils problem

M

Michele Petrazzo

I create a setup script for distribute my application, but I have a
problems with the exe package.

When I create the package with:
python setup.py win bdist_wininst

and execute if after, it'll copy the data file specified by data_files
directive into the C:\python23\python23\lib\site-package\my_lib, so not
on the right site-package directory (python23 + python23).
Otherwise if I use the same script from the source (python setup.py
install) it work well, so it copy on C:\python23\lib\site-package\my_lib
or /usr/lib/python23/site-package/ on linux. (this for python 2.3, of
course :) )

My script:

dataToCopy = glob.glob("FreeImagePy/data/*.*")
if sys.platform == 'win32': prefix = os.path.join(sys.prefix,
"Lib/site-packages/FreeImagePy")
else: prefix = os.path.join(sys.exec_prefix, "lib/python%s" %
sys.version[:3], "site-packages/FreeImagePy")
setup( ....
packages=['FreeImagePy', 'FreeImagePy.test', 'FreeImagePy.tools'],
data_files=[ (prefix, dataToCopy),],
)


How can I modify my script, for make it work with exe package?

Thanks,
Michele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top