Skip to content

Commit

Permalink
Allow specification of python patch versions in basepython (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Dec 29, 2020
1 parent 6d3f53b commit b24821a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tox_conda/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ class CondaDepOption(DepOption):

def get_py_version(envconfig, action):
# Try to use basepython
match = re.match(r"python(\d)(?:\.(\d))?", envconfig.basepython)
match = re.match(r"python(\d)(?:\.(\d))?(?:\.(\d))?", envconfig.basepython)
if match:
groups = match.groups()
version = groups[0]
if groups[1]:
version += ".{}".format(groups[1])
if groups[2]:
version += ".{}".format(groups[2])

# First fallback
elif envconfig.python_info.version_info:
Expand Down

0 comments on commit b24821a

Please sign in to comment.