{"id":13636424,"url":"https://github.com/asottile/setup-py-upgrade","last_synced_at":"2025-05-16T17:07:55.513Z","repository":{"id":35172278,"uuid":"168909956","full_name":"asottile/setup-py-upgrade","owner":"asottile","description":"upgrade a setup.py to declarative metadata","archived":false,"fork":false,"pushed_at":"2025-03-31T21:00:05.000Z","size":236,"stargazers_count":147,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T16:57:51.505Z","etag":null,"topics":["packaging","setuptools"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asottile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"asottile"}},"created_at":"2019-02-03T04:40:45.000Z","updated_at":"2025-03-31T21:00:07.000Z","dependencies_parsed_at":"2023-09-26T16:16:11.537Z","dependency_job_id":"77f8022d-469d-4cff-a0d2-790cc1845f2f","html_url":"https://github.com/asottile/setup-py-upgrade","commit_stats":{"total_commits":123,"total_committers":5,"mean_commits":24.6,"dds":"0.41463414634146345","last_synced_commit":"b409c92957443e81791a55172612b0589c3ad351"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asottile%2Fsetup-py-upgrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asottile%2Fsetup-py-upgrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asottile%2Fsetup-py-upgrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asottile%2Fsetup-py-upgrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asottile","download_url":"https://codeload.github.com/asottile/setup-py-upgrade/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270703,"owners_count":22042873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["packaging","setuptools"],"created_at":"2024-08-02T00:01:01.119Z","updated_at":"2025-05-16T17:07:55.495Z","avatar_url":"https://github.com/asottile.png","language":"Python","funding_links":["https://github.com/sponsors/asottile"],"categories":["By Environment"],"sub_categories":["Python"],"readme":"[![build status](https://github.com/asottile/setup-py-upgrade/actions/workflows/main.yml/badge.svg)](https://github.com/asottile/setup-py-upgrade/actions/workflows/main.yml)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/asottile/setup-py-upgrade/main.svg)](https://results.pre-commit.ci/latest/github/asottile/setup-py-upgrade/main)\n\nsetup-py-upgrade\n================\n\nupgrade a setup.py to declarative metadata\n\n## installation\n\n```bash\npip install setup-py-upgrade\n```\n\n## cli\n\nConsult the help for the latest usage:\n\n```console\n$ setup-py-upgrade --help\nusage: setup-py-upgrade [-h] directory\n\npositional arguments:\n  directory\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n\npass the root directory of the repository you'd like to convert\n\nthe script overwrites `setup.py` and `setup.cfg` when run\n\n## sample output\n\n```console\n$ setup-py-upgrade ../pre-commit\n../pre-commit/setup.py and ../pre-commit/setup.cfg written!\n$ tail -n999 ../pre-commit/setup.{py,cfg}\n==\u003e ../pre-commit/setup.py \u003c==\nfrom setuptools import setup\nsetup()\n\n==\u003e ../pre-commit/setup.cfg \u003c==\n[metadata]\nname = pre_commit\ndescription = A framework for managing and maintaining multi-language pre-commit hooks.\nlong_description = file: README.md\nlong_description_content_type = text/markdown\nurl = https://github.com/pre-commit/pre-commit\nversion = 1.14.2\nauthor = Anthony Sottile\nauthor_email = asottile@umich.edu\nclassifiers =\n    License :: OSI Approved :: MIT License\n    Programming Language :: Python :: 2\n    Programming Language :: Python :: 2.7\n    Programming Language :: Python :: 3\n    Programming Language :: Python :: 3.6\n    Programming Language :: Python :: 3.7\n    Programming Language :: Python :: Implementation :: CPython\n    Programming Language :: Python :: Implementation :: PyPy\n\n[options]\npackages = find:\ninstall_requires =\n    aspy.yaml\n    cfgv\u003e=1.4.0\n    identify\u003e=1.0.0\n    importlib-metadata\n    nodeenv\u003e=0.11.1\n    pyyaml\n    six\n    toml\n    virtualenv\n    futures; python_version\u003c\"3.2\"\n    importlib-resources; python_version\u003c\"3.7\"\n\n[options.packages.find]\nexclude =\n    tests*\n    testing*\n\n[options.entry_points]\nconsole_scripts =\n    pre-commit = pre_commit.main:main\n    pre-commit-validate-config = pre_commit.clientlib:validate_config_main\n    pre-commit-validate-manifest = pre_commit.clientlib:validate_manifest_main\n\n[options.package_data]\npre_commit.resources =\n    *.tar.gz\n    empty_template_*\n    hook-tmpl\n\n[bdist_wheel]\nuniversal = True\n```\n\n## what versions of setuptools / pip does the output work with?\n\n- `pip\u003e=1.5` (when installing from a wheel)\n    - released 2014-01-02\n- `setuptools\u003e=30.3` (when building from source)\n    - released 2016-12-08\n- `virtualenv\u003e=15.2` (to get a sufficient setuptools via `--no-download`)\n   - released 2018-03-21\n\n## what is not supported\n\ndeclarative metadata does not support `ext_modules` or setuptools plugins --\nthose must stay in `setup.py`.  If you're converting a project which uses one\nof those, you'll see a message like:\n\n```console\n$ setup-py-upgrade ../future-breakpoint/\next_modules= is not supported in setup.cfg\n```\n\nTo convert those, temporarily remove the offending constructs from `setup.py`,\nthen run `setup-py-upgrade`, then paste them back into the file.\n\n## related projects\n\n- [setup-cfg-fmt]: apply a consistent format to `setup.cfg` files\n\n[setup-cfg-fmt]: https://github.com/asottile/setup-cfg-fmt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasottile%2Fsetup-py-upgrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasottile%2Fsetup-py-upgrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasottile%2Fsetup-py-upgrade/lists"}