mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 14:50:16 +00:00
handle python major and minor version correctly in create_pipfile
fix #4379 previous code cannot handle 3.XX
This commit is contained in:
committed by
frostming
parent
0394f4de8b
commit
6fcecbcc1b
+2
-2
@@ -756,8 +756,8 @@ class Project(object):
|
||||
else:
|
||||
required_python = self.which("python")
|
||||
version = python_version(required_python) or PIPENV_DEFAULT_PYTHON_VERSION
|
||||
if version and len(version) >= 3:
|
||||
data[u"requires"] = {"python_version": version[: len("2.7")]}
|
||||
if version and len(version.split(".")) > 2:
|
||||
data[u"requires"] = {"python_version": ".".join(version.split(".")[:2])}
|
||||
self.write_toml(data)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user