@@ -103,96 +103,56 @@ public class Runtime
103
103
#error You must define either UCS2 or UCS4!
104
104
#endif
105
105
106
- #if ( PYTHON23 )
107
- public const string pyversion = "2.3" ;
108
- public const int pyversionnumber = 23 ;
109
- #endif
110
- #if ( PYTHON24 )
111
- public const string pyversion = "2.4" ;
112
- public const int pyversionnumber = 24 ;
113
- #endif
114
- #if ( PYTHON25 )
115
- public const string pyversion = "2.5" ;
116
- public const int pyversionnumber = 25 ;
117
- #endif
118
- #if ( PYTHON26 )
119
- public const string pyversion = "2.6" ;
120
- public const int pyversionnumber = 26 ;
121
- #endif
122
- #if ( PYTHON27 )
106
+ #if PYTHON27
123
107
public const string pyversion = "2.7" ;
124
108
public const int pyversionnumber = 27 ;
125
- #endif
126
- #if ( PYTHON32 )
127
- public const string pyversion = "3.2" ;
128
- public const int pyversionnumber = 32 ;
129
- #endif
130
- #if ( PYTHON33 )
109
+ #elif PYTHON33
131
110
public const string pyversion = "3.3" ;
132
111
public const int pyversionnumber = 33 ;
133
- #endif
134
- #if ( PYTHON34 )
112
+ #elif PYTHON34
135
113
public const string pyversion = "3.4" ;
136
114
public const int pyversionnumber = 34 ;
137
- #endif
138
- #if ( PYTHON35 )
115
+ #elif PYTHON35
139
116
public const string pyversion = "3.5" ;
140
117
public const int pyversionnumber = 35 ;
141
- #endif
142
- #if ( PYTHON36 )
118
+ #elif PYTHON36
143
119
public const string pyversion = "3.6" ;
144
120
public const int pyversionnumber = 36 ;
145
- #endif
146
- #if ! ( PYTHON23 || PYTHON24 || PYTHON25 || PYTHON26 || PYTHON27 || PYTHON32 || PYTHON33 || PYTHON34 || PYTHON35 || PYTHON36 )
147
- #error You must define one of PYTHON23 to PYTHON36
121
+ #elif PYTHON37
122
+ // TODO: Add interop37 after Python3.7 is released
123
+ public const string pyversion = "3.7" ;
124
+ public const int pyversionnumber = 37 ;
125
+ #else
126
+ #error You must define one of PYTHON33 to PYTHON37 or PYTHON27
148
127
#endif
149
128
150
- #if ( PYTHON23 )
151
- internal const string dllBase = "python23" ;
152
- #endif
153
- #if ( PYTHON24 )
154
- internal const string dllBase = "python24" ;
155
- #endif
156
- #if ( PYTHON25 )
157
- internal const string dllBase = "python25" ;
158
- #endif
159
- #if ( PYTHON26 )
160
- internal const string dllBase = "python26" ;
161
- #endif
162
- #if ( PYTHON27 )
129
+ #if MONO_LINUX || MONO_OSX
130
+ #if PYTHON27
163
131
internal const string dllBase = "python27" ;
164
- #endif
165
- #if ( MONO_LINUX || MONO_OSX )
166
- #if ( PYTHON32 )
167
- internal const string dllBase = "python3.2" ;
168
- #endif
169
- #if ( PYTHON33 )
132
+ #elif PYTHON33
170
133
internal const string dllBase = "python3.3" ;
171
- #endif
172
- #if ( PYTHON34 )
134
+ #elif PYTHON34
173
135
internal const string dllBase = "python3.4" ;
174
- #endif
175
- #if ( PYTHON35 )
136
+ #elif PYTHON35
176
137
internal const string dllBase = "python3.5" ;
177
- #endif
178
- #if ( PYTHON36 )
138
+ #elif PYTHON36
179
139
internal const string dllBase = "python3.6" ;
140
+ #elif PYTHON37
141
+ internal const string dllBase = "python3.7" ;
180
142
#endif
181
- #else
182
- #if ( PYTHON32 )
183
- internal const string dllBase = "python32" ;
184
- #endif
185
- #if ( PYTHON33 )
143
+ #else // Windows
144
+ #if PYTHON27
145
+ internal const string dllBase = "python27" ;
146
+ #elif PYTHON33
186
147
internal const string dllBase = "python33" ;
187
- #endif
188
- #if ( PYTHON34 )
148
+ #elif PYTHON34
189
149
internal const string dllBase = "python34" ;
190
- #endif
191
- #if ( PYTHON35 )
150
+ #elif PYTHON35
192
151
internal const string dllBase = "python35" ;
193
- #endif
194
- #if ( PYTHON36 )
152
+ #elif PYTHON36
195
153
internal const string dllBase = "python36" ;
154
+ #elif PYTHON37
155
+ internal const string dllBase = "python37" ;
196
156
#endif
197
157
#endif
198
158
0 commit comments