simple migration script, migrate pipenv to poetry
Project description
pipenv-poetry-migrate
This is simple migration script, migrate pipenv to poetry.
Install
$ pip install -U pipenv-poetry-migrate
Usage
$ 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.
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
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
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
File details
Details for the file pipenv-poetry-migrate-0.1.2.tar.gz
.
File metadata
- Download URL: pipenv-poetry-migrate-0.1.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ba3e15db99eba301ff1c6ff920b22b9551a6794505c88e29764bac50ce46c4cd
|
|
MD5 |
bae85ece6e953c2927050be6a3de67f9
|
|
BLAKE2b-256 |
d38d38cfc103664482e79fb10941a45f5aa8e7447be0f207023d0dfd272a2468
|
File details
Details for the file pipenv_poetry_migrate-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pipenv_poetry_migrate-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
34702de67a57db43a110dbfb8c681ec06168927800c6c6efcd067ce64c5f7252
|
|
MD5 |
549653067c4e0ad8fb62cdb5461c2168
|
|
BLAKE2b-256 |
d70daa420347c0eda957ef966de000a70733230aa93c392ad2074c02a3995d4e
|