mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Shield setup module from accidental setup exec
This might happen when third-parties like analizers import this module for testing purposes.
This commit is contained in:
parent
75092c9f29
commit
922e7039dc
1 changed files with 11 additions and 1 deletions
12
setup.py
12
setup.py
|
@ -162,7 +162,8 @@ for extra_requirements_filename in os.listdir(extra_requirements_dir):
|
||||||
with open('README.rst', 'r') as readme_file:
|
with open('README.rst', 'r') as readme_file:
|
||||||
longdesc = readme_file.read()
|
longdesc = readme_file.read()
|
||||||
|
|
||||||
setup(
|
|
||||||
|
setup_params = dict(
|
||||||
# Use the distutils SDist so that symlinks are not expanded
|
# Use the distutils SDist so that symlinks are not expanded
|
||||||
# Use a custom Build for the same reason
|
# Use a custom Build for the same reason
|
||||||
cmdclass={
|
cmdclass={
|
||||||
|
@ -240,3 +241,12 @@ setup(
|
||||||
# Installing as zip files would break due to references to __file__
|
# Installing as zip files would break due to references to __file__
|
||||||
zip_safe=False
|
zip_safe=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Invoke installation process using setuptools."""
|
||||||
|
setup(**setup_params)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue