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
25f02c5b
Unverified
Commit
25f02c5b
authored
Sep 10, 2019
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into develop
parents
7b13f003
be03ab9e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
101 deletions
+104
-101
.appveyor.yml
+28
-0
.github/workflows/main.yml
+0
-96
.pre-commit-config.yaml
+1
-1
.travis.yml
+35
-0
poetry/packages/dependency.py
+3
-0
tests/masonry/builders/test_complete.py
+4
-4
tests/packages/test_vcs_dependency.py
+33
-0
No files found.
.appveyor.yml
0 → 100644
View file @
25f02c5b
build
:
false
environment
:
PYTHONIOENCODING
:
"
UTF-8"
matrix
:
-
PYTHON
:
"
C:/Python27-x64"
-
PYTHON
:
"
C:/Python35-x64"
-
PYTHON
:
"
C:/Python36-x64"
-
PYTHON
:
"
C:/Python37-x64"
install
:
-
"
SET
PATH=%PYTHON%;%PYTHON%
\\
Scripts;%PATH%"
# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
-
"
python
-m
pip
install
--disable-pip-version-check
--user
pip==18.1"
# Installing Poetry
-
"
python
get-poetry.py
--preview
-y"
-
"
SET
PATH=%USERPROFILE%
\\
.poetry
\\
bin;%PATH%"
# Install dependencies
-
"
poetry
install
-v"
test_script
:
-
"
poetry
run
pytest
--cov=poetry
tests/
-W
ignore"
.github/workflows/main.yml
deleted
100644 → 0
View file @
7b13f003
name
:
Tests
on
:
[
push
]
jobs
:
Linting
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Set up Python 3.7
uses
:
actions/setup-python@v1
with
:
python-version
:
3.7
-
name
:
Linting
run
:
|
pip install pre-commit
pre-commit run --all-files
Linux
:
needs
:
Linting
runs-on
:
ubuntu-latest
strategy
:
matrix
:
python-version
:
[
2.7
,
3.5
,
3.6
,
3.7
]
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v1
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Install Poetry
run
:
|
python get-poetry.py --preview -y
source $HOME/.poetry/env
-
name
:
Install dependencies
run
:
|
source $HOME/.poetry/env
poetry install
-
name
:
Test
run
:
|
source $HOME/.poetry/env
poetry run pytest -q tests
MacOS
:
needs
:
Linting
runs-on
:
macos-latest
strategy
:
matrix
:
python-version
:
[
2.7
,
3.5
,
3.6
,
3.7
]
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v1
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Install Poetry
run
:
|
python get-poetry.py --preview -y
source $HOME/.poetry/env
-
name
:
Install dependencies
run
:
|
source $HOME/.poetry/env
poetry install
-
name
:
Test
run
:
|
source $HOME/.poetry/env
poetry run pytest -q tests
Windows
:
needs
:
Linting
runs-on
:
windows-latest
strategy
:
matrix
:
python-version
:
[
2.7
,
3.5
,
3.6
,
3.7
]
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v1
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Install Poetry
run
:
|
python get-poetry.py --preview -y
SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%
-
name
:
Install dependencies
run
:
|
SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%
poetry install
-
name
:
Test
run
:
|
SET PATH=%USERPROFILE%\\.poetry\\bin;%PATH%
poetry run pytest -q tests
.pre-commit-config.yaml
View file @
25f02c5b
...
@@ -3,4 +3,4 @@ repos:
...
@@ -3,4 +3,4 @@ repos:
rev
:
stable
rev
:
stable
hooks
:
hooks
:
-
id
:
black
-
id
:
black
language
_version
:
python3.6
python
_version
:
python3.6
.travis.yml
0 → 100644
View file @
25f02c5b
language
:
python
stages
:
-
linting
-
test
cache
:
pip
:
true
directories
:
-
"
$HOME/.cache/pypoetry"
-
"
$HOME/.cache/pre-commit"
install
:
-
pip install pip==18.1
-
python get-poetry.py --preview -y
-
source $HOME/.poetry/env
-
poetry install -v
script
:
pytest -q tests/
jobs
:
include
:
-
python
:
"
2.7"
-
python
:
"
3.5"
-
python
:
"
3.6"
-
python
:
"
3.7"
dist
:
xenial
-
stage
:
linting
python
:
"
3.6"
install
:
-
pip install pre-commit
-
pre-commit install-hooks
script
:
-
pre-commit run --all-files
poetry/packages/dependency.py
View file @
25f02c5b
...
@@ -215,6 +215,9 @@ class Dependency(object):
...
@@ -215,6 +215,9 @@ class Dependency(object):
)
)
if
markers
:
if
markers
:
if
self
.
is_vcs
():
requirement
+=
" "
if
len
(
markers
)
>
1
:
if
len
(
markers
)
>
1
:
markers
=
[
"({})"
.
format
(
m
)
for
m
in
markers
]
markers
=
[
"({})"
.
format
(
m
)
for
m
in
markers
]
requirement
+=
"; {}"
.
format
(
" and "
.
join
(
markers
))
requirement
+=
"; {}"
.
format
(
" and "
.
join
(
markers
))
...
...
tests/masonry/builders/test_complete.py
View file @
25f02c5b
...
@@ -39,8 +39,8 @@ def clear_samples_dist():
...
@@ -39,8 +39,8 @@ def clear_samples_dist():
@pytest.mark.skipif
(
@pytest.mark.skipif
(
sys
.
platform
==
"win32"
and
sys
.
version_info
<=
(
3
,
6
),
sys
.
platform
==
"win32"
and
sys
.
version_info
<=
(
3
,
4
),
reason
=
"Disable test on Windows for Python <=3.
6
"
,
reason
=
"Disable test on Windows for Python <=3.
4
"
,
)
)
def
test_wheel_c_extension
():
def
test_wheel_c_extension
():
module_path
=
fixtures_dir
/
"extended"
module_path
=
fixtures_dir
/
"extended"
...
@@ -96,8 +96,8 @@ $""".format(
...
@@ -96,8 +96,8 @@ $""".format(
@pytest.mark.skipif
(
@pytest.mark.skipif
(
sys
.
platform
==
"win32"
and
sys
.
version_info
<=
(
3
,
6
),
sys
.
platform
==
"win32"
and
sys
.
version_info
<=
(
3
,
4
),
reason
=
"Disable test on Windows for Python <=3.
6
"
,
reason
=
"Disable test on Windows for Python <=3.
4
"
,
)
)
def
test_wheel_c_extension_src_layout
():
def
test_wheel_c_extension_src_layout
():
module_path
=
fixtures_dir
/
"src_extended"
module_path
=
fixtures_dir
/
"src_extended"
...
...
tests/packages/test_vcs_dependency.py
View file @
25f02c5b
...
@@ -20,3 +20,36 @@ def test_to_pep_508_with_extras():
...
@@ -20,3 +20,36 @@ def test_to_pep_508_with_extras():
expected
=
"poetry[foo] @ git+https://github.com/sdispater/poetry.git@master"
expected
=
"poetry[foo] @ git+https://github.com/sdispater/poetry.git@master"
assert
expected
==
dependency
.
to_pep_508
()
assert
expected
==
dependency
.
to_pep_508
()
def
test_to_pep_508_in_extras
():
dependency
=
VCSDependency
(
"poetry"
,
"git"
,
"https://github.com/sdispater/poetry.git"
)
dependency
.
in_extras
.
append
(
"foo"
)
expected
=
(
'poetry @ git+https://github.com/sdispater/poetry.git@master ; extra == "foo"'
)
assert
expected
==
dependency
.
to_pep_508
()
dependency
=
VCSDependency
(
"poetry"
,
"git"
,
"https://github.com/sdispater/poetry.git"
)
dependency
.
in_extras
.
append
(
"foo"
)
dependency
.
extras
.
append
(
"bar"
)
expected
=
'poetry[bar] @ git+https://github.com/sdispater/poetry.git@master ; extra == "foo"'
assert
expected
==
dependency
.
to_pep_508
()
dependency
=
VCSDependency
(
"poetry"
,
"git"
,
"https://github.com/sdispater/poetry.git"
,
"b;ar;"
)
dependency
.
in_extras
.
append
(
"foo;"
)
expected
=
(
'poetry @ git+https://github.com/sdispater/poetry.git@b;ar; ; extra == "foo;"'
)
assert
expected
==
dependency
.
to_pep_508
()
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