Skip to content

Commit 0207479

Browse files
authored
add nuget package for WinRT (microsoft#361)
1 parent a9fb933 commit 0207479

File tree

4 files changed

+88
-2
lines changed

4 files changed

+88
-2
lines changed

SPTAG.WinRT.nuspec

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package >
3+
<metadata>
4+
<id>SPTAG.WinRT</id>
5+
<version>1.2.13-mainOPQ-CoreLib-SPANN-withsource-a6b7604</version>
6+
<title>SPTAG.WinRT</title>
7+
<authors>cheqi,haidwa,mingqli</authors>
8+
<owners>cheqi,haidwa,mingqli,zhah</owners>
9+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
10+
<licenseUrl>https://github.com/microsoft/SPTAG</licenseUrl>
11+
<projectUrl>https://github.com/microsoft/SPTAG</projectUrl>
12+
<description>SPTAG (Space Partition Tree And Graph) is a library for large scale vector approximate nearest neighbor search scenario released by Microsoft Research (MSR) and Microsoft Bing.</description>
13+
<releaseNotes>publish with commit microsoft/add python version in wheel package/a6b7604</releaseNotes>
14+
<copyright>Copyright © Microsoft</copyright>
15+
<dependencies>
16+
<group targetFramework="uap10.0">
17+
<dependency id="Zstandard.dyn.x64" version="1.4.0" />
18+
</group>
19+
<group targetFramework="native">
20+
<dependency id="Zstandard.dyn.x64" version="1.4.0" />
21+
</group>
22+
</dependencies>
23+
</metadata>
24+
<files>
25+
<file src="Wrappers\WinRT\SPTAG.WinRT.targets" target="build\native" />
26+
<file src="x64\Release\SPTAG.WinRT\SPTAG.winmd" target="lib\uap10.0" />
27+
<file src="x64\Release\SPTAG.WinRT\SPTAG.dll" target="runtimes\win10-x64\native" />
28+
<file src="readme.md" />
29+
<file src="LICENSE" />
30+
</files>
31+
</package>

Wrappers/WinRT/SPTAG.WinRT.targets

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup>
5+
<Native-Platform Condition="'$(Platform)' == 'Win32'">x86</Native-Platform>
6+
<Native-Platform Condition="'$(Platform)' != 'Win32'">$(Platform)</Native-Platform>
7+
<_nugetNativeFolder>$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(Native-Platform)\native\</_nugetNativeFolder>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<Reference Include="$(MSBuildThisFileDirectory)..\..\lib\uap10.0\SPTAG.winmd" Private="false">
12+
<Implementation>SPTAG.dll</Implementation>
13+
</Reference>
14+
15+
<ReferenceCopyLocalPaths Condition="Exists('$(_nugetNativeFolder)SPTAG.dll')" Include="$(_nugetNativeFolder)SPTAG.dll" />
16+
<ReferenceCopyLocalPaths Condition="Exists('$(_nugetNativeFolder)SPTAG.pri')" Include="$(_nugetNativeFolder)SPTAG.pri" />
17+
<ReferenceCopyLocalPaths Condition="$(Configuration) == 'Debug'" Include="$(_nugetNativeFolder)**\*.xbf" />
18+
</ItemGroup>
19+
</Project>

Wrappers/WinRT/SPTAG.WinRT.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<AppContainerApplication>true</AppContainerApplication>
1515
<ApplicationType>Windows Store</ApplicationType>
1616
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
17-
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.22621.0</WindowsTargetPlatformVersion>
17+
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0</WindowsTargetPlatformVersion>
1818
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
1919
</PropertyGroup>
2020
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -81,7 +81,7 @@
8181
<Import Project="..\..\packages\Zstandard.dyn.x64.1.4.0\build\native\Zstandard.dyn.x64.targets" Condition="Exists('..\..\packages\Zstandard.dyn.x64.1.4.0\build\native\Zstandard.dyn.x64.targets')" />
8282
</ImportGroup>
8383
<PropertyGroup Label="UserMacros" />
84-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
84+
<PropertyGroup>
8585
<IncludePath>../../AnnService/;$(IncludePath)</IncludePath>
8686
</PropertyGroup>
8787
<ItemDefinitionGroup>

setup.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,42 @@ def _find_python_packages():
111111
''' % (nuget_release)
112112
f.write(spec)
113113
f.close()
114+
115+
fwinrt = open('sptag.winrt.nuspec', 'w')
116+
spec = '''<?xml version="1.0" encoding="utf-8"?>
117+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
118+
<metadata>
119+
<id>MSSPTAG.WinRT</id>
120+
<version>%s</version>
121+
<title>MSSPTAG.WinRT</title>
122+
<authors>cheqi,haidwa,mingqli</authors>
123+
<owners>cheqi,haidwa,mingqli</owners>
124+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
125+
<licenseUrl>https://github.com/microsoft/SPTAG</licenseUrl>
126+
<projectUrl>https://github.com/microsoft/SPTAG</projectUrl>
127+
<description>SPTAG (Space Partition Tree And Graph) is a library for large scale vector approximate nearest neighbor search scenario released by Microsoft Research (MSR) and Microsoft Bing.</description>
128+
<copyright>Copyright @ Microsoft</copyright>
129+
<dependencies>
130+
<group targetFramework="uap10.0">
131+
<dependency id="Zstandard.dyn.x64" version="1.4.0" />
132+
</group>
133+
<group targetFramework="native">
134+
<dependency id="Zstandard.dyn.x64" version="1.4.0" />
135+
</group>
136+
</dependencies>
137+
</metadata>
138+
<files>
139+
<file src="Wrappers\\WinRT\\SPTAG.WinRT.targets" target="build\\native" />
140+
<file src="x64\Release\\SPTAG.WinRT\\SPTAG.winmd" target="lib\\uap10.0" />
141+
<file src="x64\Release\\SPTAG.WinRT\\SPTAG.dll" target="runtimes\\win10-x64\\native" />
142+
<file src="readme.md" />
143+
<file src="LICENSE" />
144+
</files>
145+
</package>
146+
''' % (nuget_release)
147+
fwinrt.write(spec)
148+
fwinrt.close()
149+
114150
f = open(os.path.join('sptag', '__init__.py'), 'w')
115151
f.close()
116152
return ['sptag']

0 commit comments

Comments
 (0)