Search code examples
pythonpipsetuptoolsdistutilspypi

Repackage a modified library originally installed through pip


I installed a library through pip that only worked with Python2. I modified the source a bit to make it work with Python3, however I would like to repackage my modified version so that I can move it to another PC. How can I do it?


Solution

  • See any of these references from the docs/stackoverflow:

    The process essentially consists of:

    • creating the package through directory structure and __init__.py
    • using setuptools to specify project metadata
    • installing with pip
    • optionally uploading to PyPI with twine.