summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-09 18:03:30 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-09 18:19:35 -0500
commit3d06eccaf2ceca30befa28389e559a2d43eb57b7 (patch)
treef06f3ced09ac3f7979eae0f7a9ed651392ff4b6c /sys-fs/cryptsetup/files
parentrev bump to make automagic dep on media-libs/gd a user knob (bug #567852) (diff)
downloadgentoo-3d06eccaf2ceca30befa28389e559a2d43eb57b7.tar.gz
gentoo-3d06eccaf2ceca30befa28389e559a2d43eb57b7.tar.bz2
gentoo-3d06eccaf2ceca30befa28389e559a2d43eb57b7.zip
sys-fs/cryptsetup: add multiple python version support #567378
Diffstat (limited to 'sys-fs/cryptsetup/files')
-rw-r--r--sys-fs/cryptsetup/files/setup-1.7.0.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys-fs/cryptsetup/files/setup-1.7.0.py b/sys-fs/cryptsetup/files/setup-1.7.0.py
new file mode 100644
index 000000000000..0da063c0b1c8
--- /dev/null
+++ b/sys-fs/cryptsetup/files/setup-1.7.0.py
@@ -0,0 +1,21 @@
+import os
+from distutils.core import setup, Extension
+
+top_srcdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+
+def get_ver():
+ with open(os.path.join(top_srcdir, 'configure')) as f:
+ for line in f:
+ if line.startswith('PACKAGE_VERSION='):
+ return line.split('=')[1].replace("'", '').strip()
+
+module = Extension('pycryptsetup',
+ include_dirs=[os.path.join(top_srcdir, 'lib')],
+ extra_compile_args=['-include', os.path.join(top_srcdir, 'config.h')],
+ library_dirs=[os.path.join(top_srcdir, 'lib', '.libs')],
+ libraries=['cryptsetup'],
+ sources=['pycryptsetup.c'])
+
+setup(name='pycryptsetup',
+ version=get_ver(),
+ ext_modules=[module])