Interesting article and discussion about Python's standard library

sarn sarn at theartofmachinery.com
Sun May 19 22:21:41 UTC 2019


On Sunday, 19 May 2019 at 19:08:27 UTC, Jacob Carlborg wrote:
> How about a new command for Dub that allows it to work like a 
> package manager without the building stuff?

In *nix land, there's the foo-config idiom, i.e., a command that 
gives you the flags needed to compile something with foo.

For example, sdl-config:

$ sdl-config --libs
-lSDL -lpthread
$ sdl-config --cflags
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT

Typical usage:
$ gcc $(sdl-config --cflags) --other --flags -c thing_using_sdl.c

It's useful because it works with any build system.

In the past I've used dummy projects containing nothing but a 
dub.json, and parsed the output of dub describe.  But I've only 
made an 80% solution, not something good enough to release as an 
official tool.


More information about the Digitalmars-d mailing list