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
66a48130
Unverified
Commit
66a48130
authored
Aug 24, 2021
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the detection of the system environment with custom installer
parent
c3209550
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
+10
-1
install-poetry.py
+4
-0
poetry/utils/env.py
+6
-1
No files found.
install-poetry.py
View file @
66a48130
...
@@ -528,6 +528,10 @@ class Installer:
...
@@ -528,6 +528,10 @@ class Installer:
virtualenv
.
cli_run
([
str
(
env_path
),
"--clear"
])
virtualenv
.
cli_run
([
str
(
env_path
),
"--clear"
])
# We add a special file so that Poetry can detect
# its own virtual environment
env_path
.
joinpath
(
"poetry_env"
)
.
touch
()
return
env_path
return
env_path
def
make_bin
(
self
,
version
:
str
)
->
None
:
def
make_bin
(
self
,
version
:
str
)
->
None
:
...
...
poetry/utils/env.py
View file @
66a48130
...
@@ -1011,8 +1011,13 @@ class EnvManager:
...
@@ -1011,8 +1011,13 @@ class EnvManager:
"""
"""
prefix
,
base_prefix
=
Path
(
sys
.
prefix
),
Path
(
cls
.
get_base_prefix
())
prefix
,
base_prefix
=
Path
(
sys
.
prefix
),
Path
(
cls
.
get_base_prefix
())
if
not
naive
:
if
not
naive
:
if
prefix
.
joinpath
(
"poetry_env"
)
.
exists
():
return
GenericEnv
(
base_prefix
)
from
poetry.locations
import
data_dir
try
:
try
:
Path
(
__file__
)
.
relative_to
(
prefix
)
prefix
.
relative_to
(
data_dir
()
)
except
ValueError
:
except
ValueError
:
pass
pass
else
:
else
:
...
...
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