comparison setup.py @ 588:79d1e2399af6

Style
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 09 Jan 2022 13:51:09 +0100
parents eac8e2d3933c
children 87db5a732797
comparison
equal deleted inserted replaced
587:eac8e2d3933c 588:79d1e2399af6
72 try: 72 try:
73 pure_only_idx = sys.argv.index("--pure-only") 73 pure_only_idx = sys.argv.index("--pure-only")
74 except ValueError: 74 except ValueError:
75 pure_only_idx = None 75 pure_only_idx = None
76 else: 76 else:
77 del sys.argv[pure_only_idx] 77 del sys.argv[pure_only_idx]
78 78
79 79
80 # 80 #
81 # Otherwise some cached package_data would be used. 81 # Otherwise some cached package_data would be used.
82 # But our package data differs between "standard" builds and 82 # But our package data differs between "standard" builds and
84 # 84 #
85 if os.path.isdir(PROJECT_NAME + ".egg-info"): 85 if os.path.isdir(PROJECT_NAME + ".egg-info"):
86 print("removing `%s.egg-info'" % (PROJECT_NAME,)) 86 print("removing `%s.egg-info'" % (PROJECT_NAME,))
87 shutil.rmtree(PROJECT_NAME + ".egg-info") 87 shutil.rmtree(PROJECT_NAME + ".egg-info")
88 88
89 if pure_only_idx is None: 89 if pure_only_idx is None:
90 if wcp_idx is None: 90 if wcp_idx is None:
91 # 91 #
92 # Handle the optinal C-extension for Python3.7+ and CPython only. 92 # Handle the optinal C-extension for Python3.7+ and CPython only.
93 # PyPy does not need this. 93 # PyPy does not need this.
94 # 94 #
95 95
96 # The C-extension uses multi-phase module initialization (PEP 489, PY 3.5+) 96 #
97 # The C-extension uses multi-phase module initialization
98 # (PEP 489) which is PY 3.5+.
99 #
97 if (platform.python_implementation() == "CPython" 100 if (platform.python_implementation() == "CPython"
98 and (sys.version_info[0] > 3 101 and (sys.version_info[0] > 3
99 or (sys.version_info[0] == 3 and sys.version_info[1] >= 5))): 102 or (sys.version_info[0] == 3 and sys.version_info[1] >= 5))):
100 103
101 # The stable API for Python 3.7+ is used 104 # The stable API for Python 3.7+ is used