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"

Contributing

To run tests, :

  1. poetry install # get environment setup
  2. make test # run the tests Test cases are in tests/toml, update Pipfile with additional entries and expect_pyproject.toml with expected output

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.6.tar.gz (8.6 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.6-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipenv-poetry-migrate-0.1.6.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for pipenv-poetry-migrate-0.1.6.tar.gz
Algorithm Hash digest
SHA256 2b79d1d225d01ac2bda343a0300b7ff476f8c37a0aae79f2765ae3e52d060dc7
MD5 568ce844751d9518badedc89e1008b51
BLAKE2b-256 139a99bcb154581b0ca319d29495a8fddee9f16786968d2b0e9499db03aac030

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pipenv_poetry_migrate-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for pipenv_poetry_migrate-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b4fbe235c71d4e1ba28072c6a7487dab2fcb8b3613af32f77364ddb053533b4a
MD5 50a09743b3772e46558b76a91ef4d1ab
BLAKE2b-256 bd87720b3c2171af743ec7aa66eac5af7d4fbf625d384f9d0bd6a1ed4f0ef4f0

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