Metadata-Version: 2.1
Name: setuptools-pyproject-migration
Version: 0.3.1.post0
Summary: Create a pyproject.toml file from setuptools configuration
Home-page: https://github.com/diazona/setuptools-pyproject-migration
Author: David Zaslavsky, Stuart Longland
Author-email: diazona@ellipsix.net, me@vk4msl.com
Project-URL: Documentation, https://setuptools-pyproject-migration.readthedocs.io/
Project-URL: Source, https://github.com/diazona/setuptools-pyproject-migration
Project-URL: Issues, https://github.com/diazona/setuptools-pyproject-migration/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Plugins
Classifier: Framework :: Setuptools Plugin
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development
Classifier: Topic :: System :: Archiving :: Packaging
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: packaging
Requires-Dist: pep508-parser
Requires-Dist: tomlkit
Requires-Dist: typing-extensions <5,>=4
Requires-Dist: setuptools ; python_version < "3.12"
Requires-Dist: dataclasses ; python_version < "3.7"
Requires-Dist: setuptools >=66.1 ; python_version >= "3.12"
Provides-Extra: docs
Requires-Dist: sphinx >=3.5 ; extra == 'docs'
Requires-Dist: jaraco.packaging >=9.3 ; extra == 'docs'
Requires-Dist: rst.linker >=1.9 ; extra == 'docs'
Requires-Dist: furo ; extra == 'docs'
Requires-Dist: sphinx-lint ; extra == 'docs'
Requires-Dist: sphinx-copybutton ; extra == 'docs'
Provides-Extra: testing
Requires-Dist: pytest >=7 ; extra == 'testing'
Requires-Dist: pytest-console-scripts >=1.2 ; extra == 'testing'
Requires-Dist: pytest-cov ; extra == 'testing'
Requires-Dist: requests ; extra == 'testing'
Requires-Dist: types-setuptools ; extra == 'testing'
Requires-Dist: backports.cached-property ; (python_version < "3.8") and extra == 'testing'
Requires-Dist: importlib-metadata ; (python_version < "3.8") and extra == 'testing'
Requires-Dist: pyproject-metadata ; (python_version >= "3.7") and extra == 'testing'
Requires-Dist: pytest-enabler >=2.2 ; (python_version >= "3.8") and extra == 'testing'

# setuptools-pyproject-migration

<!-- markdownlint-disable MD013 -->
[![PyPI](https://img.shields.io/pypi/v/setuptools-pyproject-migration.svg)](https://pypi.org/project/setuptools-pyproject-migration)
![PyPI versions](https://img.shields.io/pypi/pyversions/setuptools-pyproject-migration.svg)
[![tests](https://github.com/diazona/setuptools-pyproject-migration/workflows/tests/badge.svg)](https://github.com/diazona/setuptools-pyproject-migration/actions?query=workflow%3A%22tests%22)
[![documentation](https://readthedocs.org/projects/setuptools-pyproject-migration/badge/?version=latest)](https://setuptools-pyproject-migration.readthedocs.io/en/latest/?badge=latest)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![skeleton](https://img.shields.io/badge/skeleton-2023-informational)](https://blog.jaraco.com/skeleton)
<!-- markdownlint-enable MD013 -->

## Introduction

`pyproject.toml` represents the new era of Python packaging, but many old
projects are still using `setuptools`. That's where this package comes in: just
install it, run it, and it will print out a nicely formatted `pyproject.toml`
file with the same metadata that you had in `setup.py` or `setup.cfg`.

Or at least, that's the goal. The project is currently a work in progress with
only partial support for all the attributes that might exist in a setuptools
configuration, so this won't yet work for anything complex. Feel free to file
an issue to highlight anything that needs to be added!

## Installation and usage

There are two different ways to install this project. You can use either or both
depending on what you prefer.

### Standalone application

To install `setuptools-pyproject-migration` as an application, we recommend
using [pipx](https://pypa.github.io/pipx/) (though of course you can also do
this with `pip install --user` or in a virtual environment of your choice).
First make sure you have pipx installed, then run

```console
pipx install setuptools-pyproject-migration
```

After that, in any directory that has a `setup.py` and/or `setup.cfg` file, you
can run

```console
setuptools-pyproject-migration
```

and it will print out the content of `pyproject.toml` as computed from your
`setup.py` and/or `setup.cfg`. Running `setuptools-pyproject-migration -h` will
print a brief usage summary.

You can also install and run the application in one go as follows:

```console
pipx run setuptools-pyproject-migration
```

### Virtual environment

Or you can use `setuptools-pyproject-migration` in a virtual environment you use
to develop your project. Activate your virtual environment and then run

```console
python -m pip install setuptools-pyproject-migration
```

and then running

```console
python setup.py pyproject
```

will print out the content of your `pyproject.toml` file.

## History

Inspired by [a conversation on Mastodon](https://mastodon.longlandclan.id.au/@stuartl/110518282805008552).
