summaryrefslogtreecommitdiffstats
path: root/ipaplatform/setup.py
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2016-10-24 14:56:58 +0200
committerMartin Basti <mbasti@redhat.com>2016-10-25 18:11:31 +0200
commit91920e7cb48cbf143ae281c9c073df14b2c2dddf (patch)
tree69c1f0e8996d5036df289e5e3401129808890895 /ipaplatform/setup.py
parent9b0b97073304ba6bfdd6292b07533ab3e7fe8bcb (diff)
downloadfreeipa-91920e7cb48cbf143ae281c9c073df14b2c2dddf.tar.gz
freeipa-91920e7cb48cbf143ae281c9c073df14b2c2dddf.tar.xz
freeipa-91920e7cb48cbf143ae281c9c073df14b2c2dddf.zip
Add __name__ == __main__ guards to setup.pys
Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
Diffstat (limited to 'ipaplatform/setup.py')
-rw-r--r--ipaplatform/setup.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/ipaplatform/setup.py b/ipaplatform/setup.py
index 8b2d75d87..82499da21 100644
--- a/ipaplatform/setup.py
+++ b/ipaplatform/setup.py
@@ -20,23 +20,23 @@
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="ipaplatform",
- doc=__doc__,
- package_dir={'ipaplatform': ''},
- packages=[
- "ipaplatform",
- "ipaplatform.base",
- "ipaplatform.fedora",
- "ipaplatform.redhat",
- "ipaplatform.rhel"
- ],
-)
+ ipasetup(
+ name="ipaplatform",
+ doc=__doc__,
+ package_dir={'ipaplatform': ''},
+ packages=[
+ "ipaplatform",
+ "ipaplatform.base",
+ "ipaplatform.fedora",
+ "ipaplatform.redhat",
+ "ipaplatform.rhel"
+ ],
+ )