ESMCI / cime

Common Infrastructure for Modeling the Earth
http://esmci.github.io/cime
Other
162 stars 209 forks source link

Remove distutils #4688

Closed jedwards4b closed 1 month ago

jedwards4b commented 1 month ago

distutils is deprecated in python 3.12 and needs to be removed.

Test suite: Test baseline: Test namelist changes: Test status: [bit for bit, roundoff, climate changing]

Fixes [CIME Github issue #]

User interface changes?:

Update gh-pages html (Y/N)?:

jedwards4b commented 1 month ago

I think that there may be a problem with this change.

 File "/glade/work/jedwards/sandboxes/cesm3/cime/CIME/utils.py", line 1412, in safe_copy                                                           
    shutil.copy2(                                                                                                                                   
  File "/glade/u/apps/derecho/23.09/opt/._view/uip25pncojubuf3qqtaj4uzay3xuwpie/lib/python3.10/shutil.py", line 434, in copy2                       
    copyfile(src, dst, follow_symlinks=follow_symlinks)                                                                                             
  File "/glade/u/apps/derecho/23.09/opt/._view/uip25pncojubuf3qqtaj4uzay3xuwpie/lib/python3.10/shutil.py", line 234, in copyfile                    
    raise SameFileError("{!r} and {!r} are the same file".format(src, dst))                                                                         
shutil.SameFileError: '/glade/derecho/scratch/jedwards/archive/ERI_Ly15.f09_g17_gris4.T1850Gg.derecho_intel.cism-isostasy_period4.C.20241001_132218\
_c5ds43.ref1/rest/0003-01-01-00000/rpointer.lnd.0003-01-01-00000' and '/glade/derecho/scratch/jedwards/ERI_Ly15.f09_g17_gris4.T1850Gg.derecho_intel\
.cism-isostasy_period4.C.20241001_132218_c5ds43.ref2/run/rpointer.lnd.0003-01-01-00000' are the same file   
jgfouca commented 1 month ago

@jedwards4b , maybe just add a line to check if it's the same file? There's no need to copy a file to itself.

jedwards4b commented 1 month ago

Yes, fix incoming.