@@ -633,41 +633,33 @@ MarkupSafe==2.0.1
633633
634634 Describe ("InstallCommonBuildDependencies" , func () {
635635 Context ("successful installation" , func () {
636- It ("bootstraps flit-core, wheel and setuptools" , func () {
636+ It ("bootstraps flit-core, poetry-core, wheel and setuptools" , func () {
637637 mockInstaller .EXPECT ().InstallOnlyVersion ("pip" , "/tmp/common_build_deps" )
638638 mockInstaller .EXPECT ().InstallOnlyVersion ("flit-core" , "/tmp/common_build_deps" )
639639 mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps" , "--no-build-isolation" )
640+ mockInstaller .EXPECT ().InstallOnlyVersion ("poetry-core" , "/tmp/common_build_deps" )
641+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps" , "--no-build-isolation" )
640642 mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "wheel" , "--no-index" , "--no-build-isolation" , "--upgrade-strategy=only-if-needed" , "--find-links=/tmp/common_build_deps" )
641643 mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "setuptools" , "--no-index" , "--no-build-isolation" , "--upgrade-strategy=only-if-needed" , "--find-links=/tmp/common_build_deps" )
642644
643645 Expect (supplier .InstallCommonBuildDependencies ()).To (Succeed ())
644646 })
645647 })
646648
647- Context ("flit-core bootstrap fails" , func () {
648- It ("returns a useful error message" , func () {
649- mockInstaller .EXPECT ().InstallOnlyVersion ("pip" , "/tmp/common_build_deps" )
650- mockInstaller .EXPECT ().InstallOnlyVersion ("flit-core" , "/tmp/common_build_deps" )
651- mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps" , "--no-build-isolation" ).Return (fmt .Errorf ("bootstrap-error" ))
652- Expect (supplier .InstallCommonBuildDependencies ()).To (MatchError ("could not bootstrap-install flit-core: bootstrap-error" ))
653- })
654- })
655-
656- Context ("wheel installation fails" , func () {
649+ Context ("flit-core bootstrap fails" , func () {
657650 It ("returns a useful error message" , func () {
658651 mockInstaller .EXPECT ().InstallOnlyVersion ("pip" , "/tmp/common_build_deps" )
659652 mockInstaller .EXPECT ().InstallOnlyVersion ("flit-core" , "/tmp/common_build_deps" )
660- mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps" , "--no-build-isolation" )
661- mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "wheel" , "--no-index" , "--no-build-isolation" , "--upgrade-strategy=only-if-needed" , "--find-links=/tmp/common_build_deps" ).Return (fmt .Errorf ("some-pip-error" ))
662- Expect (supplier .InstallCommonBuildDependencies ()).To (MatchError ("could not install build-time dependency wheel: some-pip-error" ))
653+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps" , "--no-build-isolation" ).Return (fmt .Errorf ("bootstrap-error" ))
654+ Expect (supplier .InstallCommonBuildDependencies ()).To (MatchError ("could not bootstrap-install flit-core: bootstrap-error" ))
663655 })
664656 })
665657
666658 Context ("poetry-core preparation fails" , func () {
667659 It ("returns a useful error message" , func () {
668660 mockInstaller .EXPECT ().InstallOnlyVersion ("pip" , "/tmp/common_build_deps" )
669- mockCommand .EXPECT ().Execute ( buildDir , gomock . Any (), gomock . Any (), "python" , "-m " , "pip" , "install" , "wheel" , "--no-index" , "--upgrade-strategy=only-if-needed" , "--find-links= /tmp/common_build_deps" )
670- mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "setuptools " , "--no-index" , "--upgrade-strategy=only-if-needed" , "--find-links=/tmp/common_build_deps " )
661+ mockInstaller .EXPECT ().InstallOnlyVersion ( "flit-core " , "/tmp/common_build_deps" )
662+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps " , "--no-build-isolation " )
671663 mockInstaller .EXPECT ().InstallOnlyVersion ("poetry-core" , "/tmp/common_build_deps" ).Return (fmt .Errorf ("prepare-error" ))
672664 Expect (supplier .InstallCommonBuildDependencies ()).To (MatchError ("could not prepare build-time dependency poetry-core: prepare-error" ))
673665 })
@@ -676,13 +668,25 @@ MarkupSafe==2.0.1
676668 Context ("poetry-core bootstrap fails" , func () {
677669 It ("returns a useful error message" , func () {
678670 mockInstaller .EXPECT ().InstallOnlyVersion ("pip" , "/tmp/common_build_deps" )
679- mockCommand .EXPECT ().Execute ( buildDir , gomock . Any (), gomock . Any (), "python" , "-m " , "pip" , "install" , "wheel" , "--no-index" , "--upgrade-strategy=only-if-needed" , "--find-links= /tmp/common_build_deps" )
680- mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "setuptools " , "--no-index" , "--upgrade-strategy=only-if-needed" , "--find-links=/tmp/common_build_deps " )
671+ mockInstaller .EXPECT ().InstallOnlyVersion ( "flit-core " , "/tmp/common_build_deps" )
672+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps " , "--no-build-isolation " )
681673 mockInstaller .EXPECT ().InstallOnlyVersion ("poetry-core" , "/tmp/common_build_deps" )
682674 mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps" , "--no-build-isolation" ).Return (fmt .Errorf ("poetry-error" ))
683675 Expect (supplier .InstallCommonBuildDependencies ()).To (MatchError ("could not bootstrap-install poetry-core: poetry-error" ))
684676 })
685677 })
678+
679+ Context ("wheel installation fails" , func () {
680+ It ("returns a useful error message" , func () {
681+ mockInstaller .EXPECT ().InstallOnlyVersion ("pip" , "/tmp/common_build_deps" )
682+ mockInstaller .EXPECT ().InstallOnlyVersion ("flit-core" , "/tmp/common_build_deps" )
683+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps" , "--no-build-isolation" )
684+ mockInstaller .EXPECT ().InstallOnlyVersion ("poetry-core" , "/tmp/common_build_deps" )
685+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "/tmp/common_build_deps" , "--no-build-isolation" )
686+ mockCommand .EXPECT ().Execute (buildDir , gomock .Any (), gomock .Any (), "python" , "-m" , "pip" , "install" , "wheel" , "--no-index" , "--no-build-isolation" , "--upgrade-strategy=only-if-needed" , "--find-links=/tmp/common_build_deps" ).Return (fmt .Errorf ("some-pip-error" ))
687+ Expect (supplier .InstallCommonBuildDependencies ()).To (MatchError ("could not install build-time dependency wheel: some-pip-error" ))
688+ })
689+ })
686690 })
687691
688692 Describe ("CreateDefaultEnv" , func () {
0 commit comments