You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest allowing vcpkg to install ports that are outside of its usual ports directory, perhaps by way of a switch for extra include directories, like this:
I further suggest that relative paths are taken from vcpkg's directory (rather than the current working directory) and that ./ports is always implicitly added to the search list. Forward slashes are allowed (if not enforced) on Windows for cross-platform compatibility.
My motivation for this is that we have some custom ports, not suitable for upstreaming to the public vcpkg repo, and we keep these in a repo that we recommend our devs clone alongside vcpkg's repo. I realise the current advice for this situation (in #2926) is to fork the vcpkg repo into your own hosting and commit your additional ports into that, but I'm not keen on that idea because your files and commits can get lost in the flood of vcpkg public ports.
Currently we have a step prior to vcpkg install which copies the ports from sibling directory, which this suggestion would avoid. I must admit keeping a batch file for this is not a huge burden, but I thought it would be sensible to raise the idea.
Interaction with vcpkg install -r
If support is added for something like vcpkg install -r requirements.txt (as requested in #2663), then it should also include support for --additional-port-dir, much like pip supports --extra-index-url in requirements files (see Requirements File Format). I don't propose adding them automatically on vcpkg freeze, that seems too complex to do automatically. But the file could manually edited, and end up looking like this:
An alternative idea would be to specify the path directly in the port, like this:
vcpkg install ../myportsdir/myport
This more tightly associates the port with the directory it is in, which has pros and cons.
You wouldn't accidentally pick up a port from a different directory than you expected.
You could record this information in the requirements.txt (but maybe you don't want to?)
Where would ports look for their dependencies? (Perhaps dependencies would also have to use this syntax e.g. Requires: ../myportsdir/otherport)
Could be confusing when you didn't mean to specify another directory. This will be familiar to anyone who tried pip uninstall pkgname and it failed because the current directory contains a subdirectory called pkgname! But it would be mitigated by requiring paths to be relative to vcpkg.
The text was updated successfully, but these errors were encountered:
I suggest allowing vcpkg to install ports that are outside of its usual ports directory, perhaps by way of a switch for extra include directories, like this:
I further suggest that relative paths are taken from vcpkg's directory (rather than the current working directory) and that
./ports
is always implicitly added to the search list. Forward slashes are allowed (if not enforced) on Windows for cross-platform compatibility.My motivation for this is that we have some custom ports, not suitable for upstreaming to the public vcpkg repo, and we keep these in a repo that we recommend our devs clone alongside vcpkg's repo. I realise the current advice for this situation (in #2926) is to fork the vcpkg repo into your own hosting and commit your additional ports into that, but I'm not keen on that idea because your files and commits can get lost in the flood of vcpkg public ports.
Currently we have a step prior to
vcpkg install
which copies the ports from sibling directory, which this suggestion would avoid. I must admit keeping a batch file for this is not a huge burden, but I thought it would be sensible to raise the idea.Interaction with
vcpkg install -r
If support is added for something like
vcpkg install -r requirements.txt
(as requested in #2663), then it should also include support for--additional-port-dir
, much likepip
supports--extra-index-url
in requirements files (see Requirements File Format). I don't propose adding them automatically onvcpkg freeze
, that seems too complex to do automatically. But the file could manually edited, and end up looking like this:Alternative syntax
An alternative idea would be to specify the path directly in the port, like this:
This more tightly associates the port with the directory it is in, which has pros and cons.
Requires: ../myportsdir/otherport
)pip uninstall pkgname
and it failed because the current directory contains a subdirectory calledpkgname
! But it would be mitigated by requiring paths to be relative tovcpkg
.The text was updated successfully, but these errors were encountered: