Nuget dependency
nuget_dependency ¶
An ExternalDependency subclass able to download from NuGet.
NugetDependency ¶
An ExternalDependency subclass able to download from NuGet.
Attributes:
Name | Type | Description |
---|---|---|
source |
str
|
Source of the nuget dependency. |
version |
str
|
Version of the web dependency. |
Tip
The attributes are what must be described in the ext_dep yaml file!
__init__ ¶
__init__(descriptor: dict) -> None
Inits a nuget dependency based off the provided descriptor.
GetNugetCmd
classmethod
¶
GetNugetCmd() -> list[str]
Appends mono to the command and resolves the full path of the exe for mono.
Used to add nuget support on posix platforms. https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools
Note
Strings returned might not be pathlike given they may be quoted for use on the command line.
Returns:
Type | Description |
---|---|
list
|
["nuget.exe"] or ["mono", "/PATH/TO/nuget.exe"] |
None
|
none was found |
normalize_version
staticmethod
¶
normalize_version(
version: str, nuget_name: Optional[str] = ""
) -> str
Normalizes the version as NuGet versioning diverges from Semantic Versioning.
These cases will be handled befpre a Semantic Version Compatible" set of data is passed to the Semantic Version checker.
get_temp_dir ¶
get_temp_dir() -> str
Returns the temporary directory the NuGet package is downloaded to.