FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

String directives cleanup on Runtime by vmuriart · Pull Request #339 · pythonnet/pythonnet · GitHub

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .cs  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
Refactor Python version directives
Added Python37 definition, won't add interop until final release
  • Loading branch information
vmuriart committed Jan 29, 2017
commit 94b9e257eda8a6ce9af08091f3eea8f8ec9201d4
15 changes: 7 additions & 8 deletions src/runtime/assemblyinfo.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@
#if PYTHON27
[assembly: AssemblyTitle("Python.Runtime for Python 2.7")]
[assembly: AssemblyDescription("Python Runtime for Python 2.7")]
#endif
#if PYTHON33
#elif PYTHON33
[assembly: AssemblyTitle("Python.Runtime for Python 3.3")]
[assembly: AssemblyDescription("Python Runtime for Python 3.3")]
#endif
#if PYTHON34
#elif PYTHON34
[assembly: AssemblyTitle("Python.Runtime for Python 3.4")]
[assembly: AssemblyDescription("Python Runtime for Python 3.4")]
#endif
#if PYTHON35
#elif PYTHON35
[assembly: AssemblyTitle("Python.Runtime for Python 3.5")]
[assembly: AssemblyDescription("Python Runtime for Python 3.5")]
#endif
#if PYTHON36
#elif PYTHON36
[assembly: AssemblyTitle("Python.Runtime for Python 3.6")]
[assembly: AssemblyDescription("Python Runtime for Python 3.6")]
#elif PYTHON37
[assembly: AssemblyTitle("Python.Runtime for Python 3.7")]
[assembly: AssemblyDescription("Python Runtime for Python 3.7")]
#endif
96 changes: 28 additions & 68 deletions src/runtime/runtime.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -103,96 +103,56 @@ public class Runtime
#error You must define either UCS2 or UCS4!
#endif

#if (PYTHON23)
public const string pyversion = "2.3";
public const int pyversionnumber = 23;
#endif
#if (PYTHON24)
public const string pyversion = "2.4";
public const int pyversionnumber = 24;
#endif
#if (PYTHON25)
public const string pyversion = "2.5";
public const int pyversionnumber = 25;
#endif
#if (PYTHON26)
public const string pyversion = "2.6";
public const int pyversionnumber = 26;
#endif
#if (PYTHON27)
#if PYTHON27
public const string pyversion = "2.7";
public const int pyversionnumber = 27;
#endif
#if (PYTHON32)
public const string pyversion = "3.2";
public const int pyversionnumber = 32;
#endif
#if (PYTHON33)
#elif PYTHON33
public const string pyversion = "3.3";
public const int pyversionnumber = 33;
#endif
#if (PYTHON34)
#elif PYTHON34
public const string pyversion = "3.4";
public const int pyversionnumber = 34;
#endif
#if (PYTHON35)
#elif PYTHON35
public const string pyversion = "3.5";
public const int pyversionnumber = 35;
#endif
#if (PYTHON36)
#elif PYTHON36
public const string pyversion = "3.6";
public const int pyversionnumber = 36;
#endif
#if ! (PYTHON23 || PYTHON24 || PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35 || PYTHON36)
#error You must define one of PYTHON23 to PYTHON36
#elif PYTHON37
// TODO: Add interop37 after Python3.7 is released
public const string pyversion = "3.7";
public const int pyversionnumber = 37;
#else
#error You must define one of PYTHON33 to PYTHON37 or PYTHON27
#endif

#if (PYTHON23)
internal const string dllBase = "python23";
#endif
#if (PYTHON24)
internal const string dllBase = "python24";
#endif
#if (PYTHON25)
internal const string dllBase = "python25";
#endif
#if (PYTHON26)
internal const string dllBase = "python26";
#endif
#if (PYTHON27)
#if MONO_LINUX || MONO_OSX
#if PYTHON27
internal const string dllBase = "python27";
#endif
#if (MONO_LINUX || MONO_OSX)
#if (PYTHON32)
internal const string dllBase = "python3.2";
#endif
#if (PYTHON33)
#elif PYTHON33
internal const string dllBase = "python3.3";
#endif
#if (PYTHON34)
#elif PYTHON34
internal const string dllBase = "python3.4";
#endif
#if (PYTHON35)
#elif PYTHON35
internal const string dllBase = "python3.5";
#endif
#if (PYTHON36)
#elif PYTHON36
internal const string dllBase = "python3.6";
#elif PYTHON37
internal const string dllBase = "python3.7";
#endif
#else
#if (PYTHON32)
internal const string dllBase = "python32";
#endif
#if (PYTHON33)
#else // Windows
#if PYTHON27
internal const string dllBase = "python27";
#elif PYTHON33
internal const string dllBase = "python33";
#endif
#if (PYTHON34)
#elif PYTHON34
internal const string dllBase = "python34";
#endif
#if (PYTHON35)
#elif PYTHON35
internal const string dllBase = "python35";
#endif
#if (PYTHON36)
#elif PYTHON36
internal const string dllBase = "python36";
#elif PYTHON37
internal const string dllBase = "python37";
#endif
#endif

Expand Down

Back | FazBrowse Home | New Git URL