A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/332034.html below:

distutils question

distutils questionJorgen Grahn jgrahn-nntq at algonet.se
Fri Sep 9 12:22:48 EDT 2005
On Wed, 07 Sep 2005 10:56:40 -0700, Joachim Dahl <joachim at ee.ucla.edu> wrote:
> I am trying to make a customized install script for an extension module 
> using the distutils.ccompiler class.
>
> I want to embed an existing makefile for the C libraries into the Python 
> setup script, but I am not sure what's the right way to do it...
>
> E.g., say I want to compile a project as:
>
> gcc -Ddef1 -c foo.c -o foo_def1.o
> gcc -Ddef2 -c foo.c -o foo_def2.o
> gcc foo_def1.o foo_def2.o -o myext_module.o
>
> How would I do that using distutils? It doesn't seem to be possible with
> the normal core.setup method, and distutils.ccompiler seems to be the
> best option, but I couldn't get it working...

When I once had to do such an abomination, I started my setup.py with code
which created renamed copies of the master source file (if they didn't
already exist and were newer than the source) and then let normal C
compilation take place,

/Jorgen

[1] For bizarre reasons, I had to import three identical *.pyd modules into
    one Python program under different names, so the *pyd files and their
    init methods had to have distinct names. Don't ask why.

-- 
  // Jorgen Grahn <jgrahn@       Ph'nglui mglw'nafh Cthulhu
\X/                algonet.se>   R'lyeh wgah'nagl fhtagn!

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4