summaryrefslogtreecommitdiff
path: root/sys-fs/cryptsetup/files/setup-1.7.0.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-06-02 19:26:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-06-02 19:26:43 +0100
commite53855fcc49e631247cd5e47812f2ffda7a96cea (patch)
treefa194a5ac12ed08e14d44419e39cd08b14d3973c /sys-fs/cryptsetup/files/setup-1.7.0.py
parent93d8c5c6ba3eec3fdc777b7fee97ae92b24cdd54 (diff)
sys-fs/cryptsetup : import from portage tree
Diffstat (limited to 'sys-fs/cryptsetup/files/setup-1.7.0.py')
-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 00000000..0da063c0
--- /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])