Create a pyproject.toml file from setuptools configuration
Project description
setuptools-pyproject-migration
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 (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
pipx install setuptools-pyproject-migration
After that, in any directory that has a setup.py
and/or setup.cfg
file, you
can run
setup-to-pyproject
and it will print out the content of pyproject.toml
as computed from your
setup.py
and/or setup.cfg
. Running setup-to-pyproject -h
will print
a brief usage summary.
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
python -m pip install `setuptools-pyproject-migration
and then running
python setup.py pyproject
will print out the content of your pyproject.toml
file.
History
Inspired by a conversation on Mastodon.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file setuptools-pyproject-migration-0.1.0.tar.gz
.
File metadata
- Download URL: setuptools-pyproject-migration-0.1.0.tar.gz
- Upload date:
- Size: 45.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52f6833081dc10b7fb50cddc273e630218235aca1bdaacd6c17c1de068a49dcb |
|
MD5 | b52030786397ee5e1e00036533c460fe |
|
BLAKE2b-256 | 526a6c7711f5ca5963b2b7590f6c599863caf9757439b824c9eaa45d153a519f |
File details
Details for the file setuptools_pyproject_migration-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: setuptools_pyproject_migration-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efdca861144a294b693018c70f3bdd2479f5103c2af41ece5f251a3a30c67377 |
|
MD5 | 1efe8cfdd1840d9ee5f594b062039400 |
|
BLAKE2b-256 | 5eb9848900fa7d3b28069ca22e634dd474fb38817ef31571183f5591e83c0c5b |