simple migration script, migrate pipenv to poetry
Project description
pipenv-poetry-migrate
This is simple migration script, migrate pipenv to poetry.
Setup
$ pip install -U pipenv-poetry-migrate
Migration
Step 0: Install packages
$ pip install poetry pipenv-poetry-migrate
Step 1: Create pyproject.toml
file
$ poetry init
Step 2: Migrate
To migrate Pipfile
to pyproject.toml
.
$ pipenv-poetry-migrate -f Pipfile -t pyproject.toml
When want to run dry-run mode:
$ pipenv-poetry-migrate -f Pipfile -t pyproject.toml -n
Dry-run mode is pyproject.toml
file does not overwrite, results are displayed on standard output.
Step 3: Generate lock file
$ poetry lock
If there is already a poetry.lock
file, remove it first.
Step 4: Installing dependencies
To install the defined dependencies for your project.
$ poetry install
Example output
This is an example of a Pipfile to be migrated.
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
pytest = "^5.2"
Migrate the above file to the following pyproject.toml.
[tool.poetry]
name = "migration-sample"
version = "0.1.0"
description = ""
authors = ["Yoshiyuki HINO <yhinoz@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.7"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
By executing this script, pyproject.toml is rewritten as follows.
[tool.poetry]
name = "migration-sample"
version = "0.1.0"
description = ""
authors = ["Yoshiyuki HINO <yhinoz@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.7"
requests = "*"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pipenv-poetry-migrate-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4985449f7fa77505338751cf2e163dede206e2d135aaf0622a44b7d1e86bb8c |
|
MD5 | c3165de56f2fc9dd52e58c642596cc48 |
|
BLAKE2b-256 | 205f1f19fc03b2736808f0daa86b8b578d8c0c2084d6b4264f9047929111f4b1 |
Close
Hashes for pipenv_poetry_migrate-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25cb60ad7b23d6fd0cff6713e3682f4f347e45ba21be6929f5fa7a889e7026b8 |
|
MD5 | 4b9c6c030d54ad4668dde88c3fa7e070 |
|
BLAKE2b-256 | 18450efb1ec813d618d0dc5c2d196b162f7b3cda4169285736d9761f8b72b83f |