@@ -93,9 +93,9 @@ var _ = Describe("Supply", func() {
9393 BeforeEach (func () {
9494 Expect (os .MkdirAll (depDir , 0755 )).To (Succeed ())
9595 pythonInstallDir = filepath .Join (depDir , "python" )
96- Expect (os .WriteFile (filepath .Join (depDir , "runtime.txt" ), []byte ("\n \n \n python-3.4 .2\n \n \n " ), 0644 )).To (Succeed ())
96+ Expect (os .WriteFile (filepath .Join (depDir , "runtime.txt" ), []byte ("\n \n \n python-3.9 .2\n \n \n " ), 0644 )).To (Succeed ())
9797
98- versions = []string {"3.4 .2" , "3.7.13 " }
98+ versions = []string {"3.9 .2" , "3.10.1 " }
9999 originalPath = os .Getenv ("PATH" )
100100 })
101101
@@ -106,31 +106,13 @@ var _ = Describe("Supply", func() {
106106 Context ("runtime.txt sets Python version 3" , func () {
107107 It ("installs Python version 3" , func () {
108108 mockManifest .EXPECT ().AllDependencyVersions ("python" ).Return (versions )
109- mockInstaller .EXPECT ().InstallDependency (libbuildpack.Dependency {Name : "python" , Version : "3.4 .2" }, pythonInstallDir )
109+ mockInstaller .EXPECT ().InstallDependency (libbuildpack.Dependency {Name : "python" , Version : "3.9 .2" }, pythonInstallDir )
110110 mockStager .EXPECT ().LinkDirectoryInDepDir (filepath .Join (pythonInstallDir , "bin" ), "bin" )
111111 mockStager .EXPECT ().LinkDirectoryInDepDir (filepath .Join (pythonInstallDir , "lib" ), "lib" )
112112 Expect (supplier .InstallPython ()).To (Succeed ())
113113 Expect (os .Getenv ("PATH" )).To (Equal (fmt .Sprintf ("%s:%s" , filepath .Join (depDir , "bin" ), originalPath )))
114114 Expect (os .Getenv ("PYTHONPATH" )).To (Equal (depDir ))
115- Expect (os .Getenv ("CFLAGS" )).To (Equal (fmt .Sprintf ("-I%s" , filepath .Join (depDir , "python" , "include" , "python3.4" ))))
116- })
117- })
118-
119- //Remove once Python 3.7 is out of support (June 2023)
120- Context ("runtime.txt sets Python version 3.7" , func () {
121- BeforeEach (func () {
122- Expect (os .RemoveAll (filepath .Join (depDir , "runtime.txt" ))).To (Succeed ())
123- Expect (os .WriteFile (filepath .Join (depDir , "runtime.txt" ), []byte ("\n \n \n python-3.7.13\n \n \n " ), 0644 )).To (Succeed ())
124- })
125- It ("installs Python version 3.7" , func () {
126- mockManifest .EXPECT ().AllDependencyVersions ("python" ).Return (versions )
127- mockInstaller .EXPECT ().InstallDependency (libbuildpack.Dependency {Name : "python" , Version : "3.7.13" }, pythonInstallDir )
128- mockStager .EXPECT ().LinkDirectoryInDepDir (filepath .Join (pythonInstallDir , "bin" ), "bin" )
129- mockStager .EXPECT ().LinkDirectoryInDepDir (filepath .Join (pythonInstallDir , "lib" ), "lib" )
130- Expect (supplier .InstallPython ()).To (Succeed ())
131- Expect (os .Getenv ("PATH" )).To (Equal (fmt .Sprintf ("%s:%s" , filepath .Join (depDir , "bin" ), originalPath )))
132- Expect (os .Getenv ("PYTHONPATH" )).To (Equal (depDir ))
133- Expect (os .Getenv ("CFLAGS" )).To (Equal (fmt .Sprintf ("-I%s" , filepath .Join (depDir , "python" , "include" , "python3.7m" ))))
115+ Expect (os .Getenv ("CFLAGS" )).To (Equal (fmt .Sprintf ("-I%s" , filepath .Join (depDir , "python" , "include" , "python3.9" ))))
134116 })
135117 })
136118
0 commit comments