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
9cf87a28
Unverified
Commit
9cf87a28
authored
Apr 30, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer path to file for file dependencies
parent
2d567b68
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
+32
-3
poetry/json/schemas/poetry-schema.json
+27
-2
poetry/packages/package.py
+4
-0
tests/fixtures/sample_project/pyproject.toml
+1
-1
tests/repositories/fixtures/pypi.org/json/requests.json
+0
-0
No files found.
poetry/json/schemas/poetry-schema.json
View file @
9cf87a28
...
@@ -78,6 +78,9 @@
...
@@ -78,6 +78,9 @@
},
},
{
{
"$ref"
:
"#/definitions/file-dependency"
"$ref"
:
"#/definitions/file-dependency"
},
{
"$ref"
:
"#/definitions/path-dependency"
}
}
]
]
}
}
...
@@ -252,9 +255,31 @@
...
@@ -252,9 +255,31 @@
"type"
:
"string"
,
"type"
:
"string"
,
"description"
:
"The python versions for which the dependency should be installed."
"description"
:
"The python versions for which the dependency should be installed."
},
},
"
allows-prereleases
"
:
{
"
optional
"
:
{
"type"
:
"boolean"
,
"type"
:
"boolean"
,
"description"
:
"Whether the dependency allows prereleases or not."
"description"
:
"Whether the dependency is optional or not."
},
"extras"
:
{
"type"
:
"array"
,
"description"
:
"The required extras for this dependency."
,
"items"
:
{
"type"
:
"string"
}
}
}
},
"path-dependency"
:
{
"type"
:
"object"
,
"required"
:
[
"path"
],
"additionalProperties"
:
false
,
"properties"
:
{
"path"
:
{
"type"
:
"string"
,
"description"
:
"The path to the dependency."
},
"python"
:
{
"type"
:
"string"
,
"description"
:
"The python versions for which the dependency should be installed."
},
},
"optional"
:
{
"optional"
:
{
"type"
:
"boolean"
,
"type"
:
"boolean"
,
...
...
poetry/packages/package.py
View file @
9cf87a28
...
@@ -283,6 +283,10 @@ class Package(object):
...
@@ -283,6 +283,10 @@ class Package(object):
file_path
=
Path
(
constraint
[
'file'
])
file_path
=
Path
(
constraint
[
'file'
])
dependency
=
FileDependency
(
file_path
,
base
=
self
.
cwd
)
dependency
=
FileDependency
(
file_path
,
base
=
self
.
cwd
)
elif
'path'
in
constraint
:
path
=
Path
(
constraint
[
'path'
])
dependency
=
FileDependency
(
path
,
base
=
self
.
cwd
)
else
:
else
:
version
=
constraint
[
'version'
]
version
=
constraint
[
'version'
]
...
...
tests/fixtures/sample_project/pyproject.toml
View file @
9cf87a28
...
@@ -31,7 +31,7 @@ pathlib2 = { version = "^2.2", python = "~2.7" }
...
@@ -31,7 +31,7 @@ pathlib2 = { version = "^2.2", python = "~2.7" }
orator
=
{
version
=
"^0.9"
,
optional
=
true
}
orator
=
{
version
=
"^0.9"
,
optional
=
true
}
# File dependency
# File dependency
demo
=
{
file
=
"../distributions/demo-0.1.0-py2.py3-none-any.whl"
}
demo
=
{
path
=
"../distributions/demo-0.1.0-py2.py3-none-any.whl"
}
[tool.poetry.extras]
[tool.poetry.extras]
...
...
tests/repositories/fixtures/pypi.org/json/requests.json
View file @
9cf87a28
This diff is collapsed.
Click to expand it.
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