Skip to content

Commit

Permalink
Fix curses and readline on py 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Mar 25, 2024
1 parent 8723faf commit 67d7949
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-native-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential bison python3-all patchelf swig cmake libldap2-dev libsasl2-dev ldap-utils libssl-dev
sudo apt-get install -y build-essential bison python3-all patchelf swig cmake libldap2-dev libsasl2-dev ldap-utils libssl-dev pkg-config
python3 -m pip install nox
- name: Python Version
Expand Down
8 changes: 7 additions & 1 deletion relenv/build/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def populate_env(env, dirs):
env["CPPFLAGS"] = " ".join(cpplags).format(prefix=dirs.prefix)
env["CXXFLAGS"] = " ".join(cpplags).format(prefix=dirs.prefix)
env["LD_LIBRARY_PATH"] = "{prefix}/lib"
env["PKG_CONFIG_PATH"] = f"{dirs.prefix}/lib/pkgconfig"


def build_bzip2(env, dirs, logfp):
Expand Down Expand Up @@ -198,6 +199,8 @@ def build_ncurses(env, dirs, logfp):
"--enable-widec",
"--with-normal",
"--disable-stripping",
f"--with-pkg-config={dirs.prefix}/lib/pkgconfig",
"--enable-pc-files",
"--build={}".format(env["RELENV_BUILD"]),
"--host={}".format(env["RELENV_HOST"]),
],
Expand Down Expand Up @@ -230,9 +233,10 @@ def build_readline(env, dirs, logfp):
:param logfp: A handle for the log file
:type logfp: file
"""
env["LDFLAGS"] = f"{env['LDFLAGS']} -ltinfo"
env["LDFLAGS"] = f"{env['LDFLAGS']}"
cmd = [
"./configure",
"--with-curses",
"--prefix={}".format(dirs.prefix),
]
if env["RELENV_HOST"].find("linux") > -1:
Expand Down Expand Up @@ -400,6 +404,7 @@ def build_python(env, dirs, logfp):
"--with-ssl-default-suites=openssl",
"--with-builtin-hashlib-hashes=blake2,md5,sha1,sha2,sha3",
"--with-readline=readline",
"--with-pkg-config=yes",
]

if env["RELENV_HOST_ARCH"] != env["RELENV_BUILD_ARCH"]:
Expand Down Expand Up @@ -612,6 +617,7 @@ def build_python(env, dirs, logfp):
build_func=build_python,
wait_on=[
"openssl",
"openssl-fips-module",
"libxcrypt",
"XZ",
"SQLite",
Expand Down

0 comments on commit 67d7949

Please sign in to comment.