diff options
| author | Christian Heimes <cheimes@redhat.com> | 2016-10-24 14:56:58 +0200 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2016-10-25 18:11:31 +0200 |
| commit | 91920e7cb48cbf143ae281c9c073df14b2c2dddf (patch) | |
| tree | 69c1f0e8996d5036df289e5e3401129808890895 /ipapython/setup.py | |
| parent | 9b0b97073304ba6bfdd6292b07533ab3e7fe8bcb (diff) | |
| download | freeipa-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 'ipapython/setup.py')
| -rwxr-xr-x | ipapython/setup.py | 32 |
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" + ], + ) |
