[Distutils] docs on using setuptools in a release cycle with RPMS
Phillip J. Eby
pje at telecommunity.com
Thu Jan 17 19:58:50 CET 2008
At 01:07 PM 1/17/2008 -0500, Noah Gift wrote:
>>>cp script.py build/lib
>>
>>Why are you doing these steps? I don't understand.
>
>In order to create an egg, to my knowledge, you create a build/lib
>directory and place your scripts or library inside, then run
>setup.py bdist_egg.
Where did you get that knowledge? We should correct whatever source
you got that from, because that is absolutely *not* the way to do it,
and is in fact a good way to lose your work. (E.g. "setup.py clean"
will delete it.)
>That is correct. I am able to create eggs with entry points that
>work just fine without specifying my module, but are you saying that
>in order to use the bdist_rpm command that I also need to include:
>
>py_modules=['liten']
No, what I'm saying is that you should have that line in your
setup.py, period, and you should not mess with the contents of
build/lib or really *anything* under build. The build/ directory is
used by the distutils to build things. Your source code goes
directly alongside setup.py, generally speaking.
You may want to review the "Distributing Python Modules" documentation at:
http://docs.python.org/dist/
As you'll find there, there is no mention of putting things into
build/ - you put things in the directory where your setup.py is, and
the distutils (or setuptools) are responsible for copying them into
build/ and other places. There are absolutely no user-serviceable
parts in build/.
What you've been doing is a bit like taking a power drill and then
turning it by the handle instead of plugging it in and pulling the
trigger. In some cases it may seem to be work, but mostly you are
just making things harder than they need to be. :)
More information about the Distutils-SIG
mailing list