gnu: Python: Delete existing compiled files before compiling bytecode.
* gnu/packages/python.scm (python-3.9)[arguments]: Delete existing pycs before calling "compileall".
This commit is contained in:
		
							parent
							
								
									7c2c698862
								
							
						
					
					
						commit
						65c5efd14e
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -533,6 +533,14 @@ data types.")
 | 
			
		|||
                 ;; Disable hash randomization to ensure the generated .pycs
 | 
			
		||||
                 ;; are reproducible.
 | 
			
		||||
                 (setenv "PYTHONHASHSEED" "0")
 | 
			
		||||
 | 
			
		||||
                 ;; XXX: Delete existing auto-generated pycs beforehand because
 | 
			
		||||
                 ;; the -f argument does not necessarily overwrite all files,
 | 
			
		||||
                 ;; leading to indeterministic results.
 | 
			
		||||
                 (for-each (lambda (pyc)
 | 
			
		||||
                             (delete-file pyc))
 | 
			
		||||
                           (find-files out "\\.pyc$"))
 | 
			
		||||
 | 
			
		||||
                 (apply invoke
 | 
			
		||||
                        `(,,(if (%current-target-system)
 | 
			
		||||
                                "python3"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue