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
aba6d170
Unverified
Commit
aba6d170
authored
May 21, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a new settings.virtualenvs.in-project setting
parent
d99cb602
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletions
+13
-1
CHANGELOG.md
+1
-0
poetry/console/commands/config.py
+1
-0
poetry/utils/venv.py
+11
-1
No files found.
CHANGELOG.md
View file @
aba6d170
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
-
Added a new, more efficient dependency resolver.
-
Added a new, more efficient dependency resolver.
-
Added a new
`init`
command to generate a
`pyproject.toml`
file in existing projects.
-
Added a new
`init`
command to generate a
`pyproject.toml`
file in existing projects.
-
Added a new setting
`settings.virtualenvs.in-project`
to make
`poetry`
create the project's virtualenv inside the project's directory.
-
Added the
`--extras`
and
`--python`
options to
`debug:resolve`
to help debug dependency resolution.
-
Added the
`--extras`
and
`--python`
options to
`debug:resolve`
to help debug dependency resolution.
### Changed
### Changed
...
...
poetry/console/commands/config.py
View file @
aba6d170
...
@@ -101,6 +101,7 @@ To remove a repository (repo is a short alias for repositories):
...
@@ -101,6 +101,7 @@ To remove a repository (repo is a short alias for repositories):
unique_config_values
=
{
unique_config_values
=
{
'settings.virtualenvs.create'
:
(
boolean_validator
,
boolean_normalizer
),
'settings.virtualenvs.create'
:
(
boolean_validator
,
boolean_normalizer
),
'settings.virtualenvs.in-project'
:
(
boolean_validator
,
boolean_normalizer
),
'settings.pypi.fallback'
:
(
boolean_validator
,
boolean_normalizer
),
'settings.pypi.fallback'
:
(
boolean_validator
,
boolean_normalizer
),
}
}
...
...
poetry/utils/venv.py
View file @
aba6d170
...
@@ -60,9 +60,15 @@ class Venv(object):
...
@@ -60,9 +60,15 @@ class Venv(object):
config
=
Config
.
create
(
'config.toml'
)
config
=
Config
.
create
(
'config.toml'
)
create_venv
=
config
.
setting
(
'settings.virtualenvs.create'
)
create_venv
=
config
.
setting
(
'settings.virtualenvs.create'
)
root_venv
=
config
.
setting
(
'settings.virtualenvs.in-project'
)
venv_path
=
config
.
setting
(
'settings.virtualenvs.path'
)
venv_path
=
config
.
setting
(
'settings.virtualenvs.path'
)
if
venv_path
is
None
:
if
root_venv
:
if
not
cwd
:
raise
RuntimeError
(
'Unbale to determine the project
\'
s directory'
)
venv_path
=
(
cwd
/
'.venv'
)
elif
venv_path
is
None
:
venv_path
=
Path
(
CACHE_DIR
)
/
'virtualenvs'
venv_path
=
Path
(
CACHE_DIR
)
/
'virtualenvs'
else
:
else
:
venv_path
=
Path
(
venv_path
)
venv_path
=
Path
(
venv_path
)
...
@@ -74,7 +80,11 @@ class Venv(object):
...
@@ -74,7 +80,11 @@ class Venv(object):
name
,
'.'
.
join
([
str
(
v
)
for
v
in
sys
.
version_info
[:
2
]])
name
,
'.'
.
join
([
str
(
v
)
for
v
in
sys
.
version_info
[:
2
]])
)
)
if
root_venv
:
venv
=
venv_path
else
:
venv
=
venv_path
/
name
venv
=
venv_path
/
name
if
not
venv
.
exists
():
if
not
venv
.
exists
():
if
create_venv
is
False
:
if
create_venv
is
False
:
io
.
writeln
(
io
.
writeln
(
...
...
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