simplify lib3to6 code

This commit is contained in:
Manuel Barkhau 2020-10-04 17:12:26 +00:00
parent 803b0bf6a6
commit c3955efcc0

View file

@ -52,27 +52,9 @@ classifiers = [
package_dir = {"": "src"} package_dir = {"": "src"}
is_lib3to6_fix_required = ( if any(arg.startswith("bdist") for arg in sys.argv):
any(arg.startswith("bdist") for arg in sys.argv)
and (
"Programming Language :: Python :: 2.7" in classifiers
or "Programming Language :: Python :: 2" in classifiers
)
)
if is_lib3to6_fix_required:
try:
import lib3to6 import lib3to6
package_dir = lib3to6.fix(package_dir) package_dir = lib3to6.fix(package_dir)
except ImportError:
if sys.version_info < (3, 6):
raise
else:
sys.stderr.write((
"WARNING: Creating non-universal bdist of pycalver, "
"this should only be used for development.\n"
))
setuptools.setup( setuptools.setup(