Libsigrokdecode/Python

From sigrok
Jump to navigation Jump to search

This is a small overview of Python versions on different OSes and how they behave with respect to pkg-config integration, python3* file name, python3*-config filename and output, and on on.

Debian GNU/Linux unstable (01/2014)

$ echo $PKG_CONFIG_PATH

$ python3 --version
Python 3.3.3
$ python3m --version
Python 3.3.3
$ python3.3 --version
Python 3.3.3
$ python3.3m --version
Python 3.3.3
$ python3-config --cflags
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m  -Wno-unused-result \
-g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -DNDEBUG \
-g -fwrapv -O3 -Wall -Wstrict-prototypes
$ python3-config --includes
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m
$ python3-config --libs
-lpthread -ldl  -lutil -lm  -lpython3.3m
$ python3-config --ldflags
-L/usr/lib/python3.3/config-3.3m-x86_64-linux-gnu -L/usr/lib -lpthread -ldl  -lutil -lm  \
-lpython3.3m -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
$ python3.3-config --cflags
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m  -Wno-unused-result \
-g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -DNDEBUG \
-g -fwrapv -O3 -Wall -Wstrict-prototypes
$ python3.3-config --includes
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m
$ python3.3-config --libs
-lpthread -ldl  -lutil -lm  -lpython3.3m
$ python3.3-config --ldflags
-L/usr/lib/python3.3/config-3.3m-x86_64-linux-gnu -L/usr/lib -lpthread -ldl  -lutil -lm  \
-lpython3.3m -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
$ python3.3m-config --cflags
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m  -Wno-unused-result \
-g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security  -DNDEBUG \
-g -fwrapv -O3 -Wall -Wstrict-prototypes
$ python3.3m-config --includes
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m
$ python3.3m-config --libs
-lpthread -ldl  -lutil -lm  -lpython3.3m
$ python3.3m-config --ldflags
-L/usr/lib/python3.3/config-3.3m-x86_64-linux-gnu -L/usr/lib -lpthread -ldl  -lutil -lm  \
-lpython3.3m -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
$ pkg-config --cflags python3
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m
$ pkg-config --cflags python-3.3
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m
$ pkg-config --cflags python-3.3m
-I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m
$ pkg-config --libs python3
-lpython3.3m
$ pkg-config --libs python3m
Package python3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3m' found
$ pkg-config --libs --static python3
-lpthread -ldl -lutil -lpython3.3m
$ pkg-config --libs --static python3m
Package python3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3m' found
$ pkg-config --libs python-3.3
-lpython3.3m
$ pkg-config --libs python-3.3m
-lpython3.3m
$ pkg-config --libs --static python-3.3
-lpthread -ldl -lutil -lpython3.3m
$ pkg-config --libs --static python-3.3m
-lpthread -ldl -lutil -lpython3.3m

FreeBSD 9.2

$ python3 --version
python3: not found
$ python3m --version
python3m: not found
$ python3.3 --version
Python 3.3.3
$ python3.3m --version
Python 3.3.3
$ python3-config --cflags
python3-config: not found
$ python3-config --includes
python3-config: not found
$ python3-config --libs
python3-config: not found
$ python3-config --ldflags
python3-config: not found
$ python3.3-config --cflags
-I/usr/local/include/python3.3m -I/usr/local/include/python3.3m -O2 -pipe -fno-strict-aliasing
$ python3.3-config --includes
-I/usr/local/include/python3.3m -I/usr/local/include/python3.3m
$ python3.3-config --libs
-lintl -lutil -lm -lpython3.3m
$ python3.3-config --ldflags
-L/usr/local/lib/python3.3/config-3.3m -lintl -lutil -lm -lpython3.3m -Wl,--export-dynamic
$ python3.3m-config --cflags
-I/usr/local/include/python3.3m -I/usr/local/include/python3.3m -O2 -pipe -fno-strict-aliasing
$ python3.3m-config --includes
-I/usr/local/include/python3.3m -I/usr/local/include/python3.3m
$ python3.3m-config --libs
-lintl -lutil -lm -lpython3.3m
$ python3.3m-config --ldflags
-L/usr/local/lib/python3.3/config-3.3m -lintl -lutil -lm -lpython3.3m -Wl,--export-dynamic
$ pkg-config --cflags python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python3', required by 'world', not found
$ pkg-config --cflags python-3.3
-I/usr/local/include/python3.3m  
$ pkg-config --cflags python-3.3m
Package python-3.3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.3m.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python-3.3m', required by 'world', not found
$ pkg-config --libs python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python3', required by 'world', not found
$ pkg-config --libs python3m
Package python3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3m.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python3m', required by 'world', not found
$ pkg-config --libs --static python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python3', required by 'world', not found
$ pkg-config --libs --static python3m
Package python3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3m.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python3m', required by 'world', not found
$ pkg-config --libs python-3.3
-L/usr/local/lib -lpython3.3m  
$ pkg-config --libs python-3.3m
Package python-3.3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.3m.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python-3.3m', required by 'world', not found
$ pkg-config --libs --static python-3.3
-L/usr/local/lib -lpython3.3m -lintl  -lutil  
$ pkg-config --libs --static python-3.3m
Package python-3.3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.3m.pc'
to the PKG_CONFIG_PATH environment variable
Package 'python-3.3m', required by 'world', not found 

