File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -478,18 +478,30 @@ def run(self):
478478 config .download_to_dest ()
479479
480480
481+ class LibzimClean (Command ):
482+ user_options = []
483+
484+ def initialize_options (self ):
485+ ...
486+
487+ def finalize_options (self ):
488+ ...
489+
490+ def run (self ):
491+ config .cleanup ()
492+
493+
481494if len (sys .argv ) == 2 and sys .argv [1 ] in config .buildless_commands :
482495 ext_modules = None
483496else :
484497 config .check_platform ()
485498 ext_modules = get_cython_extension ()
486499
487- try :
488- setup (
489- cmdclass = {"build_ext" : LibzimBuildExt , "download_libzim" : DownloadLibzim },
490- ext_modules = ext_modules ,
491- )
492- except Exception as exc :
493- raise exc
494- finally :
495- config .cleanup ()
500+ setup (
501+ cmdclass = {
502+ "build_ext" : LibzimBuildExt ,
503+ "download_libzim" : DownloadLibzim ,
504+ "clean" : LibzimClean ,
505+ },
506+ ext_modules = ext_modules ,
507+ )
You can’t perform that action at this time.
0 commit comments