setuptools-py2cfg


Namesetuptools-py2cfg JSON
Version 2.1.0 PyPI version JSON
download
home_pageNone
SummaryConverts a setuptools setup.py to setup.cfg
upload_time2024-09-07 16:33:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseRevised BSD License
keywords setuptools setup.cfg
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # setuptools-py2cfg

<p>
    <a href="https://pypi.python.org/pypi/setuptools-py2cfg"><img alt="pypi version" src="https://img.shields.io/pypi/v/setuptools-py2cfg.svg"></a>
    <a href="https://github.com/gvalkov/setuptools-py2cfg/actions/workflows/tox.yml?query=branch:main"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/gvalkov/setuptools-py2cfg/tox.yml?branch=main"></a>
    <a href="https://github.com/gvalkov/setuptools-py2cfg/blob/main/LICENSE.txt"><img alt="License" src="https://img.shields.io/pypi/l/setuptools-py2cfg"></a>
</p>


Since version 30.3.0, [setuptools supports] declarative configuration through
the `setup.cfg` file. This script helps convert existing `setup.py` files to
`setup.cfg` in the format expected by setuptools.

A `setup.cfg` file may be migrated to `pyproject.toml` with the help of
[`ini2toml`](https://pypi.org/project/ini2toml) and
[`validate-pyproject`](https://github.com/abravalheri/validate-pyproject).


## Usage

Just point `setuptools-py2cfg` to a `setup.py` file or run it in a directory
containing `setup.py`. For example, given the following `setup.py`:

``` python
from setuptools import setup, find_packages

classifiers = [
    'Development Status :: 5 - Production/Stable',
    'Programming Language :: Python :: 2.7',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.3',
    'Programming Language :: Python :: 3.4',
    'Programming Language :: Python :: 3.5',
    'Programming Language :: Python :: 3.6',
    'Intended Audience :: Developers',
    'Topic :: Software Development :: Libraries',
    'License :: OSI Approved :: BSD License',
]

extras_require = {
    'tests': [
        'tox >= 2.6.0',
        'pytest >= 3.0.3',
    ],
    'devel': [
        'check-manifest >= 0.35',
        'readme-renderer >= 16.0',
    ]
}

kw = {
    'name':                 'ansimarkup',
    'version':              '1.3.0',

    'description':          'Produce colored terminal text with an xml-like markup',
    'long_description':     open('README.rst').read(),

    'author':               'Georgi Valkov',
    'author_email':         'georgi.t.valkov@gmail.com',
    'license':              'Revised BSD License',
    'keywords':             'ansi terminal markup',
    'url':                  'https://github.com/gvalkov/python-ansimarkup',
    'classifiers':          classifiers,
    'install_requires':     'colorama',
    'extras_require':       extras_require,
    'packages':             find_packages(),
    'zip_safe':             True,
}

if __name__ == '__main__':
    setup(**kw)
```

Running `setuptools-py2cfg.py` would print:

``` ini
[metadata]
name = ansimarkup
version = 1.3.0
author = Georgi Valkov
author_email = georgi.t.valkov@gmail.com
license = Revised BSD License
description = Produce colored terminal text with an xml-like markup
keywords = ansi, terminal, markup
url = https://github.com/gvalkov/python-ansimarkup
long_description = file: README.rst
classifiers =
    Development Status :: 5 - Production/Stable
    Programming Language :: Python :: 2.7
    Programming Language :: Python :: 3
    Programming Language :: Python :: 3.3
    Programming Language :: Python :: 3.4
    Programming Language :: Python :: 3.5
    Programming Language :: Python :: 3.6
    Intended Audience :: Developers
    Topic :: Software Development :: Libraries
    License :: OSI Approved :: BSD License

[options]
packages = find:
zip_safe = True
install_requires = colorama

[options.extras_require]
tests =
    tox >= 2.6.0
    pytest >= 3.0.3
devel =
    check-manifest >= 0.35
    readme-renderer >= 16.0
```

There are several non-essential options that control the format of the
generated ini-file:

    usage: setuptools-py2cfg.py [-h] [-t int] [-i int] [-a] [path]

    converts an existing setup.py file to a setup.cfg in the format expected by
    setuptools

    positional arguments:
      path                  path to setup.py file (default: ./setup.py)

    optional arguments:
      -h, --help            show this help message and exit
      -t int, --dangling-list-threshold int
                            lists longer than this many characters are converted
                            to a dangling list (default: 40)
      -i int, --dangling-list-indent int
                            number of spaces to use when indenting dangling lists
                            (default: 4)
      -a, --always-use-dangling-lists
                            use dangling lists everywhere (default: False)

Keep in mind that a `setup.py` file with a single call to `setuptools.setup()`
is still needed after migrating all metadata to `setup.cfg`.

## Installation

The latest stable version of setuptools-py2cfg can be installed from
pypi:

``` bash
$ pip install setuptools-py2cfg
```

## Todo

-   Handle `entry_scripts` in ini-format.
-   Write a test or two.

## License

Released under the terms of the [Revised BSD License].

  [setuptools supports]: https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html
  [Revised BSD License]: https://raw.github.com/gvalkov/setuptools-py2cfg/master/LICENSE

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "setuptools-py2cfg",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "setuptools, setup.cfg",
    "author": null,
    "author_email": "Georgi Valkov <georgi.t.valkov@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/07/fc/518f007a68573927bf014e9eba44ccebffa459a0a87dc4bf66b03e14896d/setuptools_py2cfg-2.1.0.tar.gz",
    "platform": null,
    "description": "# setuptools-py2cfg\n\n<p>\n    <a href=\"https://pypi.python.org/pypi/setuptools-py2cfg\"><img alt=\"pypi version\" src=\"https://img.shields.io/pypi/v/setuptools-py2cfg.svg\"></a>\n    <a href=\"https://github.com/gvalkov/setuptools-py2cfg/actions/workflows/tox.yml?query=branch:main\"><img alt=\"Build status\" src=\"https://img.shields.io/github/actions/workflow/status/gvalkov/setuptools-py2cfg/tox.yml?branch=main\"></a>\n    <a href=\"https://github.com/gvalkov/setuptools-py2cfg/blob/main/LICENSE.txt\"><img alt=\"License\" src=\"https://img.shields.io/pypi/l/setuptools-py2cfg\"></a>\n</p>\n\n\nSince version 30.3.0, [setuptools supports] declarative configuration through\nthe `setup.cfg` file. This script helps convert existing `setup.py` files to\n`setup.cfg` in the format expected by setuptools.\n\nA `setup.cfg` file may be migrated to `pyproject.toml` with the help of\n[`ini2toml`](https://pypi.org/project/ini2toml) and\n[`validate-pyproject`](https://github.com/abravalheri/validate-pyproject).\n\n\n## Usage\n\nJust point `setuptools-py2cfg` to a `setup.py` file or run it in a directory\ncontaining `setup.py`. For example, given the following `setup.py`:\n\n``` python\nfrom setuptools import setup, find_packages\n\nclassifiers = [\n    'Development Status :: 5 - Production/Stable',\n    'Programming Language :: Python :: 2.7',\n    'Programming Language :: Python :: 3',\n    'Programming Language :: Python :: 3.3',\n    'Programming Language :: Python :: 3.4',\n    'Programming Language :: Python :: 3.5',\n    'Programming Language :: Python :: 3.6',\n    'Intended Audience :: Developers',\n    'Topic :: Software Development :: Libraries',\n    'License :: OSI Approved :: BSD License',\n]\n\nextras_require = {\n    'tests': [\n        'tox >= 2.6.0',\n        'pytest >= 3.0.3',\n    ],\n    'devel': [\n        'check-manifest >= 0.35',\n        'readme-renderer >= 16.0',\n    ]\n}\n\nkw = {\n    'name':                 'ansimarkup',\n    'version':              '1.3.0',\n\n    'description':          'Produce colored terminal text with an xml-like markup',\n    'long_description':     open('README.rst').read(),\n\n    'author':               'Georgi Valkov',\n    'author_email':         'georgi.t.valkov@gmail.com',\n    'license':              'Revised BSD License',\n    'keywords':             'ansi terminal markup',\n    'url':                  'https://github.com/gvalkov/python-ansimarkup',\n    'classifiers':          classifiers,\n    'install_requires':     'colorama',\n    'extras_require':       extras_require,\n    'packages':             find_packages(),\n    'zip_safe':             True,\n}\n\nif __name__ == '__main__':\n    setup(**kw)\n```\n\nRunning `setuptools-py2cfg.py` would print:\n\n``` ini\n[metadata]\nname = ansimarkup\nversion = 1.3.0\nauthor = Georgi Valkov\nauthor_email = georgi.t.valkov@gmail.com\nlicense = Revised BSD License\ndescription = Produce colored terminal text with an xml-like markup\nkeywords = ansi, terminal, markup\nurl = https://github.com/gvalkov/python-ansimarkup\nlong_description = file: README.rst\nclassifiers =\n    Development Status :: 5 - Production/Stable\n    Programming Language :: Python :: 2.7\n    Programming Language :: Python :: 3\n    Programming Language :: Python :: 3.3\n    Programming Language :: Python :: 3.4\n    Programming Language :: Python :: 3.5\n    Programming Language :: Python :: 3.6\n    Intended Audience :: Developers\n    Topic :: Software Development :: Libraries\n    License :: OSI Approved :: BSD License\n\n[options]\npackages = find:\nzip_safe = True\ninstall_requires = colorama\n\n[options.extras_require]\ntests =\n    tox >= 2.6.0\n    pytest >= 3.0.3\ndevel =\n    check-manifest >= 0.35\n    readme-renderer >= 16.0\n```\n\nThere are several non-essential options that control the format of the\ngenerated ini-file:\n\n    usage: setuptools-py2cfg.py [-h] [-t int] [-i int] [-a] [path]\n\n    converts an existing setup.py file to a setup.cfg in the format expected by\n    setuptools\n\n    positional arguments:\n      path                  path to setup.py file (default: ./setup.py)\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -t int, --dangling-list-threshold int\n                            lists longer than this many characters are converted\n                            to a dangling list (default: 40)\n      -i int, --dangling-list-indent int\n                            number of spaces to use when indenting dangling lists\n                            (default: 4)\n      -a, --always-use-dangling-lists\n                            use dangling lists everywhere (default: False)\n\nKeep in mind that a `setup.py` file with a single call to `setuptools.setup()`\nis still needed after migrating all metadata to `setup.cfg`.\n\n## Installation\n\nThe latest stable version of setuptools-py2cfg can be installed from\npypi:\n\n``` bash\n$ pip install setuptools-py2cfg\n```\n\n## Todo\n\n-   Handle `entry_scripts` in ini-format.\n-   Write a test or two.\n\n## License\n\nReleased under the terms of the [Revised BSD License].\n\n  [setuptools supports]: https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html\n  [Revised BSD License]: https://raw.github.com/gvalkov/setuptools-py2cfg/master/LICENSE\n",
    "bugtrack_url": null,
    "license": "Revised BSD License",
    "summary": "Converts a setuptools setup.py to setup.cfg",
    "version": "2.1.0",
    "project_urls": {
        "Homepage": "https://github.com/gvalkov/setuptools-py2cfg"
    },
    "split_keywords": [
        "setuptools",
        " setup.cfg"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "880c9cdcfbdbe442ee4526bf1166155e15141a1fd3c6393c0fdb402c13be8a40",
                "md5": "56cd189e851d46d8c090f1c2bf70377b",
                "sha256": "74d9704fcf7a83fceb07f8ffc24830fd5343e6058393d2b66547fdfb7fe66845"
            },
            "downloads": -1,
            "filename": "setuptools_py2cfg-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "56cd189e851d46d8c090f1c2bf70377b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7659,
            "upload_time": "2024-09-07T16:33:49",
            "upload_time_iso_8601": "2024-09-07T16:33:49.976000Z",
            "url": "https://files.pythonhosted.org/packages/88/0c/9cdcfbdbe442ee4526bf1166155e15141a1fd3c6393c0fdb402c13be8a40/setuptools_py2cfg-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07fc518f007a68573927bf014e9eba44ccebffa459a0a87dc4bf66b03e14896d",
                "md5": "00ef88ad4b771bdc739080c365baa86f",
                "sha256": "5597700a809fc3ee07a7392d6fc1cd7ed2c083979e9d2bfcaab965eb607cef10"
            },
            "downloads": -1,
            "filename": "setuptools_py2cfg-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "00ef88ad4b771bdc739080c365baa86f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8033,
            "upload_time": "2024-09-07T16:33:51",
            "upload_time_iso_8601": "2024-09-07T16:33:51.432011Z",
            "url": "https://files.pythonhosted.org/packages/07/fc/518f007a68573927bf014e9eba44ccebffa459a0a87dc4bf66b03e14896d/setuptools_py2cfg-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 16:33:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gvalkov",
    "github_project": "setuptools-py2cfg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "setuptools-py2cfg"
}
        
Elapsed time: 0.68843s