Re: Python recompile

Liste des GroupesRevenir à cl python 
Sujet : Re: Python recompile
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.c comp.lang.python
Date : 07. Mar 2025, 22:26:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqfoam$3nnbq$4@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Pan/0.162 (Pokrosvk)
On Thu, 6 Mar 2025 19:21:45 -0000 (UTC), Waldek Hebisch wrote:

Per platform Makefile-s do not scale when one wants to support multiple
system and multiple configurations (there is exponential growth of
possible combinations).  And even of single configuration for supposedly
single system like Linux there are troubles.
In one project there was someting like 20 Makefile.linux_x files where x
represented one Linux flavour.  Yet regularly somebody would come and
say: "build fails on my Linux x.y.z".  If enough information was
provided new Makefile was added, or possibly some similar Makefile was
modified to cover more cases.

Can you offer more details on the project in question? I ask because
there are things that can be done in GNU Makefiles to deal more
dynamically with environmental differences in some simpler cases,
without resorting to a full-on meta-build system like Autotools or
CMake, and perhaps the maintainers of this project aren’t aware of
that.

Here’s a simple example, building an extension module for Python:

    CFLAGS=-g $(shell python3-config --includes) -fPIC -Wall -Wno-switch -Wno-parentheses

    gxscript_lexer.so : gxscript_lexer.o
        $(CC) $^ $(shell python3-config --ldflags) -shared -o $@

    gxscript_lexer.o : gxscript_lexer.c

    clean :
        rm -f gxscript_lexer.so gxscript_lexer.o
        rm -rf __pycache__

    .PHONY : clean

Note how it uses the “python3-config” command to figure out the right
flags (including file/directory locations) for compilation and
linking. So it doesn’t have to know that the libraries are in /usr/lib
on one system, and /usr/local/lib on another.

Date Sujet#  Auteur
2 Mar 25 * Re: Python recompile60Lew Pitcher
2 Mar 25 +* Re: Python recompile58Muttley
2 Mar 25 i+* Re: Python recompile2Lew Pitcher
3 Mar 25 ii`- Re: Python recompile1Muttley
2 Mar 25 i`* Re: Python recompile55James Kuyper
3 Mar 25 i `* Re: Python recompile54Muttley
3 Mar 25 i  +* Re: Python recompile5Richard Heathfield
3 Mar 25 i  i`* Re: Python recompile4Muttley
3 Mar 25 i  i +* Re: Python recompile2bart
3 Mar 25 i  i i`- Re: Python recompile1Muttley
3 Mar 25 i  i `- Re: Python recompile1Richard Heathfield
3 Mar 25 i  `* Re: Python recompile48James Kuyper
3 Mar 25 i   +- Re: Python recompile1Muttley
3 Mar 25 i   `* Re: Python recompile46geodandw
3 Mar 25 i    +- Re: Python recompile1Muttley
3 Mar 25 i    +* Re: Python recompile26James Kuyper
3 Mar 25 i    i+* Re: Python recompile23Muttley
3 Mar 25 i    ii+* Re: Python recompile3David Brown
4 Mar 25 i    iii`* Re: Python recompile2Muttley
4 Mar 25 i    iii `- Re: Python recompile1Kaz Kylheku
3 Mar 25 i    ii+* Re: Python recompile18Richard Heathfield
4 Mar 25 i    iii`* Re: Python recompile17Muttley
4 Mar 25 i    iii `* Re: Python recompile16Richard Heathfield
4 Mar 25 i    iii  +* Re: Python recompile14Muttley
4 Mar 25 i    iii  i`* Re: Python recompile13Richard Heathfield
4 Mar 25 i    iii  i `* Re: Python recompile12Muttley
4 Mar 25 i    iii  i  +* Re: Python recompile2Richard Heathfield
4 Mar 25 i    iii  i  i`- Re: Python recompile1Muttley
4 Mar 25 i    iii  i  `* Re: Python recompile9Kaz Kylheku
4 Mar 25 i    iii  i   `* Re: Python recompile8bart
5 Mar 25 i    iii  i    +* Re: Python recompile6Muttley
6 Mar 25 i    iii  i    i`* Re: Python recompile5Waldek Hebisch
7 Mar 25 i    iii  i    i +- Re: Python recompile1Muttley
7 Mar 25 i    iii  i    i `* Re: Python recompile3Lawrence D'Oliveiro
7 Mar 25 i    iii  i    i  +- Re: Python recompile1bart
10 Mar 25 i    iii  i    i  `- Re: Python recompile1Waldek Hebisch
6 Mar 25 i    iii  i    `- Re: Python recompile1Lawrence D'Oliveiro
5 Mar 25 i    iii  `- Re: Python recompile1James Kuyper
4 Mar 25 i    ii`- Re: Python recompile1Kenny McCormack
3 Mar 25 i    i`* Re: Python recompile2geodandw
3 Mar 25 i    i `- Re: Python recompile1James Kuyper
3 Mar 25 i    +* Re: Python recompile10Richard Heathfield
3 Mar 25 i    i`* Re: Python recompile9geodandw
3 Mar 25 i    i +* Re: Python recompile4Richard Heathfield
4 Mar 25 i    i i`* Re: Python recompile3geodandw
4 Mar 25 i    i i +- Re: Python recompile1Kaz Kylheku
4 Mar 25 i    i i `- Re: Python recompile1Richard Heathfield
4 Mar 25 i    i `* Re: Python recompile4David Brown
4 Mar 25 i    i  +* Re: Python recompile2Richard Heathfield
4 Mar 25 i    i  i`- Re: Python recompile1Muffley
4 Mar 25 i    i  `- Re: Python recompile1Michael S
3 Mar 25 i    +* Re: Python recompile3David Brown
4 Mar 25 i    i`* Re: Python recompile2Muttley
4 Mar 25 i    i `- Re: Python recompile1Kaz Kylheku
6 Mar 25 i    `* Re: Python recompile5Stuart Redmann
6 Mar 25 i     +* Re: Python recompile2Richard Heathfield
6 Mar 25 i     i`- Re: Python recompile1Muttley
6 Mar 25 i     +- Re: Python recompile1Chris M. Thomasson
7 Mar 25 i     `- Re: Python recompile1James Kuyper
2 Mar 25 `- Re: Python recompile1Left Right

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal