RejectedSoftware Forums

Sign up

how to tell dub about distributed import libs

so pyd distributes import libraries for python/dmd/windows.

when I try to reference them in "libs", dub looks for them in the current directory rather than in the .dub package directory. Is there a way to specify a path relative to the dub package directory?

Re: how to tell dub about distributed import libs

On Sun, 11 Jan 2015 21:19:34 GMT, ariovistus wrote:

so pyd distributes import libraries for python/dmd/windows.

when I try to reference them in "libs", dub looks for them in the current directory rather than in the .dub package directory. Is there a way to specify a path relative to the dub package directory?

Do you have the "libs" field in the main project's dub.json, or in the one for pyd itself? In the latter case it should search in the proper folder within the pyd package instead of the current directory.

If you absolutely need to put it into the main project's dub.json, you can get access to pyd's directory using "libs": ["$PYD_PACKAGE_DIR/somelib.lib"].

Re: how to tell dub about distributed import libs

On Thu, 15 Jan 2015 10:32:49 GMT, Sönke Ludwig wrote:

Do you have the "libs" field in the main project's dub.json, or in the one for pyd itself? In the latter case it should search in the proper folder within the pyd package instead of the current directory.

libs is in the pyd dub.json. It doesn't seem to be searching in the pyd package folder, but I'll check it again.

Re: how to tell dub about distributed import libs

On Thu, 15 Jan 2015 10:32:49 GMT, Sönke Ludwig wrote:

If you absolutely need to put it into the main project's dub.json, you can get access to pyd's directory using "libs": ["$PYD_PACKAGE_DIR/somelib.lib"].

$PYD_PACKAGE_DIR worked fine in pyd's dub.json, thanks.

Re: how to tell dub about distributed import libs

Am 15.01.2015 um 16:17 schrieb ariovistus:

On Thu, 15 Jan 2015 10:32:49 GMT, Sönke Ludwig wrote:

Do you have the "libs" field in the main project's dub.json, or in the one for pyd itself? In the latter case it should search in the proper folder within the pyd package instead of the current directory.

libs is in the pyd dub.json. It doesn't seem to be searching in the pyd package folder, but I'll check it again.

Thinking about it, the "libs" field is in fact basically passed to the
compiler as-is. We'd probably need a separate "libFiles" field to
properly express link dependencies to specific files compiler
independently. I'll open an enhancement ticket for that.

Re: how to tell dub about distributed import libs

Am 16.01.2015 um 13:51 schrieb Sönke Ludwig:

Am 15.01.2015 um 16:17 schrieb ariovistus:

On Thu, 15 Jan 2015 10:32:49 GMT, Sönke Ludwig wrote:

Do you have the "libs" field in the main project's dub.json, or in
the one for pyd itself? In the latter case it should search in the
proper folder within the pyd package instead of the current directory.

libs is in the pyd dub.json. It doesn't seem to be searching in the
pyd package folder, but I'll check it again.

Thinking about it, the "libs" field is in fact basically passed to the
compiler as-is. We'd probably need a separate "libFiles" field to
properly express link dependencies to specific files compiler
independently. I'll open an enhancement ticket for that.

Oh actually this is already handled by the "sourceFiles" field. The
.lib extension is recognized and then properly passed to the linker.
Relative paths work there as usual.

... seems like I've forgotten a lot of things during the past three
months without this stuff.