|
25 | 25 | # python39 # end of security support is scheduled for 2025-10-31; therefore nixpkgs support was dropped before nixos 25.05 was released |
26 | 26 | # python310 # error: sphinx-8.2.3 not supported for interpreter python3.10 |
27 | 27 | python311 |
28 | | - # python312 # tests are currently broken where plpython3u is used -- https://github.com/pgsql-io/multicorn2/issues/60 |
29 | | - # python313 # tests are currently broken where plpython3u is used -- https://github.com/pgsql-io/multicorn2/issues/60 |
| 28 | + python312 |
| 29 | + python313 |
30 | 30 | ]; |
31 | 31 | testPostgresVersions = with pkgs; [ |
32 | 32 | postgresql_13 |
|
126 | 126 | # "# -> Build order", so to speak... structed to build up a PostgreSQL with a compatible Python interpreter that |
127 | 127 | # is already configured to load the multicorn module. |
128 | 128 | # |
129 | | - # 1. Multicorn python package first, using the "raw" Python & "raw" PostgreSQL |
| 129 | + # 1. PostgreSQL w/ plpython3, using "raw" Python |
| 130 | + pythonEnabledPostgres = (makePostgresWithPlPython test_python test_postgresql); |
| 131 | + |
| 132 | + # 2. Multicorn python package first, using the "raw" Python & "raw" PostgreSQL |
130 | 133 | multicornPython = (makeMulticornPythonPackage test_python test_postgresql); |
131 | 134 |
|
132 | | - # 2. Python enhanced w/ the multicorn package |
| 135 | + # 3. Python enhanced w/ the multicorn package |
133 | 136 | enhancedPython = (test_python.withPackages (ps: [multicornPython] ++ (requiredPythonPackages ps) )); |
134 | 137 |
|
135 | | - # 3. PostgreSQL w/ plpython3, using "enhanced" Python |
136 | | - pythonEnabledPostgres = (makePostgresWithPlPython enhancedPython test_postgresql); |
137 | | - |
138 | 138 | # 4. Multicorn postgresql extension, using the "enhanced" Python & plpython3 PostgreSQL |
139 | 139 | multicornPostgresExtension = (makeMulticornPostgresExtension enhancedPython pythonEnabledPostgres); |
140 | 140 |
|
|
145 | 145 | ]); |
146 | 146 |
|
147 | 147 | pgMajorVersion = pkgs.lib.versions.major test_postgresql.version; |
148 | | - expectedTestCount = if pkgs.lib.versionOlder pgMajorVersion "14" then "18" else "19"; |
| 148 | + pythonVersion = pkgs.lib.versions.majorMinor test_python.version; |
| 149 | + isPython312OrHigher = pkgs.lib.versionAtLeast pythonVersion "3.12"; |
| 150 | + |
| 151 | + baseTestCount = if pkgs.lib.versionOlder pgMajorVersion "14" then 18 else 19; |
| 152 | + expectedTestCount = toString (baseTestCount - (if isPython312OrHigher then 1 else 0)); |
149 | 153 | in pkgs.stdenv.mkDerivation { |
150 | 154 | name = "multicorn2-python-test-pg${test_postgresql.version}-py${test_python.version}"; |
151 | 155 |
|
|
0 commit comments