@@ -33,6 +33,7 @@ $ACTIVITIES = [
33
33
'mailmap_update' ,
34
34
'test_sympy' ,
35
35
'source_tarball' ,
36
+ 'wheel' ,
36
37
'build_docs' ,
37
38
'copy_release_files' ,
38
39
'compare_tar_against_git' ,
@@ -41,6 +42,11 @@ $ACTIVITIES = [
41
42
'test_tarball35' ,
42
43
'test_tarball36' ,
43
44
'test_tarball37' ,
45
+ 'test_wheel27' ,
46
+ 'test_wheel34' ,
47
+ 'test_wheel35' ,
48
+ 'test_wheel36' ,
49
+ 'test_wheel37' ,
44
50
'print_authors' ,
45
51
'sha256' ,
46
52
# 'tag',
@@ -83,6 +89,13 @@ def source_tarball():
83
89
# Assumes this is run in Docker and git is already clean
84
90
./ setup .py sdist - - keep - temp
85
91
92
+
93
+ @activity (deps = {'_version' , 'mailmap_update' , 'test_sympy' })
94
+ def wheel ():
95
+ with run_in_conda_env (['mpmath' , 'python=3.6' , 'setuptools' , 'pip' ], 'sympy-release' ):
96
+ # Assumes this is run in Docker and git is already clean
97
+ ./ setup .py bdist_wheel - - universal - - keep - temp
98
+
86
99
@activity (deps = {'_version' })
87
100
def build_docs ():
88
101
with run_in_conda_env (['sphinx' , 'docutils' , 'numpy' , 'mpmath' , 'matplotlib' ],
@@ -108,7 +121,7 @@ def build_docs():
108
121
cd ../ ../ ../
109
122
110
123
111
- @activity (deps = {'source_tarball' , 'build_docs' })
124
+ @activity (deps = {'source_tarball' , 'wheel' , ' build_docs' })
112
125
def copy_release_files ():
113
126
ls dist
114
127
cp dist / * / root / release /
@@ -133,6 +146,26 @@ def test_tarball36():
133
146
def test_tarball37 ():
134
147
test_tarball ('3.7' )
135
148
149
+ @activity (deps = {'wheel' })
150
+ def test_wheel27 ():
151
+ test_wheel ('2.7' )
152
+
153
+ @activity (deps = {'wheel' })
154
+ def test_wheel34 ():
155
+ test_wheel ('3.4' )
156
+
157
+ @activity (deps = {'wheel' })
158
+ def test_wheel35 ():
159
+ test_wheel ('3.5' )
160
+
161
+ @activity (deps = {'wheel' })
162
+ def test_wheel36 ():
163
+ test_wheel ('3.6' )
164
+
165
+ @activity (deps = {'wheel' })
166
+ def test_wheel37 ():
167
+ test_wheel ('3.7' )
168
+
136
169
@activity (deps = {'source_tarball' })
137
170
def compare_tar_against_git ():
138
171
"""
@@ -176,7 +209,7 @@ def compare_tar_against_git():
176
209
if fail :
177
210
sys .exit (red ("Non-whitelisted files found or not found in the tarball" ))
178
211
179
- @activity (deps = {'source_tarball' })
212
+ @activity (deps = {'source_tarball' , 'wheel' })
180
213
def print_authors ():
181
214
"""
182
215
Print authors text to put at the bottom of the release notes
@@ -200,7 +233,7 @@ Thanks to everyone who contributed to this release!
200
233
print ("- " + name )
201
234
print ()
202
235
203
- @activity (deps = {'source_tarball' , 'build_docs' })
236
+ @activity (deps = {'source_tarball' , 'wheel' , ' build_docs' })
204
237
def sha256 ():
205
238
"""
206
239
Print the sha256 sums of the release files
@@ -220,7 +253,12 @@ def _sha256(print_=True, local=False):
220
253
print (out )
221
254
return out
222
255
223
- @activity (deps = {'mailmap_update' , 'sha256' , 'print_authors' , 'source_tarball' , 'build_docs' , 'compare_tar_against_git' , 'test_tarball27' , 'test_tarball34' , 'test_tarball35' , 'test_tarball36' , 'test_sympy' })
256
+ @activity (deps = {'mailmap_update' , 'sha256' , 'print_authors' ,
257
+ 'source_tarball' , 'wheel' , 'build_docs' ,
258
+ 'compare_tar_against_git' , 'test_tarball27' , 'test_tarball34' ,
259
+ 'test_tarball35' , 'test_tarball36' , 'test_wheel27' ,
260
+ 'test_wheel34' , 'test_wheel35' , 'test_wheel36' ,
261
+ 'test_wheel37' , 'test_sympy' })
224
262
def release ():
225
263
pass
226
264
@@ -268,6 +306,22 @@ def test_tarball(py_version):
268
306
python - m isympy - - help
269
307
isympy - - help
270
308
309
+ def test_wheel (py_version ):
310
+ """
311
+ Test that the wheel can be installed, and that sympy imports in the install.
312
+ """
313
+ if py_version not in {'2.7' , '3.4' , '3.5' , '3.6' , '3.7' }: # TODO: Add win32
314
+ raise ValueError ("release must be one of 2.7, 3.4, 3.5, 3.6, or 3.7 not %s" % py_version )
315
+
316
+
317
+ with run_in_conda_env (['python=%s' % py_version ], 'test-install-%s' % py_version ):
318
+ cp @('/root/release/{wheel}' .format (** tarball_format )) @("{wheel}" .format (** tarball_format ))
319
+ pip install @("{wheel}" .format (** tarball_format )
320
+
321
+ python - c "import sympy; print(sympy.__version__); print('sympy installed successfully')"
322
+ python - m isympy - - help
323
+ isympy - - help
324
+
271
325
def get_tarball_name (file ):
272
326
"""
273
327
Get the name of a tarball
@@ -277,6 +331,7 @@ def get_tarball_name(file):
277
331
source-orig: The original name of the source tarball
278
332
source-orig-notar: The name of the untarred directory
279
333
source: The source tarball (after renaming)
334
+ wheel: The wheel
280
335
html: The name of the html zip
281
336
html-nozip: The name of the html, without ".zip"
282
337
pdf-orig: The original name of the pdf file
@@ -298,6 +353,8 @@ def get_tarball_name(file):
298
353
name += ".{extension}"
299
354
elif file == 'pdf-orig' :
300
355
name = "sympy-{version}.pdf"
356
+ elif file == 'wheel' :
357
+ name = 'sympy-{version}-py2.py3-none-any.whl'
301
358
else :
302
359
raise ValueError (file + " is not a recognized argument" )
303
360
@@ -309,6 +366,7 @@ tarball_name_types = {
309
366
'source-orig' ,
310
367
'source-orig-notar' ,
311
368
'source' ,
369
+ 'wheel' ,
312
370
'html' ,
313
371
'html-nozip' ,
314
372
'pdf-orig' ,
@@ -829,6 +887,7 @@ def check_tag_exists():
829
887
830
888
descriptions = OrderedDict ([
831
889
('source' , "The SymPy source installer." ,),
890
+ ('wheel' , "A wheel of the package." ,),
832
891
('html' , '''Html documentation. This is the same as
833
892
the <a href="https://docs.sympy.org/latest/index.html">online documentation</a>.''' ,),
834
893
('pdf' , '''Pdf version of the <a href="https://docs.sympy.org/latest/index.html"> html documentation</a>.''' ,),
0 commit comments