This is simple migration script, migrate pipenv to uv
Project description
pipenv-uv-migrate
This is simple migration script, migrate pipenv to uv.
:rocket: Get Started
Installation
$ uv tool install pipenv-uv-migrate
# -- or --
$ pipx install pipenv-uv-migrate
Migration
Step 1: Create pyproject.toml file
$ uv init
Step 2: Migrate
To migrate Pipfile to pyproject.toml.
$ pipenv-uv-migrate -f Pipfile -t pyproject.toml
When want to run dry-run mode:
$ pipenv-uv-migrate -f Pipfile -t pyproject.toml -n
Dry-run mode is pyproject.toml file does not overwrite, results are displayed on standard output.
[!Note]
If the dependency already exists in the project dependency and you want to re-migrate it, please use the--re-migrateoption. However, if the dependency is removed from pipenv, the project dependency will not be removed.$ pipenv-uv-migrate -f Pipfile -t pyproject.toml --re-migrate
Step 3: Generate lock file
$ uv lock
If there is already a uv.lock file, remove it first.
Step 4: Installing dependencies
To install the defined dependencies for your project.
$ uv sync
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.
[project]
name = "migrate-sample"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "Yoshiyuki HINO", email = "yhinoz@gmail.com" }
]
requires-python = ">=3.9"
dependencies = []
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
By executing this script, pyproject.toml is rewritten as follows.
[project]
name = "migrate-sample"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "Yoshiyuki HINO", email = "yhinoz@gmail.com" }
]
requires-python = ">=3.9"
dependencies = [
"requests",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"pytest>=5.2",
]
[!Note]
If the version of the dependent package is not specified, it will also be migrated. but the following warning will be displayed when lock or sync is performed with uv.warning: Missing version constraint (e.g., a lower bound) for `requests`.Please specify the version after migration.
:handshake: Contributing
- Fork and clone the repository, and create the development branch.
- Run
uv syncto setup your develop environment. - Do your code.
- Run
uvx --with tox-uv tox@latestto check that your test passed. - Run
bash scripts/format.shandbash scripts/lint.shto check that you haven't warnings. - Open a PR on GitHub.
Test cases
Test cases are in tests/testdata/toml, update Pipfile with additional entries and expect_pyproject.toml with expected output.
:pencil: License
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipenv_uv_migrate-0.4.0.tar.gz.
File metadata
- Download URL: pipenv_uv_migrate-0.4.0.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b064138242563552a7397e9dbaf5c440286233eb083f2ebea73eea40342adee4
|
|
| MD5 |
15a4e4cf8a009341b658d13edbe5c838
|
|
| BLAKE2b-256 |
8b49593c3ecbbfae4062654632b397aa4789bdc20fdbe480a46b90b9dfd8ef2b
|
Provenance
The following attestation bundles were made for pipenv_uv_migrate-0.4.0.tar.gz:
Publisher:
release.yml on yhino/pipenv-uv-migrate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipenv_uv_migrate-0.4.0.tar.gz -
Subject digest:
b064138242563552a7397e9dbaf5c440286233eb083f2ebea73eea40342adee4 - Sigstore transparency entry: 947246272
- Sigstore integration time:
-
Permalink:
yhino/pipenv-uv-migrate@021a408ed2d5cbf6b14467e0ea4f1256d2770c1d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yhino
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@021a408ed2d5cbf6b14467e0ea4f1256d2770c1d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pipenv_uv_migrate-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pipenv_uv_migrate-0.4.0-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e240ce9f5e07c68454cd053e497c6885a75e65a6a4acfcddb9a78bddeebf5ce
|
|
| MD5 |
86c2520e67edab620ad89794bd49376f
|
|
| BLAKE2b-256 |
209b5a6db92184311a769dd91077c3237ad7fe9610be14ea94a664e274d1ec9e
|
Provenance
The following attestation bundles were made for pipenv_uv_migrate-0.4.0-py3-none-any.whl:
Publisher:
release.yml on yhino/pipenv-uv-migrate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipenv_uv_migrate-0.4.0-py3-none-any.whl -
Subject digest:
1e240ce9f5e07c68454cd053e497c6885a75e65a6a4acfcddb9a78bddeebf5ce - Sigstore transparency entry: 947246273
- Sigstore integration time:
-
Permalink:
yhino/pipenv-uv-migrate@021a408ed2d5cbf6b14467e0ea4f1256d2770c1d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yhino
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@021a408ed2d5cbf6b14467e0ea4f1256d2770c1d -
Trigger Event:
push
-
Statement type: