[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ideal directory structure?



On 30/01/10 20:12, Guy Hulbert wrote:
appending lib to everything is really ugly* ... is it because

./appname.py
./appname/__init__.py

fails to work ?

[*] And the debian perl group pre-pend 'lib' to all the packaged perl
modules so you'd have libappnamelib-V.deb
Yes. I asked this question before it fails to work.

Anyway, thank you all for your very useful feedback. Lots has been clarified.

Guy wrote:
It is useful to be able to run a package without installing it for development and testing.
Yes. Exactly.

So, there seem to be two alternate ways of going about this:

1. suffix lib to the package and run ./foo as you would and develop without installing each time. 2. don't suffix lib, but put the executable in foo/bin/ then use Severin's solution.

I think the second is better.

First, I agree with Guy that foolib doesn't sound good to me. It might even be wrong to call it foolib, because a library (to me) does something useful that is useful to more than one program. However, my foolib will have 99.9% of my code. foolib _is_ my program, it's not a library. foo simply starts the whole process - parses command line options, initiates classes and calls the appropriate methods.

Secondly, Severin's solution seems elegant to me. All the dirty work is hidden in a .sh file, and not in python code, which would bring in unnecessary stuff. Since I will only add it in MANIFEST.in, it will appear in the setup.py sdist, but not with setup.py install and ∴not in my debian package either. Extremely convenient.

The initial discussion about Setuptools and autoconf went over my head. Maybe I'll come back to read that when I am more experienced.

Thank you all, again!

Umang


Reply to: