@@ -296,6 +296,10 @@ def tarball_name(type='gztar'):
296
296
root = 'scipy-%s' % FULLVERSION
297
297
if type == 'gztar' :
298
298
return root + '.tar.gz'
299
+ elif type == 'xztar' :
300
+ return root + '.tar.xz'
301
+ elif type == 'tar' :
302
+ return root + '.tar'
299
303
elif type == 'zip' :
300
304
return root + '.zip'
301
305
raise ValueError ("Unknown type %s" % type )
@@ -305,11 +309,23 @@ def sdist():
305
309
# To be sure to bypass paver when building sdist... paver + scipy.distutils
306
310
# do not play well together.
307
311
sh ('python setup.py sdist --formats=gztar,zip' )
312
+ sh ('python setup.py sdist --formats=tar' )
313
+ if os .path .exists (os .path .join ('dist' , tarball_name ("xztar" ))):
314
+ os .unlink (os .path .join ('dist' , tarball_name ("xztar" )))
315
+ sh ('xz %s' % os .path .join ('dist' , tarball_name ("tar" )), ignore_error = True )
308
316
309
317
# Copy the superpack into installers dir
310
318
if not os .path .exists (options .installers .installersdir ):
311
319
os .makedirs (options .installers .installersdir )
312
320
321
+ if not os .path .exists (os .path .join ('dist' , tarball_name ("xztar" ))):
322
+ warnings .warn ("Could not create tar.xz! Do you have xz installed?" )
323
+ else :
324
+ t = 'xztar'
325
+ source = os .path .join ('dist' , tarball_name (t ))
326
+ target = os .path .join (options .installers .installersdir , tarball_name (t ))
327
+ shutil .copy (source , target )
328
+
313
329
for t in ['gztar' , 'zip' ]:
314
330
source = os .path .join ('dist' , tarball_name (t ))
315
331
target = os .path .join (options .installers .installersdir , tarball_name (t ))
0 commit comments