Directory Structure for Distutils

  • Thread starter Thomas =?ISO-8859-15?Q?G=FCttler?=
  • Start date
T

Thomas =?ISO-8859-15?Q?G=FCttler?=

Hi!

What is the best directory structure for python modules?

I want to install a script called pyla into /usr/bin/pyla

The script pyla imports several methods and classes from a
module called pyla.

Up to would like to do it like this

pyla/
pyla/setup.py
pyla/dist (created by distutils)
pyla/pyla/__init__.py # This should be in site-packages/pyla
pyla/pyla/foo.py
pyla/pyla # Script for /usr/bin cannot be called like this
# because directory pyla exists.

Would be nice if there was a "prefered" directory strucuture
in the documentation of distutils. This should include
doc/, man/, etc/, ...

What does your directory strutures look like?

thomas
 
T

Thomas =?ISO-8859-15?Q?G=FCttler?=

Thomas said:
Hi!

What is the best directory structure for python modules?

...

(Replying to myself)

I downloaded the source of distutils and took it as an example.

One thing is still unclear:
How can I copy non python files into the destination?
There is a directory called "gif" which needs to be in the
directory of the my module.


thomas
 
P

Peter Klyushkin

Hello, Thomas!

TG> (Replying to myself)

TG> I downloaded the source of distutils and took it as an example.

TG> One thing is still unclear: How can I copy non python files into
TG> the destination? There is a directory called "gif" which needs
TG> to be in the directory of the my module.

Take a look at ResourcePackage. It isn't exactly what you want but it
is exactly for your purpose.

TG> thomas
 
T

Thomas =?ISO-8859-15?Q?G=FCttler?=

Peter said:
Hello, Thomas!



TG> One thing is still unclear: How can I copy non python files into
TG> the destination? There is a directory called "gif" which needs
TG> to be in the directory of the my module.

Take a look at ResourcePackage. It isn't exactly what you want but it
is exactly for your purpose.

Hi Peter,

Thank you for this link, but I don't want the images to become
python source.

Still looking for a solution ...

thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top