@@ -93,9 +93,9 @@ var _ = Describe("Supply", func() {
93
93
BeforeEach (func () {
94
94
Expect (os .MkdirAll (depDir , 0755 )).To (Succeed ())
95
95
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 ())
97
97
98
- versions = []string {"3.4 .2" , "3.7.13 " }
98
+ versions = []string {"3.9 .2" , "3.10.1 " }
99
99
originalPath = os .Getenv ("PATH" )
100
100
})
101
101
@@ -106,31 +106,13 @@ var _ = Describe("Supply", func() {
106
106
Context ("runtime.txt sets Python version 3" , func () {
107
107
It ("installs Python version 3" , func () {
108
108
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 )
110
110
mockStager .EXPECT ().LinkDirectoryInDepDir (filepath .Join (pythonInstallDir , "bin" ), "bin" )
111
111
mockStager .EXPECT ().LinkDirectoryInDepDir (filepath .Join (pythonInstallDir , "lib" ), "lib" )
112
112
Expect (supplier .InstallPython ()).To (Succeed ())
113
113
Expect (os .Getenv ("PATH" )).To (Equal (fmt .Sprintf ("%s:%s" , filepath .Join (depDir , "bin" ), originalPath )))
114
114
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" ))))
134
116
})
135
117
})
136
118
0 commit comments