]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
python: allow calling from other directories
authorRick van Rein <rick@openfortress.nl>
Fri, 7 Aug 2020 19:25:17 +0000 (21:25 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Fri, 7 Aug 2020 19:37:06 +0000 (21:37 +0200)
python/setup.py.in

index a0c7156aee625e7598ef93f97ff1a42ae60fa153..a5e69c8a3a9fc1794d165f1e000203b52f6b6a66 100644 (file)
@@ -1,5 +1,8 @@
 import setuptools
 
+from os import path
+here = path.dirname (path.realpath (__file__))
+
 setuptools.setup(
     name='libknot',
     version='@PACKAGE_VERSION@',
@@ -9,6 +12,9 @@ setuptools.setup(
     url='https://gitlab.nic.cz/knot/knot-dns',
     license='GPL-3.0',
     packages=['libknot'],
+    package_dir = {
+        'libknot': path.join (here, 'libknot'),
+    },
     classifiers=[ # See https://pypi.org/classifiers
         'Development Status :: 5 - Production/Stable',
         'Intended Audience :: Developers',