Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New installation method #378

Merged
merged 9 commits into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ environment:
- PYTHON: "C:/Python27-x64"
- PYTHON: "C:/Python35-x64"
- PYTHON: "C:/Python36-x64"
- PYTHON: "C:/Python37-x64"


install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
Expand All @@ -15,8 +17,8 @@ install:
# about it being out of date.
- "python -m pip install --disable-pip-version-check --user --upgrade pip"

# Create poetry virtualenv
- "python -m pip install poetry --pre"
# Installing Poetry
- "python -m pip install poetry --pre -U"

# Install dependencies
- "poetry install -v"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ setup.cfg
MANIFEST.in
/setup.py
/docs/site/*
pyproject.lock
/tests/fixtures/simple_project/setup.py
/tests/fixtures/project_with_extras/setup.py
.mypy_cache

.venv
/releases/*
29 changes: 14 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,25 @@ stages:
cache:
pip: true
directories:
- $HOME/.cache/pypoetry
- $HOME/.cache/pre-commit
- "$HOME/.cache/pypoetry"
- "$HOME/.cache/pre-commit"

install:
- pip install poetry --pre
- pip install pip -U
- pip install poetry --pre -U
- poetry install -v

script: pytest -q tests/

jobs:
include:
- python: "2.7"
- python: "3.4"
- python: "3.5"
- python: "3.6"

- stage: linting
python: "3.6"
install:
- pip install pre-commit
- pre-commit install-hooks
script:
- pre-commit run --all-files
- python: '2.7'
- python: '3.5'
- python: '3.6'
- stage: linting
python: '3.6'
install:
- pip install pre-commit
- pre-commit install-hooks
script:
- pre-commit run --all-files
44 changes: 44 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This file is part of Poetry
# https://github.com/sdispater/poetry

# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT-license
# Copyright (c) 2018 Sébastien Eustace

POETRY_RELEASE := $$(sed -n -E "s/__version__ = '(.+)'/\1/p" poetry/__version__.py)

# lists all available targets
list:
@sh -c "$(MAKE) -p no_targets__ | \
awk -F':' '/^[a-zA-Z0-9][^\$$#\/\\t=]*:([^=]|$$)/ {\
split(\$$1,A,/ /);for(i in A)print A[i]\
}' | grep -v '__\$$' | grep -v 'make\[1\]' | grep -v 'Makefile' | sort"
# required for list
no_targets__:

# install all dependencies
setup: setup-python

# test your application (tests in the tests/ directory)
test:
@py.test --cov=poetry --cov-config .coveragerc tests/ -sq

release: build linux_release osx_release

build:
@poetry build
@python sonnet make:release

publish:
@poetry publish

wheel:
@poetry build -v

linux_release:
docker pull quay.io/pypa/manylinux1_x86_64
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/make-linux-release.sh

# run tests against all supported python versions
tox:
@tox
75 changes: 60 additions & 15 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,70 @@ recommended way of installing `poetry`.
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
```

Alternatively, you can download the `get-poetry.py` file and execute it separately.
!!! note

If you want to install prerelease versions, you can do so by passing `--preview` to `get-poetry.py`:
You only need to install Poetry once. It will automatically pick up the current
Python version and use it to [create virtualenvs](/docs/basic-usage/#poetry-and-virtualenvs) accordingly.

```bash
python get-poetry.py --preview
```
The installer installs the `poetry` tool to Poetry's `bin` directory.
On Unix it is located at `$HOME/.poetry/bin` and on Windows at `%USERPROFILE%\.poetry\bin`.

Similarly, if you want to install a specific version, you can use `--version`:
This directory will be in your `$PATH` environment variable,
which means you can run them from the shell without further configuration.
Open a new shell and type the following:

```bash
python get-poetry.py --version 0.7.0
poetry --version
```

If you see something like `Poetry 0.11.4` then you are ready to use Poetry.
If you decide Poetry isn't your thing, you can completely remove it from your system
by running the installer again with the `--uninstall` option.

!!!note

Using `pip` to install `poetry` is also possible.

Alternatively, you can download the `get-poetry.py` file and execute it separately.

If you want to install prerelease versions, you can do so by passing `--preview` to `get-poetry.py`:

```bash
python get-poetry.py --preview
```

Similarly, if you want to install a specific version, you can use `--version`:

```bash
pip install --user poetry
```

Be aware, however, that it will also install poetry's dependencies
which might cause conflicts.
python get-poetry.py --version 0.7.0
```

Note that the installer does not support Poetry releases < 12.0.

### Alternative installation methods (not recommended)

#### Installing with `pip`

Using `pip` to install Poetry is possible.

```bash
pip install --user poetry
```

!!!warning

Be aware that it will also install Poetry's dependencies
which might cause conflicts with other packages.

#### Installing with `pipsi`

Using [`pipsi`](https://github.com/mitsuhiko/pipsi) to install Poetry is also possible.

```bash
pipsi install poetry
```

Make sure your installed version of `pipsi` is at least version `0.10`,
otherwise Poetry will not function properly. You can get it from its
[Github repository](https://github.com/mitsuhiko/pipsi).


## Updating `poetry`
Expand All @@ -67,6 +107,11 @@ to `self:update`.
poetry self:update 0.8.0
```

!!!note

The `self:update` command will only work if you used the recommended
installer to install Poetry.


## Enable tab completion for Bash, Fish, or Zsh

Expand All @@ -91,7 +136,7 @@ poetry completions zsh > ~/.zfunc/_poetry
!!! note

You may need to restart your shell in order for the changes to take effect.

For `zsh`, you must then add the following line in your `~/.zshrc` before `compinit`:

```bash
Expand Down
Loading