Developing Python Module

后端 未结 4 1158
太阳男子
太阳男子 2020-12-29 08:00

I\'d like to start developing an existing Python module. It has a source folder and the setup.py script to build and install it. The build script just copies the source file

4条回答
  •  失恋的感觉
    2020-12-29 08:49

    Virtualenv was already mentioned.

    And as your files are already under version control you could go one step further and use Pip to install your repo (or a specific branch or tag) into your working environment.

    See the docs for Pip's editable option:

    -e VCS+REPOS_URL[@REV]#egg=PACKAGE, --editable=VCS+REPOS_URL[@REV]#egg=PACKAGE
    

    Install a package directly from a checkout. Source will be checked out into src/PACKAGE (lower-case) and installed in-place (using setup.py develop).

    Now you can work on the files that pip automatically checked out for you and when you feel like it, you commit your stuff and push it back to the originating repository.

    To get a good, general overview concerning Pip and Virtualenv see this post: http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django

提交回复
热议问题