Distutils and binaries without compilation
Jorgen Grahn
jgrahn-nntq at algonet.se
Tue Sep 21 18:12:52 EDT 2004
On Tue, 21 Sep 2004 10:45:19 +0100, Mark English <Mark.English at liffe.com> wrote:
> The short version of this question is how do you include binaries in a
> distribution without including their source ?
setup.py bdist
or in your case
setup.py bdist_wininst
> The long version follows...
> I have a Python package I want to distribute internally to my company
> which makes use of pure python modules and C-extensions (.pyd files)
> under Windows (and hopefully one day Unix too). The build for the
> extensions is large and arduous so I do not want to include the source.
> I would rather just include the compiled binaries so that when the user
> installs the package they are written into the relevant location and the
> whole thing is ready to go.
...
> And end up with a zip file containing all the .py (and.pyc) files in the
> correct structure but no .pyd files.
I skipped the details, but if 'bdist' doesn't create an archive which
includes the .pyd files, you've made an error in setup.py.
A 'bdist' is supposed to be specific for an OS and a Python release, and
contain Python sources (and .pyc, .pyo?) and binary extension modules, but
no C sources.
That said, I find distutil's mechanisms for building extension modules a bit
simplistic. Probably easy to get wrong except in the simple cases.
/Jorgen
--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn!
More information about the Python-list
mailing list