Distribute Non Library

N

narke

My simple tool writing in python get bigger and bigger and I think I'd
better split my code into several files. But, unlike what in some other
languages, there is no way to compile these several files into a single
executable. Before I splitting my simple tool program, I just put it in
/usr/local/bin and run, very simple. Now I have to consider distribute
a lot of files in a whole. I know distutils can help, but I feel it is
a little uncomfortable, since I am not sharing a library, I am not
sharing any thing. I just want to refactory my code. Is there a better
solution to my case? Can I simply create a directory in /usr/local/bin
and put my script and other used files into the directory? Does
distutils help in this case?

Thanks in advance.
 
G

Glazner

My simple tool writing in python get bigger and bigger and I think I'd
better split my code into several files.  But, unlike what in some other
languages, there is no way to compile these several files into a single
executable. Before I splitting my simple tool program, I just put it in
/usr/local/bin and run, very simple.  Now I have to consider distribute
a lot of files in a whole.  I know distutils can help, but I feel it is
a little uncomfortable, since I am not sharing a library, I am not
sharing any thing. I just want to refactory my code.  Is there a better
solution to my case?  Can I simply create a directory in /usr/local/bin
and put my script and other used files into the directory?  Does
distutils help in this case?

Thanks in advance.

try :
python mayApp.zip

myApp.zip <--> all your files + a __main__.py file as a starting
point...
 
D

Diez B. Roggisch

narke said:
My simple tool writing in python get bigger and bigger and I think I'd
better split my code into several files. But, unlike what in some other
languages, there is no way to compile these several files into a single
executable. Before I splitting my simple tool program, I just put it in
/usr/local/bin and run, very simple. Now I have to consider distribute
a lot of files in a whole. I know distutils can help, but I feel it is
a little uncomfortable, since I am not sharing a library, I am not
sharing any thing. I just want to refactory my code. Is there a better
solution to my case? Can I simply create a directory in /usr/local/bin
and put my script and other used files into the directory? Does
distutils help in this case?

Consider using setuptools + console entry points. With these, you will
automatically generate a shell-script to execute for your otherwise
eggified and easy installable package.

Diez
 
C

CM

My simple tool writing in python get bigger and bigger and I think I'd
better split my code into several files.  But, unlike what in some other
languages, there is no way to compile these several files into a single
executable.

Sure there is. py2exe, py2app, cx_freeze, etc.
 
N

narke

Consider using setuptools + console entry points. With these, you will
automatically generate a shell-script to execute for your otherwise
eggified and easy installable package.

Diez

That's really attracting. I will try, thanks!

--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

narke
test post
 
N

narke

Sure there is. py2exe, py2app, cx_freeze, etc.

Also good solution! Thanks for the help. And, cx_freeze looks even
workable on my Linux. Great.

--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

narke
test post
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top