Skip to main content

create a PEP621-compliant `pyproject.toml` file from existing build configuration

Project description

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

Warning 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')

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

peppyproject-1.0.2.tar.gz (78.3 kB view hashes)

Uploaded Source

Built Distribution

peppyproject-1.0.2-py3-none-any.whl (40.7 kB view hashes)

Uploaded Python 3

Supported by

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