@@ -149,7 +149,13 @@ a = Analysis(['artisan.py'],
149149 hookspath = [],
150150 runtime_hooks = ['./pyinstaller_hooks/rthooks/pyi_rth_mplconfig.py' ], # overwrites default MPL runtime hook which keeps loading font cache from (new) temp directory
151151 additional_hooks_dir = [],
152- excludes = ['tkinter' , 'mypy' , 'hypothesis' , 'tornado' , 'pkg_resources' ],
152+ excludes = ['tkinter' , 'mypy' , 'hypothesis' , 'tornado' , 'pkg_resources' , 'setuptools' , 'curses' , 'matplotlib.tests' , 'numpy.tests' ,
153+ 'scipy.tests' , 'numpy.lib.tests' , 'numpy.ma.tests' , 'numpy.matrixlib.tests' , 'numpy.polynomial.tests' , 'numpy.random.tests' ,
154+ 'numpy.testing.tests' , 'numpy.typing.tests' , 'scipy._lib.tests' , 'scipy.constants.tests' , 'scipy.datasets.tests' , 'scipy.fft.tests' ,
155+ 'scipy.fftpack.tests' , 'scipy.integrate._ivp.tests' , 'scipy.interpolate.tests' , 'scipy.io._harwell_boeing.tests' , 'scipy.io.arff.tests' ,
156+ 'scipy.io.matlab.tests' , 'scipy.io.tests' , 'scipy.linalg.tests' , 'scipy.ndimage.tests' , 'scipy.odr.tests' , 'scipy.optimize.tests' ,
157+ 'scipy.signal.tests' , 'scipy.sparse.linalg._isolve.tests' , 'scipy.sparse.linalg.tests' , 'scipy.sparse.tests' , 'scipy.spatial.tests' ,
158+ 'scipy.spatial.transform.tests' , 'scipy.special.tests' , 'scipy.stats.tests' ],
153159 win_no_prefer_redirects = False ,
154160 win_private_assemblies = False ,
155161 cipher = block_cipher ,
@@ -165,7 +171,7 @@ exe = EXE(pyz,
165171 a .datas if onefile else [],
166172 options = [], # runtime python options
167173 exclude_binaries = not onefile ,
168- name = 'Artisan ' ,
174+ name = 'artisan ' ,
169175 debug = False ,
170176 bootloader_ignore_signals = False ,
171177 strip = True , # not recommended for Windows
@@ -188,11 +194,11 @@ except Exception: # pylint: disable=broad-except
188194plist = {}
189195with open ('Info.plist' , 'rb' ) as infile :
190196 plist = plistlib .load (infile )
191- plist .update ({ 'CFBundleDisplayName' : 'Artisan ' ,
192- 'CFBundleGetInfoString' : 'Artisan, Roast Logger ' ,
197+ plist .update ({ 'CFBundleDisplayName' : 'artisan ' ,
198+ 'CFBundleGetInfoString' : 'artisan scope ' ,
193199 'CFBundleIdentifier' : 'org.artisan-scope.artisan' ,
194200 'CFBundleShortVersionString' : VERSION ,
195- 'CFBundleVersion' : 'Artisan ' + VERSION ,
201+ 'CFBundleVersion' : 'artisan ' + VERSION ,
196202 'LSMinimumSystemVersion' : minimumSystemVersion ,
197203 'LSMultipleInstancesProhibited' : False ,
198204 'LSArchitecturePriority' : ['x86_64' ],
@@ -218,14 +224,14 @@ if not onefile:
218224 bundle_obj = coll
219225
220226app = BUNDLE (bundle_obj ,
221- name = 'Artisan .app' ,
227+ name = 'artisan .app' ,
222228 icon = 'artisan.icns' ,
223229 bundle_identifier = 'org.artisan-scope.artisan' ,
224230 info_plist = plist )
225231
226232#------
227233
228- subprocess .check_call (r'mv dist/Artisan .app/Contents/Resources/translations dist/Artisan .app/Contents/' ,shell = True )
234+ subprocess .check_call (r'mv dist/artisan .app/Contents/Resources/translations dist/artisan .app/Contents/' ,shell = True )
229235subprocess .check_call (r'rm -rf dist/Test/_internal/babel/*' ,shell = True ) # unclear: without this line, the next fails
230236subprocess .check_call (r'rm -rf dist/Test' ,shell = True )
231237subprocess .check_call (r'cp README.txt dist' ,shell = True )
@@ -238,7 +244,7 @@ subprocess.check_call(r'cp Wheels/Cupping/* dist/Wheels/Cupping',shell = True)
238244subprocess .check_call (r'cp Wheels/Other/* dist/Wheels/Other' ,shell = True )
239245subprocess .check_call (r'cp Wheels/Roasting/* dist/Wheels/Roasting' ,shell = True )
240246try :
241- subprocess .check_call ('rm -rf dist/Artisan .app/Contents/Resources/matplotlib/mpl-data/sample_data' ,shell = True )
247+ subprocess .check_call ('rm -rf dist/artisan .app/Contents/Resources/matplotlib/mpl-data/sample_data' ,shell = True )
242248except Exception : # pylint: disable=broad-except
243249 pass
244250
@@ -247,7 +253,7 @@ os.chdir('./dist')
247253
248254# add localization stubs to make macOS translate the systems menu item and native dialogs
249255for lang in SUPPORTED_LANGUAGES :
250- loc_dir = r'Artisan .app/Contents/Resources/' + lang + r'.lproj'
256+ loc_dir = r'artisan .app/Contents/Resources/' + lang + r'.lproj'
251257 subprocess .check_call (r'mkdir ' + loc_dir ,shell = True )
252258 subprocess .check_call (r'touch ' + loc_dir + r'/Localizable.string' ,shell = True )
253259
@@ -298,7 +304,7 @@ qt_plugin_files = [
298304]
299305
300306## remove unused Qt frameworks libs (not in Qt_modules_frameworks)
301- for subdir , dirs , _files in os .walk ('./Artisan .app/Contents/Frameworks/PyQt6/Qt6/lib' ):
307+ for subdir , dirs , _files in os .walk ('./artisan .app/Contents/Frameworks/PyQt6/Qt6/lib' ):
302308 for di in dirs :
303309 if di .startswith ('Qt' ) and di .endswith ('.framework' ) and di not in Qt_frameworks :
304310 file_path = os .path .join (subdir , di )
@@ -307,7 +313,7 @@ for subdir, dirs, _files in os.walk('./Artisan.app/Contents/Frameworks/PyQt6/Qt6
307313
308314
309315## remove unused plugins
310- for root , dirs , _ in os .walk ('./Artisan .app/Contents/Frameworks/PyQt6/Qt6/plugins' ):
316+ for root , dirs , _ in os .walk ('./artisan .app/Contents/Frameworks/PyQt6/Qt6/plugins' ):
311317 for d in dirs :
312318 if d not in qt_plugin_dirs :
313319 print (f'rm -rf { os .path .join (root ,d )} ' )
@@ -320,11 +326,11 @@ for root, dirs, _ in os.walk('./Artisan.app/Contents/Frameworks/PyQt6/Qt6/plugin
320326 print (f'rm -rf { file_path } ' )
321327 subprocess .check_call (f'rm -rf { file_path } ' ,shell = True )
322328
323- subprocess .check_call (r'rm -rf ./Artisan .app/Contents/Frameworks/PyQt6/Qt6/qml' ,shell = True )
329+ subprocess .check_call (r'rm -rf ./artisan .app/Contents/Frameworks/PyQt6/Qt6/qml' ,shell = True )
324330
325331
326332
327- rootdir = f'./Artisan .app/Contents/Resources'
333+ rootdir = f'./artisan .app/Contents/Resources'
328334
329335# remove Qt artefacts
330336for qt_dir in [
@@ -362,9 +368,9 @@ for qt_dir in ['PyQt6/Qt6/translations']:
362368
363369print ('*** Fix symbolic link to Qt translations ***' )
364370# remove Framework/translations symbolic link to translations -> Resources/translations
365- subprocess .check_call (f'unlink ./Artisan .app/Contents/Frameworks/translations' ,shell = True )
371+ subprocess .check_call (f'unlink ./artisan .app/Contents/Frameworks/translations' ,shell = True )
366372# add symbolic link Frameworks/translations -> Resources/PyQt6/Qt6/translations
367- os .symlink (f'../Resources/PyQt6/Qt6/translations' , f'./Artisan .app/Contents/Frameworks/translations' )
373+ os .symlink (f'../Resources/PyQt6/Qt6/translations' , f'./artisan .app/Contents/Frameworks/translations' )
368374
369375
370376print ('*** Removing unused files ***' )
@@ -410,7 +416,7 @@ for root, dirs, files in os.walk('.'):
410416
411417print ('*** Removing unused language support from babel ***' )
412418
413- for root , _ , files in os .walk (f'./Artisan .app/Contents/Resources/babel/locale-data' ):
419+ for root , _ , files in os .walk (f'./artisan .app/Contents/Resources/babel/locale-data' ):
414420 for file in files :
415421 if (file .endswith ('.dat' ) and
416422 file != 'root.dat' and not (file .startswith ('zh' ) and file .endswith ('.dat' )) and
@@ -422,7 +428,7 @@ for root, _, files in os.walk(f'./Artisan.app/Contents/Resources/babel/locale-da
422428
423429print ('*** Removing mypy completely ***' )
424430try :
425- subprocess .check_call (f'rm -rf ./Artisan .app/Contents/Frameworks/mypy' ,shell = True )
431+ subprocess .check_call (f'rm -rf ./artisan .app/Contents/Frameworks/mypy' ,shell = True )
426432except Exception : # pylint: disable=broad-except
427433 pass
428434
0 commit comments