Skip to main content

pipenv-poetry-migrate

This is simple migration script, migrate pipenv to poetry.

build Codecov FOSSA Status PyPI - Downloads

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

FOSSA Status

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipenv-poetry-migrate-0.1.4.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipenv_poetry_migrate-0.1.4-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file pipenv-poetry-migrate-0.1.4.tar.gz.

File metadata

  • Download URL: pipenv-poetry-migrate-0.1.4.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.8.8 Linux/5.4.0-1043-azure

File hashes

Hashes for pipenv-poetry-migrate-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7eb5e9b08b45068862be89800e553a055fe6a7d02f606a04564a4fc968d60d87
MD5 5293963a109e8206d957d24281d79293
BLAKE2b-256 f32d8fd764bf4b4976e42c3122ab0764cb1d4aab7efad6cd87a0cb24681e3b2a

See more details on using hashes here.

File details

Details for the file pipenv_poetry_migrate-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pipenv_poetry_migrate-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6176fd80658ad1280a8272d9271886b5245ed04a1379b375a16d915a2b6d2cd3
MD5 b1fdd115e0bf0fcad90488004e2f30d3
BLAKE2b-256 5b321b705d180c881c8f78048e6009cca2b7586fc034455f66c9622d83e51fb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page