RPM generation with distutils: a little help, please.

J

Jorge Godoy

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="(e-mail address removed)",
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','imagens']),
['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,
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top