From 0e5e58edd0cf0d36660e909662dcca5486161851 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Tue, 21 Feb 2017 15:36:54 -0700 Subject: [PATCH 1/3] Update conda-recipe version Get it from recipe file instead of git-tag. --- conda.recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 32bc544f6..eaa8747b2 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: pythonnet - version: {{ environ.get('GIT_DESCRIBE_TAG', '').replace('-dev', '.dev') }} + version: "2.3.0.dev1" build: skip: True # [not win] From 928717d3a1fc3fdee49eee5a0cd07780a35bd647 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Tue, 21 Feb 2017 17:10:32 -0700 Subject: [PATCH 2/3] Add SharedAssemblyInfo & Update Assembly version Reset version back down to v2.x from v4.0.0.2 See link below for Semanctic Versioning & .NET https://codingforsmarties.wordpress.com/2016/01/21/how-to-version-assemblies-destined-for-nuget/ --- src/SharedAssemblyInfo.cs | 28 +++++++++++++++++ src/clrmodule/AssemblyInfo.cs | 39 ------------------------ src/clrmodule/ClrModule.cs | 3 +- src/clrmodule/Properties/AssemblyInfo.cs | 11 +++++++ src/clrmodule/clrmodule.csproj | 6 +++- src/console/AssemblyInfo.cs | 16 ---------- src/console/Console.csproj | 6 +++- src/console/Properties/AssemblyInfo.cs | 8 +++++ src/runtime/AssemblyInfo.cs | 15 --------- src/runtime/Properties/AssemblyInfo.cs | 11 +++++++ src/runtime/Python.Runtime.csproj | 6 +++- 11 files changed, 75 insertions(+), 74 deletions(-) create mode 100644 src/SharedAssemblyInfo.cs delete mode 100644 src/clrmodule/AssemblyInfo.cs create mode 100644 src/clrmodule/Properties/AssemblyInfo.cs delete mode 100644 src/console/AssemblyInfo.cs create mode 100644 src/console/Properties/AssemblyInfo.cs delete mode 100644 src/runtime/AssemblyInfo.cs create mode 100644 src/runtime/Properties/AssemblyInfo.cs diff --git a/src/SharedAssemblyInfo.cs b/src/SharedAssemblyInfo.cs new file mode 100644 index 000000000..24ba26862 --- /dev/null +++ b/src/SharedAssemblyInfo.cs @@ -0,0 +1,28 @@ +using System; +using System.Reflection; +using System.Resources; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("pythonnet")] +[assembly: AssemblyProduct("Python for .NET")] +[assembly: AssemblyCopyright("Copyright (c) 2006-2017 the contributors of the 'Python for .NET' project")] +[assembly: AssemblyTrademark("")] + +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("")] + +[assembly: CLSCompliant(true)] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// Version Information. Keeping it simple. May need to revisit for Nuget +// See: https://codingforsmarties.wordpress.com/2016/01/21/how-to-version-assemblies-destined-for-nuget/ +// AssemblyVersion can only be numeric +[assembly: AssemblyVersion("2.3.0")] diff --git a/src/clrmodule/AssemblyInfo.cs b/src/clrmodule/AssemblyInfo.cs deleted file mode 100644 index 669183255..000000000 --- a/src/clrmodule/AssemblyInfo.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. - -[assembly: AssemblyTitle("clrmodule")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("clrmodule")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. - -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM - -[assembly: Guid("ae10d6a4-55c2-482f-9716-9988e6c169e3")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/clrmodule/ClrModule.cs b/src/clrmodule/ClrModule.cs index 413b952eb..d24376a1f 100644 --- a/src/clrmodule/ClrModule.cs +++ b/src/clrmodule/ClrModule.cs @@ -52,7 +52,8 @@ public static void initclr() var pythonRuntimeName = new AssemblyName("Python.Runtime") { #if USE_PYTHON_RUNTIME_VERSION - Version = new Version("4.0.0.1"), + // Has no effect until SNK works. Keep updated anyways. + Version = new Version("2.3.0"), #endif CultureInfo = CultureInfo.InvariantCulture }; diff --git a/src/clrmodule/Properties/AssemblyInfo.cs b/src/clrmodule/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..939f4171f --- /dev/null +++ b/src/clrmodule/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("clrmodule")] +[assembly: AssemblyDescription("")] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ae10d6a4-55c2-482f-9716-9988e6c169e3")] diff --git a/src/clrmodule/clrmodule.csproj b/src/clrmodule/clrmodule.csproj index 435630d0e..6f44789d7 100644 --- a/src/clrmodule/clrmodule.csproj +++ b/src/clrmodule/clrmodule.csproj @@ -14,6 +14,7 @@ 1591 ..\..\ $(SolutionDir) + Properties true prompt @@ -72,7 +73,10 @@ - + + + Properties\SharedAssemblyInfo.cs + diff --git a/src/console/AssemblyInfo.cs b/src/console/AssemblyInfo.cs deleted file mode 100644 index 17d792c7a..000000000 --- a/src/console/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Reflection; -using System.Resources; -using System.Runtime.InteropServices; -using System.Security.Permissions; - -[assembly: AssemblyProduct("Python for .NET")] -[assembly: AssemblyVersion("2.4.2.7")] -[assembly: AssemblyTitle("Python Console")] -[assembly: AssemblyDefaultAlias("python.exe")] -[assembly: CLSCompliant(true)] -[assembly: ComVisible(false)] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCopyright("MIT License")] -[assembly: AssemblyFileVersion("2.0.0.4")] -[assembly: NeutralResourcesLanguage("en")] diff --git a/src/console/Console.csproj b/src/console/Console.csproj index cdee6893b..9fe44830c 100644 --- a/src/console/Console.csproj +++ b/src/console/Console.csproj @@ -14,6 +14,7 @@ 1591 ..\..\ $(SolutionDir) + Properties python-clear.ico prompt @@ -71,7 +72,10 @@ - + + + Properties\SharedAssemblyInfo.cs + diff --git a/src/console/Properties/AssemblyInfo.cs b/src/console/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..081ae0c94 --- /dev/null +++ b/src/console/Properties/AssemblyInfo.cs @@ -0,0 +1,8 @@ +using System.Reflection; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Python Console")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyDefaultAlias("python.exe")] diff --git a/src/runtime/AssemblyInfo.cs b/src/runtime/AssemblyInfo.cs deleted file mode 100644 index a357b81d9..000000000 --- a/src/runtime/AssemblyInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyProduct("Python for .NET")] -[assembly: AssemblyVersion("4.0.0.1")] -[assembly: AssemblyDefaultAlias("Python.Runtime.dll")] -[assembly: CLSCompliant(true)] -[assembly: ComVisible(false)] -[assembly: AssemblyCopyright("MIT License")] -[assembly: AssemblyFileVersion("2.0.0.2")] -[assembly: NeutralResourcesLanguage("en")] -[assembly: InternalsVisibleTo("Python.EmbeddingTest")] diff --git a/src/runtime/Properties/AssemblyInfo.cs b/src/runtime/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..a5d33c7ab --- /dev/null +++ b/src/runtime/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Python for .NET")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyDefaultAlias("Python.Runtime.dll")] + +[assembly: InternalsVisibleTo("Python.EmbeddingTest")] diff --git a/src/runtime/Python.Runtime.csproj b/src/runtime/Python.Runtime.csproj index f1616dcd6..fd2281d58 100644 --- a/src/runtime/Python.Runtime.csproj +++ b/src/runtime/Python.Runtime.csproj @@ -14,6 +14,7 @@ 1591 ..\..\ $(SolutionDir) + Properties true false @@ -73,7 +74,10 @@ - + + + Properties\SharedAssemblyInfo.cs + From 5a7d297837a100da4674fd6306cd708d215b2d8c Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Tue, 21 Feb 2017 20:09:31 -0700 Subject: [PATCH 3/3] Add .bumpversion Configuration based from gh:bumpversion:issues:77#issuecomment-130696156 Usage: bumpversion major -> increases major and adds `dev` if not present bumpversion minor -> increases minor and adds `dev` if not present bumpversion release -> drop the `dev` portion --- .bumpversion.cfg | 29 +++++++++++++++++++++++++++++ .editorconfig | 5 +++++ setup.cfg | 4 ++++ 3 files changed, 38 insertions(+) create mode 100644 .bumpversion.cfg diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 000000000..f79dfb480 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,29 @@ +[bumpversion] +current_version = 2.3.0.dev1 +parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? +serialize = + {major}.{minor}.{patch}.{release}{dev} + {major}.{minor}.{patch} + +[bumpversion:part:release] +optional_value = dummy +values = + dev + dummy + +[bumpversion:part:dev] + +[bumpversion:file:setup.py] + +[bumpversion:file:conda.recipe/meta.yaml] + +[bumpversion:file:src/runtime/resources/clr.py] + +[bumpversion:file:src/SharedAssemblyInfo.cs] +serialize = + {major}.{minor}.{patch} + +[bumpversion:file:src/clrmodule/ClrModule.cs] +serialize = + {major}.{minor}.{patch} + diff --git a/.editorconfig b/.editorconfig index ff0b3c71d..25636a549 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,3 +22,8 @@ indent_size = 2 # Solution [*.sln] indent_style = tab + +# bumpversion reformats itself after every bump +[.bumpversion.cfg] +trim_trailing_whitespace = false +indent_style = tab diff --git a/setup.cfg b/setup.cfg index f05de8217..d1a72ff31 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,4 +1,8 @@ +# [bumpversion] comments. bumpversion deleted all comments on its file. # Don't combine `.bumpversion.cfg` with `setup.cfg`. Messes up formatting. +# Don't use `first_value = 1`. It will break `release` bump +# Keep `optional = dummy` needed to bump to release. +# See: https://github.com/peritus/bumpversion/issues/59 [tool:pytest] xfail_strict = True