]> git.ipfire.org Git - pakfire.git/commitdiff
macros: Add python variables.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Oct 2012 20:07:24 +0000 (22:07 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Oct 2012 20:07:24 +0000 (22:07 +0200)
macros/python.macro [new file with mode: 0644]

diff --git a/macros/python.macro b/macros/python.macro
new file mode 100644 (file)
index 0000000..1b417f2
--- /dev/null
@@ -0,0 +1,15 @@
+# A bunch of predefined things for Python.
+
+# Python 3 constants.
+python3 = /usr/bin/python3
+
+python3_sitearch = %(%{python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
+python3_sitelib  = %(%{python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+python3_version  = %(%{python3} -c "import sys; sys.stdout.write(sys.version[:3])")
+
+# Python 2 constants.
+python = /usr/bin/python2
+
+python_sitearch = %(%{python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
+python_sitelib  = %(%{python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
+python_version  = %(%{python} -c "import sys; sys.stdout.write(sys.version[:3])")