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

Hi!
For the following setup.py, I get this error:

byte-compiling /var/tmp/bhsys-buildroot/usr/lib/python2.3/site-packages/bhsys/Impressao.py
to Impressao.pyc
byte-compiling /var/tmp/bhsys-buildroot/usr/lib/python2.3/site-packages/bhsys/bhsys.py
to bhsys.pyc
running install_scripts
copying build/scripts-2.3/bhsys.py -> /var/tmp/bhsys-buildroot/usr/bin
changing mode of /var/tmp/bhsys-buildroot/usr/bin/bhsys.py 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)
============================= setup.py ====================================
import os
from distutils.core import setup
import distutils.sysconfig

setup(name="bhsys",
version="0.1",
description="BH Sys",
author="G2C Tech Consultoria Ltda.",
author_email="co*******@g2ctech.com",
url="http://www.g2ctech.com/",
packages=['bhsys.biblioteca', 'bhsys'],
package_dir = {'bhsys': '.',
'biblioteca': 'biblioteca',},
scripts=['bhsys.py'],
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/clientes.png',
'imagens/compras.png', 'imagens/exit.png',
'imagens/financeiro.png',
'imagens/g2ctech.png', 'imagens/manutencao.png',
'imagens/notas.png',
'imagens/rh.png', 'imagens/sair.png', 'imagens/seta.png',
'imagens/seta2.png', 'imagens/tecnico.png',
'imagens/telefone.png']),

(os.path.sep.join([distutils.sysconfig.get_python_lib(),'bhsys']),
['config.ini']),
]
)
================================================== =========================

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
directory?

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?
Thanks,
--
Godoy. <go***@ieee.org>
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.