Skip to content

zacharyburnett/peppyproject

Repository files navigation

peppyproject

build pypi implementation python tests codecov Code style: black License: GPL v3

peppyproject creates a PEP621-compliant pyproject.toml file from an existing Python project's build configuration (setup.cfg, setup.py, tox.ini, pytest.ini, etc.).

Installation

pip install peppyproject

Usage

Caution

peppyproject uses ini2toml[full] to read setup.cfg and INI files, and ast.literal_eval() to read and parse a setup.py file. It assumes you have vetted the setup.py and does not perform any sanitization or safety checking; thus, it is inadvisable to use on unknown or potentially malicious setup.py scripts.

peppyproject . -o pyproject.toml
Usage: peppyproject [OPTIONS] [DIRECTORY]

  read a Python project configuration and output a PEP621-compliant `pyproject.toml`

Arguments:
  [DIRECTORY]  directory from which to read configuration

Options:
  -o, --output PATH  path to which to write TOML
  --help             Show this message and exit.

API

from peppyproject import PyProjectConfiguration

configuration = PyProjectConfiguration.from_directory('./my_python_project')
configuration.to_file('./my_python_project/pyproject.toml')

About

move Python project configuration from `setup.cfg` and `setup.py` to a PEP621-compliant `pyproject.toml`

Topics

Resources

License

Stars

Watchers

Forks

Languages