@@ -37,7 +37,6 @@ class PythonAT314 < Formula
3737 uses_from_macos "unzip"
3838
3939 on_linux do
40- depends_on "berkeley-db@5"
4140 depends_on "zlib-ng-compat"
4241 end
4342
@@ -163,7 +162,7 @@ def install
163162 args << "MACOSX_DEPLOYMENT_TARGET=#{ MacOS . version } "
164163 else
165164 args << "--enable-shared"
166- args << "--with-dbmliborder=bdb "
165+ args << "--with-dbmliborder="
167166 end
168167
169168 # Allow python modules to use ctypes.find_library to find homebrew's stuff
@@ -492,7 +491,8 @@ def caveats
492491 assert_match "ModuleNotFoundError: No module named '_gdbm'" ,
493492 shell_output ( "#{ python3 } -Sc 'import dbm.gnu' 2>&1" , 1 )
494493
495- # Verify that the selected DBM interface works
494+ # Verify that the selected DBM interface works on macOS.
495+ # Linux requires installing python-gdbm formula
496496 ( testpath /"dbm_test.py" ) . write <<~PYTHON
497497 import dbm
498498
@@ -503,7 +503,7 @@ def caveats
503503 assert b"foo \\ xbd" in db
504504 assert db[b"foo \\ xbd"] == b"bar \\ xbd"
505505 PYTHON
506- system python3 , "dbm_test.py"
506+ system python3 , "dbm_test.py" if OS . mac?
507507
508508 system bin /"pip#{ version . major_minor } " , "list" , "--format=columns"
509509
0 commit comments