Last active
March 2, 2021 11:01
-
-
Save o3bvv/0cac49d3c68597d01625e47c1253883e to your computer and use it in GitHub Desktop.
Installing Python from sources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
CC=x86_64-linux-gnu-gcc | |
CFLAGS=-g -fstack-protector-strong -Wformat -Werror=format-security | |
LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 | |
CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 | |
configure --enable-optimizations --with-ensurepip=install --enable-shared --prefix=/usr/local/ --enable-loadable-sqlite-extensions --with-dbmliborder=bdb:gdbm --with-computed-gotos --with-system-expat --with-system-ffi | |
make # -j 4 | |
make altinstall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sysconfig | |
# list flags used during compilation of Python | |
print(sysconfig.get_config_var('CONFIG_ARGS')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ensure the path '/usr/local/lib' is present in config files | |
# inside the '/etc/ld.so.conf.d' dir. | |
# If no file contain the path, create a file, e.g. 'usr-local.conf', and put a line inside it: | |
/usr/local/lib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment