summaryrefslogtreecommitdiffstats
path: root/ipapython/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipapython/setup.py')
-rwxr-xr-xipapython/setup.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/ipapython/setup.py b/ipapython/setup.py
index 81e032b23..47acdd6f2 100755
--- a/ipapython/setup.py
+++ b/ipapython/setup.py
@@ -20,22 +20,22 @@
FreeIPA is a server for identity, policy, and audit.
"""
-import os
+from os.path import abspath, dirname
import sys
-# include ../ for ipasetup.py
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+if __name__ == '__main__':
+ # include ../ for ipasetup.py
+ sys.path.append(dirname(dirname(abspath(__file__))))
+ from ipasetup import ipasetup # noqa: E402
-from ipasetup import ipasetup # noqa: E402
-
-ipasetup(
- name="ipapython",
- doc=__doc__,
- package_dir={'ipapython': ''},
- packages=[
- "ipapython",
- "ipapython.dnssec",
- "ipapython.secrets",
- "ipapython.install"
- ],
-)
+ ipasetup(
+ name="ipapython",
+ doc=__doc__,
+ package_dir={'ipapython': ''},
+ packages=[
+ "ipapython",
+ "ipapython.dnssec",
+ "ipapython.secrets",
+ "ipapython.install"
+ ],
+ )