Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
97ec4064
Unverified
Commit
97ec4064
authored
Mar 13, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix python restricted dependencies not being checked against virtualenv
parent
0ac244fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
CHANGELOG.md
+2
-1
poetry/installation/installer.py
+1
-1
poetry/utils/venv.py
+16
-0
No files found.
CHANGELOG.md
View file @
97ec4064
...
@@ -13,7 +13,8 @@
...
@@ -13,7 +13,8 @@
### Fixed
### Fixed
-
Fixed handking of post releases.
-
Fixed handling of post releases.
-
Fixed python restricted dependencies not being checked agaisnt virtualenv version.
## [0.4.2] - 2018-03-10
## [0.4.2] - 2018-03-10
...
...
poetry/installation/installer.py
View file @
97ec4064
...
@@ -379,7 +379,7 @@ class Installer:
...
@@ -379,7 +379,7 @@ class Installer:
continue
continue
parser
=
VersionParser
()
parser
=
VersionParser
()
python
=
'.'
.
join
([
str
(
i
)
for
i
in
s
ys
.
version_info
[:
3
]])
python
=
'.'
.
join
([
str
(
i
)
for
i
in
s
elf
.
_io
.
venv
.
version_info
[:
3
]])
if
'python'
in
package
.
requirements
:
if
'python'
in
package
.
requirements
:
python_constraint
=
parser
.
parse_constraints
(
python_constraint
=
parser
.
parse_constraints
(
package
.
requirements
[
'python'
]
package
.
requirements
[
'python'
]
...
...
poetry/utils/venv.py
View file @
97ec4064
...
@@ -24,6 +24,7 @@ class Venv:
...
@@ -24,6 +24,7 @@ class Venv:
def
__init__
(
self
,
venv
=
None
):
def
__init__
(
self
,
venv
=
None
):
self
.
_venv
=
venv
self
.
_venv
=
venv
self
.
_version_info
=
None
@classmethod
@classmethod
def
create
(
cls
)
->
'Venv'
:
def
create
(
cls
)
->
'Venv'
:
...
@@ -89,6 +90,21 @@ class Venv:
...
@@ -89,6 +90,21 @@ class Venv:
"""
"""
return
self
.
_bin
(
'pip'
)
return
self
.
_bin
(
'pip'
)
@property
def
version_info
(
self
):
if
self
.
_version_info
is
not
None
:
return
self
.
_version_info
if
not
self
.
is_venv
():
self
.
_version_info
=
sys
.
version_info
else
:
output
=
self
.
run
(
'python'
,
'--version'
)
version
=
output
.
split
(
' '
)
self
.
_version_info
=
version
[
1
]
.
strip
()
.
split
(
'.'
)
return
self
.
_version_info
def
run
(
self
,
bin
:
str
,
*
args
,
**
kwargs
)
->
str
:
def
run
(
self
,
bin
:
str
,
*
args
,
**
kwargs
)
->
str
:
"""
"""
Run a command inside the virtual env.
Run a command inside the virtual env.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment