pyproject-migrator
What is this?
This tool helps with converting setup.cfg (and other configuration files such as mypy.ini)
to a single pyproject.toml file.
Installation
You can install the project from Pip with
pip install pyproject-migrator
but it may be more useful to use pipx to run it as a tool; if you prefer to do that, just substitute
pipx run pyproject-migrator for pyproject-migrator in the examples below.
Usage
The tool can be run against a number of files or directories, but these files are considered to be part of
the same project. The tool will then attempt to merge these into a single pyproject.toml file fragment.
$ pyproject-migrator setup.cfg mypy.ini
or
$ pyproject-migrator .
The tool will output a chunk of TOML you can copy-paste (or >> redirect) into your pyproject.toml file.
It may also output a number of warnings about configuration that could not be converted.
Some of these are because the tool does not yet support the option, but others are because there is no direct equivalent in the TOML format. In these cases, you will need to manually convert the option.
Supported configuration
The tool currently supports the following configuration:
- codespell (in setup.cfg)
- coverage (in setup.cfg)
- isort (in setup.cfg)
- mypy (in setup.cfg and mypy.ini)
- pylint (in setup.cfg)
- pytest (in setup.cfg and pytest.ini)
Explicitly unsupported is
- flake8 (because it currently explicitly does not support pyproject.toml)
- setuptools (because there are a number of approaches to take to map it into pyproject.toml)
- Sphinx's
build_sphinxsection - tox (because there is no other TOML mapping than splatting INI config in there, ew)
Other tools that emit "Unknown section" currently include, but are not limited to (based on the setup.cfgs I had at hand):
- babel (extract_messages, extractors, mappings) (see https://github.com/python-babel/babel/issues/777)
- bumpversion
- nosetests
- pbr
- prequ
- pyscaffold
- versioneer
- vpip
- zest.releaser
License
pyproject-migrator is distributed under the terms of the MIT license.
Metadata
Release files for pyproject-migrator 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyproject_migrator-1.1.1.tar.gz | 7.3 kB | Without provenance | Details for pyproject_migrator-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyproject_migrator-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for pyproject_migrator-1.1.1-py3-none-any.whl |
Total release size: 14.4 kB
Release files / pyproject_migrator-1.1.1.tar.gz
| Download URL | pyproject_migrator-1.1.1.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00fab00fe266cc578509e2d3854d9d6964a5cc8c0c832524907d02fc2f1aabf2
|
|
BLAKE2b-256 checksum How to use checksums |
5c205f2cd75027b10826013cffe74f09902364e2fa0bdd8bfbb2c2712b684669
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / pyproject_migrator-1.1.1-py3-none-any.whl
| Download URL | pyproject_migrator-1.1.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d745537e6b4ee13f69e91f4c3940bb0932f8403cc956da8419436cc1a523f30c
|
|
BLAKE2b-256 checksum How to use checksums |
121c705531f92d836d4bbb8f65d6446d0a1139e450309e7dde640f4191f05dd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for pyproject-migrator 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.