@@ -22,7 +22,8 @@ import (
2222 "github.com/paketo-buildpacks/packit/v2/scribe"
2323
2424 pythoninstallers "github.com/paketo-buildpacks/python-installers"
25- pkgcommon "github.com/paketo-buildpacks/python-installers/pkg/installers/common"
25+ "github.com/paketo-buildpacks/python-installers/pkg/build"
26+ dependencyfakes "github.com/paketo-buildpacks/python-installers/pkg/dependency/fakes"
2627 miniconda "github.com/paketo-buildpacks/python-installers/pkg/installers/miniconda"
2728 minicondafakes "github.com/paketo-buildpacks/python-installers/pkg/installers/miniconda/fakes"
2829 pip "github.com/paketo-buildpacks/python-installers/pkg/installers/pip"
@@ -35,6 +36,7 @@ import (
3536 poetryfakes "github.com/paketo-buildpacks/python-installers/pkg/installers/poetry/fakes"
3637 uv "github.com/paketo-buildpacks/python-installers/pkg/installers/uv"
3738 uvfakes "github.com/paketo-buildpacks/python-installers/pkg/installers/uv/fakes"
39+ sbomfakes "github.com/paketo-buildpacks/python-installers/pkg/sbom/fakes"
3840
3941 . "github.com/onsi/gomega"
4042 "github.com/sclevine/spec"
@@ -55,41 +57,41 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
5557
5658 buffer * bytes.Buffer
5759 logger scribe.Emitter
58- build packit.BuildFunc
60+ buildFunc packit.BuildFunc
5961 buildContext packit.BuildContext
6062
6163 // common
62- sbomGenerator * pipfakes .SBOMGenerator
63- // dependencyManager *pipfakes .DependencyManager
64+ sbomGenerator * sbomfakes .SBOMGenerator
65+ // dependencyManager *dependencyfakes .DependencyManager
6466
6567 // conda
66- minicondaDependencyManager * minicondafakes .DependencyManager
68+ minicondaDependencyManager * dependencyfakes .DependencyManager
6769 runner * minicondafakes.Runner
6870
6971 // pip
70- pipDependencyManager * pipfakes .DependencyManager
72+ pipDependencyManager * dependencyfakes .DependencyManager
7173 pipInstallProcess * pipfakes.InstallProcess
7274 pipSitePackageProcess * pipfakes.SitePackageProcess
7375
7476 // pipenv
75- pipenvDependencyManager * pipenvfakes .DependencyManager
77+ pipenvDependencyManager * dependencyfakes .DependencyManager
7678 pipenvProcess * pipenvfakes.InstallProcess
7779 pipenvSitePackageProcess * pipenvfakes.SitePackageProcess
7880
7981 // poetry
80- poetryDependencyManager * poetryfakes .DependencyManager
82+ poetryDependencyManager * dependencyfakes .DependencyManager
8183 poetryProcess * poetryfakes.InstallProcess
8284 poetrySitePackageProcess * poetryfakes.SitePackageProcess
8385
8486 // uv
85- uvDependencyManager * uvfakes .DependencyManager
87+ uvDependencyManager * dependencyfakes .DependencyManager
8688 uvInstallProcess * uvfakes.InstallProcess
8789
8890 // pixi
89- pixiDependencyManager * pixifakes .DependencyManager
91+ pixiDependencyManager * dependencyfakes .DependencyManager
9092 pixiInstallProcess * pixifakes.InstallProcess
9193
92- buildParameters pkgcommon .CommonBuildParameters
94+ buildParameters build .CommonBuildParameters
9395
9496 testPlans []TestPlan
9597 )
@@ -102,11 +104,11 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
102104 buffer = bytes .NewBuffer (nil )
103105 logger = scribe .NewEmitter (buffer )
104106
105- sbomGenerator = & pipfakes .SBOMGenerator {}
107+ sbomGenerator = & sbomfakes .SBOMGenerator {}
106108 sbomGenerator .GenerateFromDependencyCall .Returns .SBOM = sbom.SBOM {}
107109
108110 // miniconda
109- minicondaDependencyManager = & minicondafakes .DependencyManager {}
111+ minicondaDependencyManager = & dependencyfakes .DependencyManager {}
110112 minicondaDependencyManager .ResolveCall .Returns .Dependency = postal.Dependency {
111113 ID : "miniconda3" ,
112114 Name : "miniconda3-dependency-name" ,
@@ -134,7 +136,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
134136 runner = & minicondafakes.Runner {}
135137
136138 // pip
137- pipDependencyManager = & pipfakes .DependencyManager {}
139+ pipDependencyManager = & dependencyfakes .DependencyManager {}
138140 pipDependencyManager .ResolveCall .Returns .Dependency = postal.Dependency {
139141 ID : "pip" ,
140142 Name : "Pip" ,
@@ -171,7 +173,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
171173 pipSitePackageProcess .ExecuteCall .Returns .String = filepath .Join (layersDir , "pip" , "lib" , "python1.23" , "site-packages" )
172174
173175 // pipenv
174- pipenvDependencyManager = & pipenvfakes .DependencyManager {}
176+ pipenvDependencyManager = & dependencyfakes .DependencyManager {}
175177 pipenvDependencyManager .ResolveCall .Returns .Dependency = postal.Dependency {
176178 ID : "pipenv" ,
177179 Name : "pipenv-dependency-name" ,
@@ -201,7 +203,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
201203 pipenvSitePackageProcess .ExecuteCall .Returns .String = filepath .Join (layersDir , "pipenv" , "lib" , "python3.8" , "site-packages" )
202204
203205 // poetry
204- poetryDependencyManager = & poetryfakes .DependencyManager {}
206+ poetryDependencyManager = & dependencyfakes .DependencyManager {}
205207 poetryDependencyManager .ResolveCall .Returns .Dependency = postal.Dependency {
206208 ID : "poetry" ,
207209 Name : "poetry-dependency-name" ,
@@ -230,7 +232,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
230232 poetrySitePackageProcess .ExecuteCall .Returns .String = filepath .Join (layersDir , "poetry" , "lib" , "python3.8" , "site-packages" )
231233
232234 // uv
233- uvDependencyManager = & uvfakes .DependencyManager {}
235+ uvDependencyManager = & dependencyfakes .DependencyManager {}
234236 uvDependencyManager .ResolveCall .Returns .Dependency = postal.Dependency {
235237 ID : "uv" ,
236238 Name : "uv-dependency-name" ,
@@ -258,7 +260,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
258260 uvInstallProcess = & uvfakes.InstallProcess {}
259261
260262 // pixi
261- pixiDependencyManager = & pixifakes .DependencyManager {}
263+ pixiDependencyManager = & dependencyfakes .DependencyManager {}
262264 pixiDependencyManager .ResolveCall .Returns .Dependency = postal.Dependency {
263265 ID : "pixi" ,
264266 Name : "pixi-dependency-name" ,
@@ -285,8 +287,8 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
285287
286288 pixiInstallProcess = & pixifakes.InstallProcess {}
287289
288- buildParameters = pkgcommon .CommonBuildParameters {
289- SbomGenerator : pkgcommon. Generator {} ,
290+ buildParameters = build .CommonBuildParameters {
291+ SbomGenerator : sbomGenerator ,
290292 Clock : chronos .DefaultClock ,
291293 Logger : logger ,
292294 }
@@ -321,7 +323,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
321323 },
322324 }
323325
324- build = pythoninstallers .Build (logger , buildParameters , packagerParameters )
326+ buildFunc = pythoninstallers .Build (logger , buildParameters , packagerParameters )
325327
326328 buildContext = packit.BuildContext {
327329 BuildpackInfo : packit.BuildpackInfo {
@@ -435,7 +437,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
435437 for _ , testPlan := range testPlans {
436438 logger .Detail ("Doing: %s" , testPlan )
437439 buildContext .Plan = testPlan .Plan
438- result , err := build (buildContext )
440+ result , err := buildFunc (buildContext )
439441 Expect (err ).NotTo (HaveOccurred ())
440442
441443 layers := result .Layers
@@ -469,7 +471,7 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
469471 for _ , testPlan := range orderTestPlans {
470472 logger .Detail ("Doing: %s" , testPlan )
471473 buildContext .Plan = testPlan
472- result , err := build (buildContext )
474+ result , err := buildFunc (buildContext )
473475 Expect (err ).NotTo (HaveOccurred ())
474476
475477 layers := result .Layers
@@ -482,11 +484,11 @@ func testBuild(t *testing.T, context spec.G, it spec.S) {
482484 it ("fails if packager parameters is missing" , func () {
483485 packagerParameters := map [string ]pythoninstallers.PackagerParameters {}
484486
485- build = pythoninstallers .Build (logger , buildParameters , packagerParameters )
487+ buildFunc = pythoninstallers .Build (logger , buildParameters , packagerParameters )
486488
487489 for _ , testPlan := range testPlans {
488490 buildContext .Plan = testPlan .Plan
489- _ , err := build (buildContext )
491+ _ , err := buildFunc (buildContext )
490492 Expect (err ).To (HaveOccurred ())
491493 }
492494 })
0 commit comments