{"id":15433129,"url":"https://github.com/simonw/pypi-rename","last_synced_at":"2025-04-19T17:53:28.636Z","repository":{"id":46767010,"uuid":"282512684","full_name":"simonw/pypi-rename","owner":"simonw","description":"Cookiecutter template for creating renamed PyPI packages","archived":false,"fork":false,"pushed_at":"2023-09-06T02:58:06.000Z","size":26,"stargazers_count":51,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-18T07:54:10.149Z","etag":null,"topics":["cookiecutter","cookiecutter-template","pypi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonw.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}},"created_at":"2020-07-25T19:36:39.000Z","updated_at":"2024-10-17T12:48:05.000Z","dependencies_parsed_at":"2024-10-20T20:19:27.454Z","dependency_job_id":null,"html_url":"https://github.com/simonw/pypi-rename","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"22e603bf1fc57f54d52c9ef1b361f841e8052f8f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fpypi-rename","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fpypi-rename/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fpypi-rename/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fpypi-rename/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/pypi-rename/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249753219,"owners_count":21320677,"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":["cookiecutter","cookiecutter-template","pypi"],"created_at":"2024-10-01T18:31:54.479Z","updated_at":"2025-04-19T17:53:28.614Z","avatar_url":"https://github.com/simonw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pypi-rename cookiecutter template\n\nCookiecutter template for creating renamed PyPI packages\n\n## What is this for?\n\nIf you want to rename a Python package that you have published on [PyPI](https://pypi.org/) you should follow [these steps](https://www.python.org/dev/peps/pep-0423/#how-to-rename-a-project):\n\n* Create a renamed version of the package\n* Publish it to PyPI under the new name\n* Now create a final release under the old name which does the following:\n  - Tells users about the name change\n  - Depends on the new name, so anyone who runs `pip install oldname` will get the new name as a dependency\n\nThis cookiecutter template helps create that final release under the old name.\n\n## Installation\n\nYou'll need to have [cookiecutter](https://cookiecutter.readthedocs.io/) installed. I recommend [pipx](https://pipxproject.github.io/pipx/) for this:\n\n    pipx install cookiecutter\n\nRegular `pip` will work OK too.\n\n## Usage\n\nRun `cookiecutter gh:simonw/pypi-rename` and then answer the prompts. Here's an example run:\n\n    $ cookiecutter gh:simonw/pypi-rename\n    new_package_name []: my-old-package-name\n    old_package_name []: my-new-package-name\n    old_package_new_version []: 0.2\n\nFor `old_package_new_version` you should enter a version that is higher than the most recent version that was published for the package which you are renaming.\n\nThis will create a directory called `my-old-package-name` ready to be published to PyPI.\n\nSee https://github.com/simonw/pypi-rename-demo for the output of this example.\n\n## Publishing your renamed package to PyPI\n\nFirst, publish a version of your package under the NEW name.\n\nNow you can use the package created by this template as the last released version under the old name.\n\nThis will display a README on PyPI explaining that the module has been renamed, and will also ensure that anyone who runs `pip install my-old-package-name` will get the new package, since the new package is the only dependency for the old renamed package.\n\nHere's an example run, first creating the package using `cookiecutter` and `python -m build`:\n```bash\n% cookiecutter gh:simonw/pypi-rename\n  [1/3] new_package_name (): click-default-group\n  [2/3] old_package_name (): click-default-group-wheel\n  [3/3] old_package_new_version (): 1.2.3\n% cd click-default-group-wheel\n% python -m build\n* Creating virtualenv isolated environment...\n* Installing packages in isolated environment... (setuptools \u003e= 40.8.0, wheel)\n* Getting build dependencies for sdist...\n...\nSuccessfully built click-default-group-wheel-1.2.3.tar.gz and click_default_group_wheel-1.2.3-py3-none-any.whl\n```\nAnd then uploading it to PyPI with `twine` - using a [PyPI API token](https://pypi.org/help/#apitoken) (pasted in as the password):\n```bash\n% twine upload dist/click*\nUploading distributions to https://upload.pypi.org/legacy/\nEnter your username: __token__\nEnter your password: \nUploading click_default_group_wheel-1.2.3-py3-none-any.whl\n100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 kB • 00:00 • ?\nUploading click-default-group-wheel-1.2.3.tar.gz\n100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 kB • 00:00 • ?\n\nView at:\nhttps://pypi.org/project/click-default-group-wheel/1.2.3/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fpypi-rename","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fpypi-rename","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fpypi-rename/lists"}