Skip to main content

setup.cfg generator

Project description

Install

$ [sudo] pip install setupcfg

Classes

setupcfg.Setupcfg

setup.cfg generator class. dict/attr access to sections dicts

method description
load(path='setup.cfg') load from setup.cfg file
save(path='setup.cfg') save to setup.cfg file
string() return string representation

Functions

function description
setupcfg.get(section, option, default=None) return the value for option if option is in the setup.cfg, else default
setupcfg.load(path='setup.cfg') return dictionary with setup.cfg sections dictionaries
setupcfg.values.string(value) Convert a value to a setup.cfg value string
setupcfg.values.value(string) Convert a string to a python value

CLI

usage description
python -m setupcfg.create generate setup.cfg
python -m setupcfg.metadata.description [description] read/write setup.cfg [metadata] description
python -m setupcfg.metadata.keywords [keywords] read/write setup.cfg [metadata] keywords
python -m setupcfg.metadata.name [name] read/write setup.cfg [metadata] name
python -m setupcfg.metadata.url [url] read/write setup.cfg [metadata] url
python -m setupcfg.metadata.version [version] read/write setup.cfg [metadata] version
python -m setupcfg.options.install_requires [requires ...] read/write setup.cfg [options] install_requires
python -m setupcfg.options.packages [package ...] read/write setup.cfg [options] packages
python -m setupcfg.options.scripts [script ...] read/write setup.cfg [options] scripts
python -m setupcfg.options.py_modules [module ...] read/write setup.cfg [options] py_modules

Examples

project-name.py/          # export NAME="..."
├── bin
|   └── script
├── classifiers.txt       # export CLASSIFIERS="..."
├── description.txt       # export DESCRIPTION="..."
├── keywords.txt          # export KEYWORDS="..."
├── requirements.txt      (req1, req2)
├── module.py
├── package
|   └── __init__.py
├── README.md             # export LONG_DESCRIPTION="file: README.md"
├── scripts
|   └── script
├── setup.py
├── version.txt           # export VERSION="1.0.0"
$ cd path/to/project-name.py
$ export "URL=https://github.com/owner/repo"
$ python -m setupcfg.create > setup.cfg
$ cat setup.cfg
[metadata]
name = project-name
version = 1.0.0
url = https://github.com/owner/repo
classifiers = file: classifiers.txt
description = file: description.txt
long_description = file: README.md
long_description_content_type = text/markdown
keywords = key1 key2

[options]
install_requires =
    req1
    req2
packages =
    pkgname
py_modules =
    module
scripts =
    bin/script
    scripts/script

Links

readme-md - README.md generator

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

setupcfg-2018.11.20.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

setupcfg-2018.11.20-py2.py3-none-any.whl (11.7 kB view hashes)

Uploaded Python 2 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