- Timestamp:
- Jun 10, 2011 5:24:57 PM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 57a6f9d
- Parents:
- e5ceb52
- Location:
- guiframe
- Files:
-
- 2 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/setup.py
rc22305e r3c47277 10 10 import os 11 11 import sys 12 import glob 12 13 13 14 14 … … 30 30 packages.append(package_name) 31 31 package_dir[package_name] = "local_perspectives/" + dir 32 33 # Check whether the sans module exists, 34 # if not, make sure a default __init__ is created 35 if 'install' in sys.argv: 36 try: 37 lib_dir = get_python_lib() 38 danse_init = os.path.join(lib_dir, 'sans', '__init__.py') 39 if not os.path.isfile(danse_init): 40 if not os.path.isdir("tmp_sans"): 41 os.mkdir("tmp_sans") 42 f = open("tmp_sans/__init__.py",'w') 43 f.close() 44 package_dir['sans'] = "tmp_sans" 45 packages.append("sans") 46 except: 47 print "Couldn't create sans/__init__.py\n %s" % sys.exc_value 32 48 33 49 34 setup( … … 60 45 61 46 ) 62 if 'sdist' in sys.argv:63 import zipfile64 from distutils.filelist import findall65 filename = "guiframe-0.9"66 cwd = os.getcwd()67 for f in findall(cwd):68 if os.path.basename(f).count(filename) == 1:69 if zipfile.is_zipfile(f):70 zfile = zipfile.ZipFile(f, "a")71 for image_file in glob.glob(os.path.join("images","*")):72 print "Adding %s to %s\n" % (image_file, os.path.basename(f))73 zfile.write(image_file, os.path.join(filename, image_file))74 for media_file in glob.glob(os.path.join("media","*")):75 print "Adding %s to %s\n" % (media_file, os.path.basename(f))76 zfile.write(media_file, os.path.join(filename, media_file))77 zfile.close()78 break79
Note: See TracChangeset
for help on using the changeset viewer.