[Distutils] docs on using setuptools in a release cycle with RPMS

Phillip J. Eby pje at telecommunity.com
Thu Jan 17 17:47:53 CET 2008


At 09:54 AM 1/17/2008 -0500, Noah Gift wrote:

>On Jan 17, 2008, at 9:32 AM, Phillip J. Eby wrote:
>
>>At 04:16 AM 1/17/2008 -0500, Noah Gift wrote:
>>>I am trying to get egg generation entry points integrated with
>>>building RPM's, and hopefully debian packages too.  I haven't had
>>>much
>>>luck finding any documentation on this though.  My specific
>>>question is:
>>>
>>>Can I use:
>>>
>>>python2.5 ./setup.py bdist_rpm --binary-only --release=py25 -- python=/
>>>usr/local/bin/python2.5
>>>
>>>
>>>and expect that an console script entry point I define in setup.py
>>>will install to the bin directory for an rpm as well?
>>
>>Give it a try and see.  :)  (Yes, setuptools does support bdist_rpm.)
>
>I knew you were going to say that :)  I was actually struggling a bit
>early this morning trying to figure out exactly how it works.  I was
>hoping I wouldn't have to actually give a traceback and reveal a
>stupid mistake :)
>
>My, for now, build cycle, until I automate it, is that I create a
>build/lib directory:
>
>Step 1:
>
>mkdir -p build/lib
>
>Step 2:
>
>Place script inside of build/lib
>
>cp script.py build/lib

Why are you doing these steps?  I don't understand.


>Step 3:
>
>In current directory run:
>
>python2.4 ./setup.py bdist_rpm --binary-only --release=py24 
>--python=/ usr/local/bin/python2.4
>
>Step 4:
>
>Grab rpm out of newly created dist directory:
>
>This process works just fine if I substitute:
>
>python2.4 ./setup.py bdist_egg
>
>
>In my setup.py I have an entry point as follows:
>
>  entry_points="""
>       [console_scripts]
>       liten = liten:main
>       """,
>       )

What's the rest of your setup.py?

>My guess is that somehow I am not creating the RPM properly, and I
>need to have a different directly structure then when creating an egg?

My guess is that your 'liten' module isn't listed in the py_modules 
argument to setup().  Is it?




More information about the Distutils-SIG mailing list