Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - Building / making an application

 
Thread Tools Search this Thread
Old 08-02-2009, 08:21 PM   #1
Default Building / making an application


What is a good way to do this? There are instructions on making modules at:

http://docs.python.org/distutils/setupscript.html

however, what do you do if you don't want a module? I'm thinking of where
I'd like to split the code into several files and have a build / setup
script put it together and install it somewhere such as /usr/local/bin.
I'm interested in what the standard way of doing this is.

Thanks,

Pete



--
http://www.petezilla.co.uk


Peter Chant
  Reply With Quote
Old 08-02-2009, 08:32 PM   #2
Krishnakant
 
Posts: n/a
Default Re: Building / making an application
On Sun, 2009-08-02 at 20:21 +0100, Peter Chant wrote:
> What is a good way to do this? There are instructions on making modules at:
>
> http://docs.python.org/distutils/setupscript.html
>
> however, what do you do if you don't want a module? I'm thinking of where
> I'd like to split the code into several files and have a build / setup
> script put it together and install it somewhere such as /usr/local/bin.
> I'm interested in what the standard way of doing this is.
>

Have you considered creating a deb or rpm package for your application?
Most of the documentation for deb or rpm will talk about make files.
But even a distutil based python package (with a setup.py) can be made
into a deb package.
Then the your requirement will be satisfied at least for most gnu/linux
based distros.

happy hacking.
Krishnakant.





Krishnakant
  Reply With Quote
Old 08-02-2009, 09:00 PM   #3
Peter Chant
 
Posts: n/a
Default Re: Building / making an application
Krishnakant wrote:


> Have you considered creating a deb or rpm package for your application?
> Most of the documentation for deb or rpm will talk about make files.
> But even a distutil based python package (with a setup.py) can be made
> into a deb package.
> Then the your requirement will be satisfied at least for most gnu/linux
> based distros.


I'm a slacker, so what I would do would be to make a slack build, the
slackbuild would take the source and build that. The stage I am at is
the "how to build the source" stage. Don't really intend to get as far as
distribution specific packages.

What I could do is create a script in the source root directory (that sounds
a bit overblown) that simply concatenates together all the python files in
the right order and perhaps copies the result to /usr/local/bin or /usr/bin
as appropriate. Is that the right way to go? It looks like distutils is
appropriate only for modules.

OTOH it might be appropriate to put the bulk of an application in a module
and have a function calling it the only part of the main script.

Pete

--
http://www.petezilla.co.uk


Peter Chant
  Reply With Quote
Old 08-02-2009, 09:08 PM   #4
Diez B. Roggisch
 
Posts: n/a
Default Re: Building / making an application
Peter Chant schrieb:
> Krishnakant wrote:
>
>
>> Have you considered creating a deb or rpm package for your application?
>> Most of the documentation for deb or rpm will talk about make files.
>> But even a distutil based python package (with a setup.py) can be made
>> into a deb package.
>> Then the your requirement will be satisfied at least for most gnu/linux
>> based distros.

>
> I'm a slacker, so what I would do would be to make a slack build, the
> slackbuild would take the source and build that. The stage I am at is
> the "how to build the source" stage. Don't really intend to get as far as
> distribution specific packages.
>
> What I could do is create a script in the source root directory (that sounds
> a bit overblown) that simply concatenates together all the python files in
> the right order and perhaps copies the result to /usr/local/bin or /usr/bin
> as appropriate. Is that the right way to go? It looks like distutils is
> appropriate only for modules.
>
> OTOH it might be appropriate to put the bulk of an application in a module
> and have a function calling it the only part of the main script.


You should consider using setuptools. Then you get an egg that people
can install, and you can define "console_scripts"-entry-points which
will be installed into /usr/local/bin or similar locations.

Diez


Diez B. Roggisch
  Reply With Quote
Old 08-02-2009, 11:26 PM   #5
Peter Chant
 
Posts: n/a
Default Re: Building / making an application
Diez B. Roggisch wrote:


> You should consider using setuptools. Then you get an egg that people
> can install, and you can define "console_scripts"-entry-points which
> will be installed into /usr/local/bin or similar locations.


Interesting, I think I need to have a play with that. The cross platform
bit could be useful as well.

Pete

--
http://www.petezilla.co.uk


Peter Chant
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
standalone .net application jass Software 1 04-02-2009 03:11 AM
How to open Web Application pages (ASPX) in Windows application. arameshmca Software 1 02-07-2008 03:18 AM
Server Error in '/Forms' Application. AxleWack General Help Related Topics 0 10-11-2007 01:47 PM
How to revert file to unknown application perezla General Help Related Topics 1 09-12-2007 03:15 AM
ASP.NET with User Interface Process Application Block robinp Software 0 03-05-2007 10:01 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46