OpenBSD 5.3

$ echo $PKG_CONFIG_PATH

$ python3 --version
python3: not found
$ python3m --version
python3m: not found
$ python3.2 --version
Python 3.2.3
$ python3.2m --version
Python 3.2.3
$ python3-config --cflags
python3-config: not found
$ python3-config --includes
python3-config: not found
$ python3-config --libs
python3-config: not found
$ python3-config --ldflags
python3-config: not found
$ python3.2-config --cflags
-I/usr/local/include/python3.2m -I/usr/local/include/python3.2m \
-fno-strict-aliasing -DNDEBUG -O2 -pipe -fPIC -O2 -pipe
$ python3.2-config --includes
-I/usr/local/include/python3.2m -I/usr/local/include/python3.2m
$ python3.2-config --libs
-pthread -lutil -lm -lpython3.2m
$ python3.2-config --ldflags
-pthread -lutil -lm -lpython3.2m -Wl,--export-dynamic
$ python3.2m-config --cflags
-I/usr/local/include/python3.2m -I/usr/local/include/python3.2m \
-fno-strict-aliasing -DNDEBUG -O2 -pipe -fPIC -O2 -pipe
$ python3.2m-config --includes
-I/usr/local/include/python3.2m -I/usr/local/include/python3.2m
$ python3.2m-config --libs
-pthread -lutil -lm -lpython3.2m
$ python3.2m-config --ldflags
-pthread -lutil -lm -lpython3.2m -Wl,--export-dynamic
$ pkg-config --cflags python3
-I/usr/local/include/python3.2m
$ pkg-config --cflags python-3.2
-I/usr/local/include/python3.2m
$ pkg-config --cflags python-3.2m
-I/usr/local/include/python3.2m
$ pkg-config --libs python3
-L/usr/local/lib -lpython3.2m
$ pkg-config --libs python3m
Package python3m was not found in the pkg-config search path
$ pkg-config --libs --static python3
-L/usr/local/lib -pthread -lpython3.2m -lutil
$ pkg-config --libs --static python3m
Package python3m was not found in the pkg-config search path
$ pkg-config --libs python-3.2
-L/usr/local/lib -lpython3.2m
$ pkg-config --libs python-3.2m
-L/usr/local/lib -lpython3.2m
$ pkg-config --libs --static python-3.2
-L/usr/local/lib -pthread -lpython3.2m -lutil
$ pkg-config --libs --static python-3.2m
-L/usr/local/lib -pthread -lpython3.2m -lutil

NetBSD 6.1.2

$ python3 --version
python3: not found
$ python3m --version
python3m: not found
$ python3.2 --version
Python 3.2.3
$ python3.2m --version
python3.2m: not found
$ python3-config --cflags
python3-config: not found
$ python3-config --includes
python3-config: not found
$ python3-config --libs
python3-config: not found
$ python3-config --ldflags
python3-config: not found
$ python3.2-config --cflags
-I/usr/pkg/include/python3.2 -I/usr/pkg/include/python3.2 -DNDEBUG -O2 \
-I/usr/include -I/usr/pkg/include -O2 -I/usr/include -I/usr/pkg/include
$ python3.2-config --includes
-I/usr/pkg/include/python3.2 -I/usr/pkg/include/python3.2
$ python3.2-config --libs
-lintl -lpthread -lutil -lm -lpython3.2
$ python3.2-config --ldflags
-lintl -lpthread -lutil -lm -lpython3.2 -Wl,--export-dynamic
$ python3.2m-config --cflags
python3.2m-config: not found
$ python3.2m-config --includes
python3.2m-config: not found
$ python3.2m-config --libs
python3.2m-config: not found
$ python3.2m-config --ldflags
python3.2m-config: not found
$ pkg-config --cflags python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3' found
$ pkg-config --cflags python-3.2
-I/usr/pkg/include/python3.2
$ pkg-config --cflags python-3.2m
Package python-3.2m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.2m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-3.2m' found
$ pkg-config --libs python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3' found
$ pkg-config --libs python3m
Package python3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3m' found
$ pkg-config --libs --static python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3' found
$ pkg-config --libs --static python3m
Package python3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3m' found
$ pkg-config --libs python-3.2
-L/usr/pkg/lib -lpython3.2
$ pkg-config --libs python-3.2m
Package python-3.2m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.2m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-3.2m' found
$ pkg-config --libs --static python-3.2
-L/usr/pkg/lib -lintl -lpthread -lutil -lpython3.2
$ pkg-config --libs --static python-3.2m
Package python-3.2m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.2m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-3.2m' found

