File tree Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -642,9 +642,12 @@ def uninstall(lib_dir):
642642# Out of principle, we're still not using system exits.
643643
644644
645- def verify_destination (location ):
645+ def verify_destination (location : str ) -> str :
646+ location = os .path .abspath (location )
646647 if not os .path .isdir (location ):
647- raise argparse .ArgumentTypeError (f'Path "{ location } " does not exist!' )
648+ raise argparse .ArgumentTypeError (
649+ f'Path "{ location } " is not an existing directory!'
650+ )
648651 return location
649652
650653
Original file line number Diff line number Diff line change @@ -856,16 +856,6 @@ def run(self):
856856 This is only run for local installs. Wheel-based installs won't run this code.
857857 """
858858 install .run (self )
859- # If self.root has a value, it means we are being "installed" into some other
860- # directory than Python itself - in which case we must *not* run our installer.
861- # bdist_wininst used to trigger this by using a temp directory.
862- # Is this still a concern ?
863- if self .root :
864- print (
865- "Not executing post install script when "
866- + f"not installing in Python itself (self.root={ self .root } )"
867- )
868- return
869859 self .execute (self ._postinstall , (), msg = "Executing post install script..." )
870860
871861 def _postinstall (self ):
@@ -874,17 +864,17 @@ def _postinstall(self):
874864 raise RuntimeError (f"Can't find '{ filename } '" )
875865 # As of setuptools>=74.0.0, we no longer need to
876866 # be concerned about distutils calling win32api
877- subprocess .Popen (
878- [
867+ subprocess .check_call (
868+ (
879869 sys .executable ,
880870 filename ,
881871 "-install" ,
882872 "-destination" ,
883873 self .install_lib ,
884- "-quiet" ,
874+ * ([] if self . verbose else [ "-quiet" ]) ,
885875 "-wait" ,
886876 str (os .getpid ()),
887- ]
877+ )
888878 )
889879
890880
You can’t perform that action at this time.
0 commit comments