Skip to content

Commit 689535c

Browse files
authored
Remove .NET Core 2.1 (#801)
* Remove .NET Core 2.1 * Update IronPythonConsoleAny * Update test_env
1 parent 51e2924 commit 689535c

12 files changed

Lines changed: 50 additions & 26 deletions

File tree

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
3131

32+
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
33+
3234
<!-- Don't include SourceRevisionId in InformationalVersion (SourceLink) - causes issues with IronPython.Runtime.CurrentVersion if true -->
3335
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
3436

Package/nuget/IronPython.nuspec

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
44
<id>IronPython</id>
55
<title>IronPython</title>
6-
<version>2.7.10</version>
6+
<version>2.7.12</version>
77
<authors>IronPython Contributors,Microsoft</authors>
88
<owners>IronPython Community</owners>
99
<projectUrl>http://ironpython.net</projectUrl>
@@ -18,26 +18,23 @@
1818
<group targetFramework="net45">
1919
<dependency id="DynamicLanguageRuntime" version="1.3.0" />
2020
</group>
21-
<group targetFramework="netcoreapp2.1">
22-
<dependency id="System.Text.Encoding.CodePages" version="4.6.0" />
23-
<dependency id="Microsoft.Win32.Registry" version="4.5.0" />
24-
<dependency id="DynamicLanguageRuntime" version="1.3.0" />
25-
</group>
2621
<group targetFramework="netstandard2.0">
22+
<dependency id="DynamicLanguageRuntime" version="1.3.0" />
2723
<dependency id="System.Text.Encoding.CodePages" version="4.6.0" />
2824
<dependency id="Microsoft.Win32.Registry" version="4.5.0" />
29-
<dependency id="DynamicLanguageRuntime" version="1.3.0" />
25+
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" />
3026
</group>
3127
<group targetFramework="netcoreapp3.1">
32-
<dependency id="Microsoft.Win32.Registry" version="4.7.0" />
3328
<dependency id="DynamicLanguageRuntime" version="1.3.0" />
29+
<dependency id="Microsoft.Win32.Registry" version="4.7.0" />
30+
<dependency id="Mono.Unix" version="7.1.0-final.1.21458.1" />
3431
</group>
3532
</dependencies>
3633
</metadata>
3734
<files>
38-
<file src="**\IronPython*.dll" target="lib" exclude="**\IronPythonTest.dll;**\DLLs\*.dll" />
39-
<file src="**\IronPython*.pdb" target="lib" exclude="**\IronPythonTest.pdb;**\DLLs\*.pdb" />
40-
<file src="**\IronPython*.xml" target="lib" exclude="**\IronPythonTest.xml;**\DLLs\*.xml" />
35+
<file src="**\IronPython*.dll" target="lib" exclude="**\IronPythonTest.dll;**\DLLs\*.dll;netcoreapp2.1\**\*;net5.0*\**\*;net6.0*\**\*" />
36+
<file src="**\IronPython*.pdb" target="lib" exclude="**\IronPythonTest.pdb;**\DLLs\*.pdb;netcoreapp2.1\**\*;net5.0*\**\*;net6.0*\**\*" />
37+
<file src="**\IronPython*.xml" target="lib" exclude="**\IronPythonTest.xml;**\DLLs\*.xml;netcoreapp2.1\**\*;net5.0*\**\*;net6.0*\**\*" />
4138
<file src="LICENSE;README.md" />
4239
</files>
4340
</package>

Package/zip/Zip.Packaging.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<MakeDir Directories="$(PackageDir)" Condition="!Exists('$(PackageDir)')"/>
55

66
<ItemGroup>
7-
<ZipFiles Include="$(StageDir)\**\*.*" Exclude="$(StageDir)\**\IronPythonTest.*;$(StageDir)\**\*.pdb" />
7+
<ZipFiles Include="$(StageDir)\**\*.*" Exclude="$(StageDir)\**\IronPythonTest.*;$(StageDir)\**\*.pdb;$(StageDir)\netcoreapp2.1\**\*;$(StageDir)\net5.0*\**\*;$(StageDir)\net6.0*\**\*" />
88
</ItemGroup>
99
<Zip Files="@(ZipFiles)" ZipFileName="$(PackageDir)\IronPython.$(PackageVersion).zip" WorkingDirectory="$(StageDir)" />
1010

Src/IronPython.Modules/IronPython.Modules.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net45;netcoreapp3.1;netstandard2.0</TargetFrameworks>
55
<BaseAddress>885063680</BaseAddress>
66
<CodeAnalysisRuleSet>..\..\IronPython.ruleset</CodeAnalysisRuleSet>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -33,7 +33,7 @@
3333
</PackageReference>
3434
</ItemGroup>
3535

36-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' or '$(TargetFramework)' == 'netstandard2.0' ">
36+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
3737
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
3838
</ItemGroup>
3939

Src/IronPython.SQLite/IronPython.SQLite.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net45;netcoreapp3.1;netstandard2.0</TargetFrameworks>
55
<DocumentationFile>$(OutputPath)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
66
<SQLiteCommon>SQLITE_DEBUG;TRUE;WIN32;_MSC_VER;SQLITE_ASCII;SQLITE_MEM_POOL;SQLITE_ENABLE_COLUMN_METADATA;SQLITE_OS_WIN;SQLITE_SYSTEM_MALLOC;VDBE_PROFILE_OFF</SQLiteCommon>
77
<SQLiteCommonOmit>SQLITE_OMIT_AUTHORIZATION;SQLITE_OMIT_DEPRECATED;SQLITE_OMIT_GET_TABLE;SQLITE_OMIT_INCRBLOB;SQLITE_OMIT_LOOKASIDE;SQLITE_OMIT_SHARED_CACHE;SQLITE_OMIT_UTF16;SQLITE_OMIT_WAL</SQLiteCommonOmit>

Src/IronPython.Wpf/DynamicXamlReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information.
44

5-
#if NETCOREAPP3_1
5+
#if NETCOREAPP3_1_OR_GREATER
66

77
using System;
88
using System.Xaml;

Src/IronPython.Wpf/_wpf.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information.
44

5-
#if FEATURE_WPF || NETCOREAPP3_1
5+
#if FEATURE_WPF || NETCOREAPP3_1_OR_GREATER
66

77
using System.IO;
88
using System.Runtime.CompilerServices;
@@ -15,7 +15,7 @@
1515
using IronPython.Runtime;
1616
using IronPython.Runtime.Operations;
1717

18-
#if NETCOREAPP3_1
18+
#if NETCOREAPP3_1_OR_GREATER
1919
using Microsoft.Internal.Scripting.Runtime; // TODO: get rid of this once DynamicXamlReader is in the DLR
2020
#endif
2121

Src/IronPython/IronPython.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp2.1;netcoreapp3.1;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net45;netcoreapp3.1;netstandard2.0</TargetFrameworks>
55
<BaseAddress>879755264</BaseAddress>
66
<CodeAnalysisRuleSet>..\..\IronPython.ruleset</CodeAnalysisRuleSet>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -61,7 +61,7 @@
6161
</PackageReference>
6262
</ItemGroup>
6363

64-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' or '$(TargetFramework)' == 'netstandard2.0' ">
64+
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
6565
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0" />
6666
</ItemGroup>
6767

Src/IronPython/Lib/iptest/test_env.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
import System
2626
import clr
2727
is_netcoreapp = clr.IsNetCoreApp
28-
is_netcoreapp21 = clr.TargetFramework == ".NETCoreApp,Version=v2.1"
29-
is_netcoreapp31 = clr.TargetFramework == ".NETCoreApp,Version=v3.1"
28+
is_netcoreapp21 = clr.FrameworkDescription.startswith(".NET Core 2.x")
29+
is_netcoreapp31 = clr.FrameworkDescription.startswith(".NET Core 3.1")
30+
is_net50 = clr.FrameworkDescription.startswith(".NET 5.0")
3031
if is_netcoreapp: clr.AddReference("System.Runtime.Extensions")
3132
is_posix = sys.platform == 'posix' or System.Environment.OSVersion.Platform == System.PlatformID.Unix
3233
is_osx = os.path.exists('/System/Library/CoreServices/SystemVersion.plist')

Src/IronPython/Runtime/ClrModule.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ namespace IronPython.Runtime {
4545
public static class ClrModule {
4646
#if NETCOREAPP
4747
public static readonly bool IsNetCoreApp = true;
48-
#else
48+
#elif NETFRAMEWORK
4949
public static readonly bool IsNetCoreApp = false;
50+
#else
51+
public static readonly bool IsNetCoreApp = FrameworkDescription.StartsWith(".NET", StringComparison.Ordinal) && !FrameworkDescription.StartsWith(".NET Framework", StringComparison.Ordinal);
5052
#endif
5153

5254
public static string TargetFramework => typeof(ClrModule).Assembly.GetCustomAttribute<TargetFrameworkAttribute>()?.FrameworkName;
@@ -59,7 +61,7 @@ public static class ClrModule {
5961
public static readonly bool IsDebug = false;
6062
#endif
6163

62-
internal static string FrameworkDescription {
64+
public static string FrameworkDescription {
6365
get {
6466
#if FEATURE_RUNTIMEINFORMATION
6567
var frameworkDescription = RuntimeInformation.FrameworkDescription;

0 commit comments

Comments
 (0)