473,383 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

RPM generation with distutils: a little help, please.


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
0 1310

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: A.M. Kuchling | last post by:
I want to make a Distutils 1.1 release that wraps up the version of the code that was in Python 2.3. This would be the last 1.5.2-compatible release of Distutils, giving people the chance to use...
1
by: Mathieu Malaterre | last post by:
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: ...
0
by: Christopher De Vries | last post by:
The predominant operating system in my workplace is Solaris, with a bit of Linux and MacOS X thrown in. As such people expect to install new software with the sequence: ../configure make make...
1
by: Terry Hancock | last post by:
Some time ago, I got the idea that I wanted to build image resources from vector graphic originals, instead of marshalling hundreds of tiny little icon images by hand. I wrote "BuildImage" to do...
3
by: Qiangning Hong | last post by:
I am writing a setup.py for my package. I have a pre-compiled myextmod.pyd file in my package and I want the distutils to automatically copy it to...
1
by: George van den Driessche | last post by:
Hi folks, I'm looking at packaging a project I'm working on using distutils. The project is for Windows and contains a COM server which needs registration, so the installer needs to be a little...
1
by: olsongt | last post by:
I'm doing something a little wierd in one of my projects. I'm generating a C source file based on information extracted from python's header files. Although I can just generate the file and check...
7
by: Eric S. Johansson | last post by:
is there anyway I can, in a setup.py file, set and internal equivalent to the '--install-scripts' commandline option? script installation directory but I don't want on the command line where...
0
by: newbie73 | last post by:
OS: Vista Python 2.5.2.2 (ActiveState Software Installation) Running latest Cygwin release The error generated is pasted below - please help. - Luis ***************************************
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.