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
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
setupcfg-2018.11.20.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for setupcfg-2018.11.20-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51ef2699b15147a29ad2d75922645d4a255515345a70816e32e1ca590e613eaf |
|
MD5 | a8bdb0679d05bb56a2f8773f229dfdfe |
|
BLAKE2b-256 | 1e0283bd5707ae60dce2f007242e6e8baf7ee187087fad1c1c18b191bd3e75ea |