From 71c1fc47f4fdcb4c6369e379e1b1c61daf0a8953 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sun, 26 Nov 2017 14:06:49 +0100 Subject: [PATCH] FSharp: try to drive NuSpec from csproj; Paket install --- .paket/Paket.Restore.targets | 265 +++++++++++++++++++++++++++++++++ build.fsx | 11 +- src/Data/Matlab/Matlab.csproj | 8 +- src/Data/Text/Text.csproj | 8 +- src/FSharp/FSharp.fsproj | 37 ++++- src/Numerics/Numerics.csproj | 2 +- src/UnitTests/UnitTests.csproj | 74 ++++----- 7 files changed, 352 insertions(+), 53 deletions(-) create mode 100644 .paket/Paket.Restore.targets diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets new file mode 100644 index 00000000..98c71f92 --- /dev/null +++ b/.paket/Paket.Restore.targets @@ -0,0 +1,265 @@ + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + true + $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory)..\ + $(PaketRootPath)paket-files\paket.restore.cached + $(PaketRootPath)paket.lock + /Library/Frameworks/Mono.framework/Commands/mono + mono + + $(PaketRootPath)paket.exe + $(PaketToolsPath)paket.exe + "$(PaketExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" + $(PaketRootPath)paket.bootstrapper.exe + $(PaketToolsPath)paket.bootstrapper.exe + "$(PaketBootStrapperExePath)" + $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" + + + + + true + true + + + + + + + true + $(NoWarn);NU1603 + + + + + /usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }' + /usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }' + + + + + + + + + + + + + $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) + $([System.IO.File]::ReadAllText('$(PaketLockFilePath)')) + true + false + true + + + + + + + + + $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached + + $(MSBuildProjectFullPath).paket.references + + $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references + + $(MSBuildProjectDirectory)\paket.references + $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).$(TargetFramework).paket.resolved + true + references-file-or-cache-not-found + + + + + $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)')) + $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)')) + references-file + false + + + + + false + + + + + true + target-framework '$(TargetFramework)' + + + + + + + + + + + + + + + + + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) + + + %(PaketReferencesFileLinesInfo.PackageVersion) + + + + + $(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools + + + + + + + + + $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0]) + $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1]) + + + %(PaketCliToolFileLinesInfo.PackageVersion) + + + + + $(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config + + + + + + + false + + + + + + <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/> + + + + $(MSBuildProjectDirectory)/$(MSBuildProjectFile) + true + false + true + $(BaseIntermediateOutputPath)$(Configuration) + $(BaseIntermediateOutputPath) + + + + <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.nuspec"/> + + + + + + + + + + + + + + + + diff --git a/build.fsx b/build.fsx index 2f766113..2771ca5c 100644 --- a/build.fsx +++ b/build.fsx @@ -337,9 +337,15 @@ Target "ApplyVersion" (fun _ -> patchVersionInResource "src/NativeProviders/CUDA/resource.rc" cudaRelease patchVersionInResource "src/NativeProviders/OpenBLAS/resource.rc" openBlasRelease) +Target "RestoreMain" (fun _ -> DotNetCli.Restore (fun p -> + { p with + Project = "MathNet.Numerics.sln" + NoCache = true })) + Target "Prepare" DoNothing "Start" =?> ("Clean", not (hasBuildParam "incremental")) + ==> "RestoreMain" ==> "ApplyVersion" ==> "Prepare" @@ -355,14 +361,9 @@ let dotnetBuild solution = DotNetCli.Build (fun p -> Target "BuildMain" (fun _ -> dotnetBuild "MathNet.Numerics.sln") Target "BuildSigned" (fun _ -> buildSigned !! "MathNet.Numerics.sln") -Target "RestoreMain" (fun _ -> DotNetCli.Restore (fun p -> - { p with - Project = "MathNet.Numerics.sln" - NoCache = true })) Target "Build" DoNothing "Prepare" - ==> "RestoreMain" =?> ("BuildSigned", hasBuildParam "signed" || hasBuildParam "release") =?> ("BuildMain", not (hasBuildParam "all" || hasBuildParam "release" || hasBuildParam "signed")) ==> "Build" diff --git a/src/Data/Matlab/Matlab.csproj b/src/Data/Matlab/Matlab.csproj index 5f0608da..818c9da8 100644 --- a/src/Data/Matlab/Matlab.csproj +++ b/src/Data/Matlab/Matlab.csproj @@ -73,7 +73,7 @@ - + ..\..\..\packages\data\MathNet.Numerics\lib\net40\MathNet.Numerics.dll @@ -82,7 +82,7 @@ - + ..\..\..\packages\data\MathNet.Numerics\lib\portable-net45+sl5+netcore45+MonoAndroid1+MonoTouch1\MathNet.Numerics.dll @@ -91,7 +91,7 @@ - + ..\..\..\packages\data\MathNet.Numerics\lib\portable-net45+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\MathNet.Numerics.dll @@ -101,4 +101,4 @@ - + \ No newline at end of file diff --git a/src/Data/Text/Text.csproj b/src/Data/Text/Text.csproj index 0bdb4330..9f50396a 100644 --- a/src/Data/Text/Text.csproj +++ b/src/Data/Text/Text.csproj @@ -69,7 +69,7 @@ - + ..\..\..\packages\data\MathNet.Numerics\lib\net40\MathNet.Numerics.dll @@ -78,7 +78,7 @@ - + ..\..\..\packages\data\MathNet.Numerics\lib\portable-net45+sl5+netcore45+MonoAndroid1+MonoTouch1\MathNet.Numerics.dll @@ -87,7 +87,7 @@ - + ..\..\..\packages\data\MathNet.Numerics\lib\portable-net45+sl5+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\MathNet.Numerics.dll @@ -97,4 +97,4 @@ - + \ No newline at end of file diff --git a/src/FSharp/FSharp.fsproj b/src/FSharp/FSharp.fsproj index 698cf4ae..8587b215 100644 --- a/src/FSharp/FSharp.fsproj +++ b/src/FSharp/FSharp.fsproj @@ -1,13 +1,44 @@  net45;netstandard1.6;netstandard2.0 - false + Library MathNet.Numerics.FSharp MathNet.Numerics + true + MathNet.Numerics.FSharp + 0.0.0 + alpha0 + 0.0.0-alpha0 + 0.0.0-alpha0 + 0.0.0.0 + 0.0.0.0 + Math.NET Numerics for F# + Christoph Ruegg, Marcus Cuda, Jurgen Van Gael + Math.NET Project + Math.NET Numerics + + F# Modules for Math.NET Numerics, the numerical foundation of the Math.NET project, aiming to provide methods and algorithms for numerical computations in science, engineering and every day use. + Supports .Net Framework 4.5 or higher and .Net Standard 1.6 or higher, on Windows, Linux and Mac. + + Copyright Math.NET Project + false + https://numerics.mathdotnet.com/License.html + https://numerics.mathdotnet.com/ + https://www.mathdotnet.com/images/MathNet128.png + Release Notes + fsharp F# math numeric statistics probability integration interpolation regression solve fit linear algebra matrix fft + false + https://github.com/mathnet/mathnet-numerics + git + en + false + true + false + false + false true - Library false - true + 1701;1702;1705;1591 NETSTANDARD diff --git a/src/Numerics/Numerics.csproj b/src/Numerics/Numerics.csproj index ebaba1e4..c3737bbf 100644 --- a/src/Numerics/Numerics.csproj +++ b/src/Numerics/Numerics.csproj @@ -27,7 +27,6 @@ https://www.mathdotnet.com/images/MathNet128.png Release Notes math numeric statistics probability integration interpolation regression solve fit linear algebra matrix fft - $(OutputPath) false https://github.com/mathnet/mathnet-numerics git @@ -38,6 +37,7 @@ true false true + true 1701;1702;1705;1591 diff --git a/src/UnitTests/UnitTests.csproj b/src/UnitTests/UnitTests.csproj index 5f72b506..28ebf49e 100644 --- a/src/UnitTests/UnitTests.csproj +++ b/src/UnitTests/UnitTests.csproj @@ -1,36 +1,38 @@ - - - Exe - net45;netcoreapp1.1;netcoreapp2.0 - false - ..\..\out\test\$(Configuration) - ..\..\obj\test\$(Configuration) - MathNet.Numerics.UnitTests - MathNet.Numerics.UnitTests - false - - - NETSTANDARD - - - - - - - - - - - - - - - - - - - - - - - + + + + Exe + net45;netcoreapp1.1;netcoreapp2.0 + false + ..\..\out\test\$(Configuration) + ..\..\obj\test\$(Configuration) + MathNet.Numerics.UnitTests + MathNet.Numerics.UnitTests + false + + + NETSTANDARD + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file