mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2026-02-02 07:35:10 +01:00
simplify lib3to6 code
This commit is contained in:
parent
803b0bf6a6
commit
c3955efcc0
1 changed files with 3 additions and 21 deletions
20
setup.py
20
setup.py
|
|
@ -52,27 +52,9 @@ classifiers = [
|
|||
package_dir = {"": "src"}
|
||||
|
||||
|
||||
is_lib3to6_fix_required = (
|
||||
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:
|
||||
if any(arg.startswith("bdist") for arg in sys.argv):
|
||||
import lib3to6
|
||||
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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue