Commit 27dbf0bc by Sébastien Eustace

Merge branch 'master' into develop

parents af57f15c 0b38fada
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"
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
......@@ -3,4 +3,4 @@ repos:
rev: stable
hooks:
- id: black
python_version: python3.6
language_version: python3.6
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
......@@ -248,9 +248,9 @@ can lead to compatibility issues.
Also, you have to explicitly tell it to not update the locked packages when you
install new ones. This should be the default.
#### Remove command
#### Uninstall command
The `remove` command will only remove the package specified but not its dependencies
The `uninstall` command will only remove the package specified but not its dependencies
if they are no longer needed.
You either have to use `sync` or `clean` to fix that.
......@@ -336,7 +336,7 @@ poetry install --no-dev
```
You can also specify the extras you want installed
by passing the `--E|--extras` option (See [Extras](#extras) for more info)
by passing the `-E|--extras` option (See [Extras](#extras) for more info)
```bash
poetry install --extras "mysql pgsql"
......
......@@ -44,7 +44,7 @@ my-package
│ └── __init__.py
└── tests
├── __init__.py
└── test_my_package
└── test_my_package.py
```
If you want to name your project differently than the folder, you can pass
......@@ -71,7 +71,7 @@ my-package
│ └── __init__.py
└── tests
├── __init__.py
└── test_my_package
└── test_my_package.py
```
## init
......
......@@ -115,7 +115,7 @@ Defaults to `false`.
### `virtualenvs.path`: string
Directory where virtualenvs will be created.
Defaults to `{cache-dir}/virtualenvs`
Defaults to `{cache-dir}/virtualenvs` (`{cache-dir}\virtualenvs` on Windows).
### `repositories.<name>`: string
......
......@@ -70,7 +70,7 @@ Before creating enhancement suggestions, please check [this list](#before-submit
* **Check that your issue does not already exist in the [issue tracker](https://github.com/sdispater/poetry/issues)**.
#### How do I submit an Enhancement suggestion?
#### How do I submit an enhancement suggestion?
Enhancement suggestions are tracked on the [official issue tracker](https://github.com/sdispater/poetry/issues) where you can create a new one and provide the following information:
......
......@@ -207,7 +207,7 @@ This section describe the scripts or executable that will be installed when inst
```toml
[tool.poetry.scripts]
poetry = 'poetry:console.run'
poetry = 'poetry.console:run'
```
Here, we will have the `poetry` script installed which will execute `console.run` in the `poetry` package.
......
import os
import tempfile
from io import open
from subprocess import CalledProcessError
......
......@@ -211,7 +211,7 @@ class WheelBuilder(Builder):
def wheel_filename(self): # type: () -> str
return "{}-{}-{}.whl".format(
re.sub(r"[^\w\d.]+", "_", self._package.pretty_name, flags=re.UNICODE),
re.sub(r"[^\w\d.]+", "_", self._meta.version, flags=re.UNICODE),
re.sub(r"[^\w\d.\+]+", "_", self._meta.version, flags=re.UNICODE),
self.tag,
)
......@@ -222,7 +222,7 @@ class WheelBuilder(Builder):
def dist_info_name(self, distribution, version): # type: (...) -> str
escaped_name = re.sub(r"[^\w\d.]+", "_", distribution, flags=re.UNICODE)
escaped_version = re.sub(r"[^\w\d.]+", "_", version, flags=re.UNICODE)
escaped_version = re.sub(r"[^\w\d.+]+", "_", version, flags=re.UNICODE)
return "{}-{}.dist-info".format(escaped_name, escaped_version)
......
"""Test fixture for https://github.com/sdispater/poetry/issues/756"""
[tool.poetry]
name = "localversionlabel"
version = "0.1-beta.1+gitbranch-buildno-1"
authors = []
......@@ -39,8 +39,8 @@ def clear_samples_dist():
@pytest.mark.skipif(
sys.platform == "win32" and sys.version_info <= (3, 4),
reason="Disable test on Windows for Python <=3.4",
sys.platform == "win32" and sys.version_info <= (3, 6),
reason="Disable test on Windows for Python <=3.6",
)
def test_wheel_c_extension():
module_path = fixtures_dir / "extended"
......@@ -96,8 +96,8 @@ $""".format(
@pytest.mark.skipif(
sys.platform == "win32" and sys.version_info <= (3, 4),
reason="Disable test on Windows for Python <=3.4",
sys.platform == "win32" and sys.version_info <= (3, 6),
reason="Disable test on Windows for Python <=3.6",
)
def test_wheel_c_extension_src_layout():
module_path = fixtures_dir / "src_extended"
......
......@@ -62,6 +62,18 @@ def test_wheel_prerelease():
assert whl.exists()
def test_wheel_localversionlabel():
module_path = fixtures_dir / "localversionlabel"
WheelBuilder.make(Poetry.create(str(module_path)), NullEnv(), NullIO())
local_version_string = "localversionlabel-0.1b1+gitbranch.buildno.1"
whl = module_path / "dist" / (local_version_string + "-py2.py3-none-any.whl")
assert whl.exists()
with zipfile.ZipFile(str(whl)) as z:
assert local_version_string + ".dist-info/METADATA" in z.namelist()
def test_wheel_package_src():
module_path = fixtures_dir / "source_package"
WheelBuilder.make(Poetry.create(str(module_path)), NullEnv(), NullIO())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment