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
a3b648ba
Unverified
Commit
a3b648ba
authored
Jun 05, 2020
by
Sébastien Eustace
Committed by
GitHub
Jun 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix root package and directory dependency editable installation (#2505)
parent
6ea3849b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
poetry/installation/pip_installer.py
+1
-2
poetry/masonry/builders/editable.py
+1
-1
tests/masonry/builders/test_editable.py
+3
-1
No files found.
poetry/installation/pip_installer.py
View file @
a3b648ba
...
@@ -181,7 +181,6 @@ class PipInstaller(BaseInstaller):
...
@@ -181,7 +181,6 @@ class PipInstaller(BaseInstaller):
def
install_directory
(
self
,
package
):
def
install_directory
(
self
,
package
):
from
poetry.factory
import
Factory
from
poetry.factory
import
Factory
from
poetry.utils.env
import
NullEnv
from
poetry.utils.toml_file
import
TomlFile
from
poetry.utils.toml_file
import
TomlFile
if
package
.
root_dir
:
if
package
.
root_dir
:
...
@@ -215,7 +214,7 @@ class PipInstaller(BaseInstaller):
...
@@ -215,7 +214,7 @@ class PipInstaller(BaseInstaller):
from
poetry.masonry.builders.editable
import
EditableBuilder
from
poetry.masonry.builders.editable
import
EditableBuilder
builder
=
EditableBuilder
(
builder
=
EditableBuilder
(
Factory
()
.
create_poetry
(
pyproject
.
parent
),
NullEnv
()
,
NullIO
()
Factory
()
.
create_poetry
(
pyproject
.
parent
),
self
.
_env
,
NullIO
()
)
)
builder
.
build
()
builder
.
build
()
...
...
poetry/masonry/builders/editable.py
View file @
a3b648ba
...
@@ -38,7 +38,7 @@ class EditableBuilder(Builder):
...
@@ -38,7 +38,7 @@ class EditableBuilder(Builder):
str
(
self
.
_poetry
.
file
),
str
(
self
.
_poetry
.
file
.
with_suffix
(
".tmp"
))
str
(
self
.
_poetry
.
file
),
str
(
self
.
_poetry
.
file
.
with_suffix
(
".tmp"
))
)
)
try
:
try
:
self
.
_env
.
run_pip
(
"install"
,
"-e"
,
str
(
self
.
_path
))
self
.
_env
.
run_pip
(
"install"
,
"-
-no-deps"
,
"-
e"
,
str
(
self
.
_path
))
finally
:
finally
:
shutil
.
move
(
shutil
.
move
(
str
(
self
.
_poetry
.
file
.
with_suffix
(
".tmp"
)),
str
(
self
.
_poetry
.
file
.
with_suffix
(
".tmp"
)),
...
...
tests/masonry/builders/test_editable.py
View file @
a3b648ba
...
@@ -38,7 +38,9 @@ def test_build_should_temporarily_remove_the_pyproject_file(tmp_dir, mocker):
...
@@ -38,7 +38,9 @@ def test_build_should_temporarily_remove_the_pyproject_file(tmp_dir, mocker):
builder
=
EditableBuilder
(
Factory
()
.
create_poetry
(
module_path
),
env
,
NullIO
())
builder
=
EditableBuilder
(
Factory
()
.
create_poetry
(
module_path
),
env
,
NullIO
())
builder
.
build
()
builder
.
build
()
expected
=
[[
sys
.
executable
,
"-m"
,
"pip"
,
"install"
,
"-e"
,
str
(
module_path
)]]
expected
=
[
[
sys
.
executable
,
"-m"
,
"pip"
,
"install"
,
"--no-deps"
,
"-e"
,
str
(
module_path
)]
]
assert
expected
==
env
.
executed
assert
expected
==
env
.
executed
assert
2
==
move
.
call_count
assert
2
==
move
.
call_count
...
...
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