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
a787a95f
Unverified
Commit
a787a95f
authored
Oct 18, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix an error in install for applications
parent
7959d68f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
CHANGELOG.md
+1
-0
poetry/console/commands/install.py
+9
-2
poetry/masonry/utils/module.py
+8
-1
No files found.
CHANGELOG.md
View file @
a787a95f
...
...
@@ -7,6 +7,7 @@
-
Fixed the
`--no-dev`
option in
`install`
not working properly.
-
Fixed prereleases being selected even if another constraint conflicted with them.
-
Fixed an error when installing current package in development mode if the generated
`setup.py`
had special characters.
-
Fixed an error in
`install`
for applications not following a known structure.
## [0.12.2] - 2018-10-17
...
...
poetry/console/commands/install.py
View file @
a787a95f
...
...
@@ -29,6 +29,7 @@ exist it will look for <comment>pyproject.toml</> and do the same.
from
poetry.installation
import
Installer
from
poetry.io
import
NullIO
from
poetry.masonry.builders
import
SdistBuilder
from
poetry.masonry.utils.module
import
ModuleOrPackageNotFound
from
poetry.utils._compat
import
decode
from
poetry.utils.env
import
NullEnv
...
...
@@ -58,6 +59,14 @@ exist it will look for <comment>pyproject.toml</> and do the same.
if
return_code
!=
0
:
return
return_code
try
:
builder
=
SdistBuilder
(
self
.
poetry
,
NullEnv
(),
NullIO
())
except
ModuleOrPackageNotFound
:
# This is likely due to the fact that the project is an application
# not following the structure expected by Poetry
# If this is a true error it will be picked up later by build anyway.
return
0
self
.
line
(
" - Installing <info>{}</info> (<comment>{}</comment>)"
.
format
(
self
.
poetry
.
package
.
pretty_name
,
self
.
poetry
.
package
.
pretty_version
...
...
@@ -73,8 +82,6 @@ exist it will look for <comment>pyproject.toml</> and do the same.
if
has_setup
:
self
.
line
(
"<warning>A setup.py file already exists. Using it.</warning>"
)
else
:
builder
=
SdistBuilder
(
self
.
poetry
,
NullEnv
(),
NullIO
())
with
setup
.
open
(
"w"
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
decode
(
builder
.
build_setup
()))
...
...
poetry/masonry/utils/module.py
View file @
a787a95f
...
...
@@ -5,6 +5,11 @@ from .include import Include
from
.package_include
import
PackageInclude
class
ModuleOrPackageNotFound
(
ValueError
):
pass
class
Module
:
def
__init__
(
self
,
name
,
directory
=
"."
,
packages
=
None
,
includes
=
None
):
self
.
_name
=
module_name
(
name
)
...
...
@@ -48,7 +53,9 @@ class Module:
}
]
else
:
raise
ValueError
(
"No file/folder found for package {}"
.
format
(
name
))
raise
ModuleOrPackageNotFound
(
"No file/folder found for package {}"
.
format
(
name
)
)
for
package
in
packages
:
self
.
_includes
.
append
(
...
...
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