python-gdbm@3.11 3.11.0 (new formula)
Closes #113811. Signed-off-by: Michka Popoff <3406519+iMichka@users.noreply.github.com> Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>master
parent
5dece0a93f
commit
bbc525d4bf
|
@ -0,0 +1 @@
|
|||
../Formula/python-gdbm@3.11.rb
|
|
@ -0,0 +1,53 @@
|
|||
class PythonGdbmAT311 < Formula
|
||||
desc "Python interface to gdbm"
|
||||
homepage "https://www.python.org/"
|
||||
url "https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz"
|
||||
sha256 "64424e96e2457abbac899b90f9530985b51eef2905951febd935f0e73414caeb"
|
||||
license "Python-2.0"
|
||||
|
||||
livecheck do
|
||||
formula "python@3.11"
|
||||
end
|
||||
|
||||
depends_on "gdbm"
|
||||
depends_on "python@3.11"
|
||||
|
||||
def python3
|
||||
"python3.11"
|
||||
end
|
||||
|
||||
def install
|
||||
cd "Modules" do
|
||||
(Pathname.pwd/"setup.py").write <<~EOS
|
||||
from setuptools import setup, Extension
|
||||
|
||||
setup(name="gdbm",
|
||||
description="#{desc}",
|
||||
version="#{version}",
|
||||
ext_modules = [
|
||||
Extension("_gdbm", ["_gdbmmodule.c"],
|
||||
include_dirs=["#{Formula["gdbm"].opt_include}"],
|
||||
libraries=["gdbm"],
|
||||
library_dirs=["#{Formula["gdbm"].opt_lib}"])
|
||||
]
|
||||
)
|
||||
EOS
|
||||
system python3, *Language::Python.setup_install_args(libexec, python3),
|
||||
"--install-lib=#{libexec}"
|
||||
rm_r libexec.glob("*.egg-info")
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
testdb = testpath/"test.db"
|
||||
system python3, "-c", <<~EOS
|
||||
import dbm.gnu
|
||||
|
||||
with dbm.gnu.open("#{testdb}", "n") as db:
|
||||
db["testkey"] = "testvalue"
|
||||
|
||||
with dbm.gnu.open("#{testdb}", "r") as db:
|
||||
assert db["testkey"] == b"testvalue"
|
||||
EOS
|
||||
end
|
||||
end
|
|
@ -31,6 +31,7 @@
|
|||
"python@3.9",
|
||||
"python@3.10",
|
||||
"python@3.11",
|
||||
"python-gdbm@3.11",
|
||||
"python-tk@3.9",
|
||||
"python-tk@3.10",
|
||||
"python-tk@3.11",
|
||||
|
|
Loading…
Reference in New Issue