How to work on a package

Rob Gaddi rgaddi at highlandtechnology.invalid
Wed Feb 7 18:46:58 EST 2018


On 02/07/2018 03:17 PM, Grant Edwards wrote:
> On 2018-02-07, Rob Gaddi <rgaddi at highlandtechnology.invalid> wrote:
> 
>> When I'm working on a module, the trick is to write a setup.py (using
>> setuptools) from the very get-go.  Before I write a single line of code,
>> I've got a setup.py and the directory framework.
>>
>> Then you install the package using pip -e (or in practice --user -e).
>> That's the missing piece.  That way you can import your module from the
>> interpreter, because it's now on the path, but its physical location is
>> right there where you left it, complete with your VCS metadata and etc.
> 
> How do you work on a package that must remain installed and usable the
> whole time you're working on it?
> 
> IOW, only specific test apps or apps run in a specific directory
> should get the "in-progress" foo module when they do an "import foo".
> 

Achievable with a virtualenv, but now the process is even that much more 
complicated.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.



More information about the Python-list mailing list