diff options
author | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2018-04-10 13:45:44 +0200 |
---|---|---|
committer | Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> | 2018-04-12 23:53:52 +0200 |
commit | 922e7039dc04f7b403bf66c8321d89c637c61e87 (patch) | |
tree | a2af57d0f445ac091af4802cead5c93af4f95422 /setup.py | |
parent | Update python requirements in distribution meta (diff) | |
download | ansible-922e7039dc04f7b403bf66c8321d89c637c61e87.tar.xz ansible-922e7039dc04f7b403bf66c8321d89c637c61e87.zip |
Shield setup module from accidental setup exec
This might happen when third-parties like analizers import this
module for testing purposes.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -162,7 +162,8 @@ for extra_requirements_filename in os.listdir(extra_requirements_dir): with open('README.rst', 'r') as readme_file: longdesc = readme_file.read() -setup( + +setup_params = dict( # Use the distutils SDist so that symlinks are not expanded # Use a custom Build for the same reason cmdclass={ @@ -240,3 +241,12 @@ setup( # Installing as zip files would break due to references to __file__ zip_safe=False ) + + +def main(): + """Invoke installation process using setuptools.""" + setup(**setup_params) + + +if __name__ == '__main__': + main() |