| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -102,54 +102,30 @@ public class Runtime | |||
| 102 | 102 | ||
| 103 | 103 | #if PYTHON27 | |
| 104 | 104 | public const string pyversion = "2.7"; | |
| 105 | - public const int pyversionnumber = 27; | ||
| 105 | + public const string pyver = "27"; | ||
| 106 | 106 | #elif PYTHON33 | |
| 107 | 107 | public const string pyversion = "3.3"; | |
| 108 | - public const int pyversionnumber = 33; | ||
| 108 | + public const string pyver = "33"; | ||
| 109 | 109 | #elif PYTHON34 | |
| 110 | 110 | public const string pyversion = "3.4"; | |
| 111 | - public const int pyversionnumber = 34; | ||
| 111 | + public const string pyver = "34"; | ||
| 112 | 112 | #elif PYTHON35 | |
| 113 | 113 | public const string pyversion = "3.5"; | |
| 114 | - public const int pyversionnumber = 35; | ||
| 114 | + public const string pyver = "35"; | ||
| 115 | 115 | #elif PYTHON36 | |
| 116 | 116 | public const string pyversion = "3.6"; | |
| 117 | - public const int pyversionnumber = 36; | ||
| 117 | + public const string pyver = "36"; | ||
| 118 | 118 | #elif PYTHON37 // TODO: Add interop37 after Python3.7 is released | |
| 119 | 119 | public const string pyversion = "3.7"; | |
| 120 | - public const int pyversionnumber = 37; | ||
| 120 | + public const string pyver = "37"; | ||
| 121 | 121 | #else | |
| 122 | 122 | #error You must define one of PYTHON33 to PYTHON37 or PYTHON27 | |
| 123 | 123 | #endif | |
| 124 | 124 | ||
| 125 | - #if MONO_LINUX || MONO_OSX | ||
| 126 | - #if PYTHON27 | ||
| 127 | - internal const string dllBase = "python2.7"; | ||
| 128 | - #elif PYTHON33 | ||
| 129 | - internal const string dllBase = "python3.3"; | ||
| 130 | - #elif PYTHON34 | ||
| 131 | - internal const string dllBase = "python3.4"; | ||
| 132 | - #elif PYTHON35 | ||
| 133 | - internal const string dllBase = "python3.5"; | ||
| 134 | - #elif PYTHON36 | ||
| 135 | - internal const string dllBase = "python3.6"; | ||
| 136 | - #elif PYTHON37 | ||
| 137 | - internal const string dllBase = "python3.7"; | ||
| 138 | - #endif | ||
| 125 | + #if MONO_LINUX || MONO_OSX // Linux/macOS use dotted version string | ||
| 126 | + internal const string dllBase = "python" + pyversion; | ||
| 139 | 127 | #else // Windows | |
| 140 | - #if PYTHON27 | ||
| 141 | - internal const string dllBase = "python27"; | ||
| 142 | - #elif PYTHON33 | ||
| 143 | - internal const string dllBase = "python33"; | ||
| 144 | - #elif PYTHON34 | ||
| 145 | - internal const string dllBase = "python34"; | ||
| 146 | - #elif PYTHON35 | ||
| 147 | - internal const string dllBase = "python35"; | ||
| 148 | - #elif PYTHON36 | ||
| 149 | - internal const string dllBase = "python36"; | ||
| 150 | - #elif PYTHON37 | ||
| 151 | - internal const string dllBase = "python37"; | ||
| 152 | - #endif | ||
| 128 | + internal const string dllBase = "python" + pyver; | ||
| 153 | 129 | #endif | |
| 154 | 130 | ||
| 155 | 131 | #if PYTHON_WITH_PYDEBUG | |
@@ -174,6 +150,8 @@ public class Runtime | |||
| 174 | 150 | public const string PythonDll = dllBase + dllWithPyDebug + dllWithPyMalloc + dllWithWideUnicode; | |
| 175 | 151 | #endif | |
| 176 | 152 | ||
| 153 | + public static readonly int pyversionnumber = Convert.ToInt32(pyver); | ||
| 154 | + | ||
| 177 | 155 | // set to true when python is finalizing | |
| 178 | 156 | internal static object IsFinalizingLock = new object(); | |
| 179 | 157 | internal static bool IsFinalizing = false; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments