Best Practices for Internal Package Structure
Ethan Furman
ethan at stoneleaf.us
Tue Apr 5 19:54:10 EDT 2016
On 04/05/2016 04:38 PM, Steven D'Aprano wrote:
> On Wed, 6 Apr 2016 04:40 am, Ethan Furman wrote:
>
>> Well, there should be one more module:
>>
>> test.py
>>
>> So in total, two files
>>
>> bidict/
>> |-- __init__.py
>> |-- test.py
>
>
> Your test code shouldn't necessarily be part of the package though. If I
> already have a package, then I will usually stick the test code inside it,
> but if I have a single module, I keep the test code in a separate file and
> don't bother installing it. It's there in the source repo for those who
> want it.
>
>
>> will do the trick. Oh, and you want a README, LICENSE, a doc file. And
>> that should do it. :)
>
> None of which ought to be part of the package itself. Well, perhaps the
> README.
If it's not part of the package, how does it get installed? And where?
(Honest question -- I find the packaging and distribution process
confusing at best.)
--
~Ethan~
More information about the Python-list
mailing list