Mac OS X 10.6.6 (MacPorts)

$ echo $PKG_CONFIG_PATH (was set manually by the user)
/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/pkgconfig
$ ls -l $PKG_CONFIG_PATH
-rw-r--r--  1 root  wheel  351 Nov 24 01:25 python-3.3.pc
lrwxr-xr-x  1 root  wheel   13 Nov 24 01:25 python-3.3m.pc -> python-3.3.pc
lrwxr-xr-x  1 root  wheel   13 Nov 24 01:25 python3.pc -> python-3.3.pc
$ python3 --version
python3: command not found
$ python3m --version
python3m: command not found
$ python3.3 --version
Python 3.3.3
$ python3.3m --version
python3.3m: command not found
$ python3-config --cflags
python3-config: command not found
$ python3-config --includes
python3-config: command not found
$ python3-config --libs
python3-config: command not found
$ python3-config --ldflags
python3-config: command not found
$ python3.3-config --cflags
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m \
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m \
-fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes \
-pipe -Os -arch x86_64
$ python3.3-config --includes
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m \
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m
$ python3.3-config --libs
-lintl -ldl -framework CoreFoundation -lpython3.3m
$ python3.3-config --ldflags
-L/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/config-3.3m \
-lintl -ldl -framework CoreFoundation -lpython3.3m
$ python3.3m-config --cflags
TODO
$ python3.3m-config --includes
TODO
$ python3.3m-config --libs
TODO
$ python3.3m-config --ldflags
TODO
$ pkg-config --cflags python3
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m
$ pkg-config --cflags python-3.3
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m
$ pkg-config --cflags python-3.3m
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m
$ pkg-config --libs python3
-L/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib -lpython3.3m
$ pkg-config --libs python3m
Package python3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3m' found
$ pkg-config --libs --static python3
-framework CoreFoundation -L/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib \
-lintl -ldl -lpython3.3m
$ pkg-config --libs --static python3m
Package python3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3m' found
$ pkg-config --libs python-3.3
-L/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib -lpython3.3m
$ pkg-config --libs python-3.3m
-L/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib -lpython3.3m
$ pkg-config --libs --static python-3.3
-framework CoreFoundation -L/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib \
-lintl -ldl -lpython3.3m
$ pkg-config --libs --static python-3.3m
-framework CoreFoundation -L/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib \
-lintl -ldl -lpython3.3m

Mac OS X 10.6.8 (MacPorts)

$ echo $PKG_CONFIG_PATH
TODO
$ python3 --version
Python 3.3.2
$ python3m --version
-bash: python3m: command not found
$ python3.3 --version
Python 3.3.2
$ python3.3m --version
-bash: python3.3m: command not found
$ python3-config --cflags
-bash: python3-config: command not found
$ python3-config --includes
-bash: python3-config: command not found
$ python3-config --libs
-bash: python3-config: command not found
$ python3-config --ldflags
-bash: python3-config: command not found
$ python3.3-config --cflags
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m \
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m \
-fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall \
-Wstrict-prototypes -pipe -O2 -arch x86_64
$ python3.3-config --includes
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m \
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m
$ python3.3-config --libs
-lintl -ldl -framework CoreFoundation -lpython3.3m
$ python3.3-config --ldflags
-L/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/config-3.3m \
-lintl -ldl -framework CoreFoundation -lpython3.3m
$ python3.3m-config --cflags
-bash: python3.3m-config: command not found
$ python3.3m-config --includes
-bash: python3.3m-config: command not found
$ python3.3m-config --libs
-bash: python3.3m-config: command not found
$ python3.3m-config --ldflags
-bash: python3.3m-config: command not found
$ pkg-config --cflags python3
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3' found
$ pkg-config --cflags python-3.3
Package python-3.3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-3.3' found
$ pkg-config --cflags python-3.3m
Package python-3.3m was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.3m.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-3.3m' found

Windows / MinGW