Kaydet (Commit) ca946032 authored tarafından Éric Araujo's avatar Éric Araujo

Remove redundant __main__ blocks from packaging modules.

The one interface we commit to maintain is the run module
(a.k.a. the pysetup script).
üst fad46e19
...@@ -674,7 +674,3 @@ def main(): ...@@ -674,7 +674,3 @@ def main():
# program.write_setup_script() # program.write_setup_script()
# packaging.util.cfg_to_args() # packaging.util.cfg_to_args()
program() program()
if __name__ == '__main__':
main()
...@@ -224,6 +224,7 @@ def dependent_dists(dists, dist): ...@@ -224,6 +224,7 @@ def dependent_dists(dists, dist):
def main(): def main():
# XXX move to run._graph
from packaging.database import get_distributions from packaging.database import get_distributions
tempout = StringIO() tempout = StringIO()
try: try:
...@@ -267,7 +268,3 @@ def main(): ...@@ -267,7 +268,3 @@ def main():
else: else:
print('Supported option: -d [filename]') print('Supported option: -d [filename]')
sys.exit(1) sys.exit(1)
if __name__ == '__main__':
main()
...@@ -527,12 +527,3 @@ def install(project): ...@@ -527,12 +527,3 @@ def install(project):
logger.info('%r conflicts with %s', project, ','.join(projects)) logger.info('%r conflicts with %s', project, ','.join(projects))
return True return True
def _main(**attrs):
if 'script_args' not in attrs:
attrs['requirements'] = sys.argv[1]
get_infos(**attrs)
if __name__ == '__main__':
_main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment