RPM generation with distutils: a little help, please.

Discussion in 'Python' started by Jorge Godoy, May 13, 2004.

  1. Jorge Godoy

    Jorge Godoy Guest

    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="",
    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,
    --
    Godoy. <>
    Jorge Godoy, May 13, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Chapman
    Replies:
    0
    Views:
    340
    Scott Chapman
    Oct 3, 2003
  2. Cliff Wells
    Replies:
    1
    Views:
    332
    Paul Boddie
    Oct 13, 2003
  3. Zhi Min
    Replies:
    0
    Views:
    388
    Zhi Min
    Jun 11, 2004
  4. Andres Baravalle

    rpm and distutils

    Andres Baravalle, Oct 12, 2004, in forum: Python
    Replies:
    0
    Views:
    280
    Andres Baravalle
    Oct 12, 2004
  5. Steven W. Orr
    Replies:
    1
    Views:
    270
    Steven W. Orr
    Mar 4, 2011
Loading...

Share This Page