By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,091 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,091 IT Pros & Developers. It's quick & easy.

RPM generation with distutils: a little help, please.

P: n/a

For the following, I get this error:

byte-compiling /var/tmp/bhsys-buildroot/usr/lib/python2.3/site-packages/bhsys/
to Impressao.pyc
byte-compiling /var/tmp/bhsys-buildroot/usr/lib/python2.3/site-packages/bhsys/
to bhsys.pyc
running install_scripts
copying build/scripts-2.3/ -> /var/tmp/bhsys-buildroot/usr/bin
changing mode of /var/tmp/bhsys-buildroot/usr/bin/ to 755
running install_data
error: can't copy 'imagens/BH_Sys.png': doesn't exist or not a regular file
erro: Status de saída ruim em /var/tmp/rpm-tmp.39012 (%install)
============================= ====================================
import os
from distutils.core import setup
import distutils.sysconfig

description="BH Sys",
author="G2C Tech Consultoria Ltda.",
packages=['bhsys.biblioteca', 'bhsys'],
package_dir = {'bhsys': '.',
'biblioteca': 'biblioteca',},
data_files=[(os.path.sep.join([distutils.sysconfig.get_python_lib(),'bhsys','imag ens']),
['imagens/BH_Sys.png', 'imagens/BH_SysB.png',
'imagens/BH_logo.png', 'imagens/adm.png',
'imagens/compras.png', 'imagens/exit.png',
'imagens/g2ctech.png', 'imagens/manutencao.png',
'imagens/rh.png', 'imagens/sair.png', 'imagens/seta.png',
'imagens/seta2.png', 'imagens/tecnico.png',

================================================== =========================

Any hints on how I can make it work? And, please, is there a more effective
way of putting the images (imagens, in pt_BR) below the site-packages/bhsys

This is working perfectly for tarballs and it is also able to create a
".exe" installer on Windows, but it fails for RPM.

The image file pointed out in the error message is there... I think it's
something related to copying it to the specific directory used by rpmbuild
in the specfile, but is there any way to do that from distutils?
Godoy. <go***>
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.