distutils + bdist_rpm + sdist

Chris Green cmg at dok.org
Wed Mar 24 16:34:58 EST 2004


Hey folks,

One common problem that I run into with python modules is bdist_rpm
fails because file XYZ is missing.  This seems to be because bdist_rpm
is build from the sdist [1].

I'm playing with the Pyrex module and bdist_rpm fails because of files
in the scripts=[list] directive not being included in the sdist.

How can I add files into the sdist without changing how scripts is
represented for bdist?

# Pyrex's setup.py

from distutils.core import setup
from distutils.sysconfig import get_python_lib
import os.path
 
dfile_dir = os.path.join(get_python_lib(prefix=''), 'Pyrex/Compiler')
 
setup(
  name='PyrexWithDistutilsSupport',
  scripts=['pyrexc',],
  packages=[
    'Pyrex',
    'Pyrex.Compiler',
    'Pyrex.Distutils',
    'Pyrex.Mac',
    'Plex'
    ],
  data_files=[
    (dfile_dir, ['Pyrex/Compiler/Lexicon.pickle'])
    ]
  )


Footnotes: 
[1]  http://www.python.org/doc/current/dist/sdist-cmd.html

-- 
Chris Green <cmg at dok.org>
You now have 14 minutes to reach minimum safe distance.



More information about the Python-list mailing list