rdmd and D equivalent for PYTHONPATH?

user1234 user1234 at 12.de
Wed Mar 17 06:07:01 UTC 2021


On Wednesday, 17 March 2021 at 04:34:07 UTC, Chris Piker wrote:
> On Wednesday, 17 March 2021 at 03:43:22 UTC, Chris Piker wrote:
>
>> Note: I'm aware of dub.  This isn't a question about dub.  I'm 
>> making scripts for local use, not redistributable binaries, so 
>> I would like to "install" mir-algorithm and similar libraries 
>> for my rdmd scripts to use.
>
> Sorry to reply to myself, but I found something that will run
> the scripts, though it still doesn't make use of local 
> libraries.
>
>    #!/usr/bin/env dub
>    /+ dub.sdl:
>        dependency "mir-algorithm" version="~>1.0"
>    +/
>
>    import mir.ndslice
> ...
>
> Since dub seems to work a bit better as the "interpreter" then
> rdmd (assuming you're connected to the Internet)

You can use local a specific local version too, for example the 
git repository

   #!/usr/bin/env dub
   /+ dub.sdl:
         dependency "mir-algorithm" 
path="/home/x/repositories/mir/mir-algorithm"
   +/

In addition with --nodeps, no internet is required.




More information about the Digitalmars-d-learn mailing list