Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 13th, 2003, 04:48 PM
Gerardoj's Avatar
Gerardoj Gerardoj is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Somewhere over the Rainbow
Posts: 128 Gerardoj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 54 m 28 sec
Reputation Power: 10
Create Installer for Python code

Hi, I would like to Create an Installer for my Python code, I want to create something like makefile or install.sh to install it, what I need to do?, and how can I make RPM for my code?

Thanks a lot.

Reply With Quote
  #2  
Old November 14th, 2003, 09:50 AM
lazy_yogi lazy_yogi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 325 lazy_yogi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 58 m 36 sec
Reputation Power: 11
As far as I've known, make files are to compile code (generally keep up to date compilation of multi-file code). Python is interpreted, not complied.

Reply With Quote
  #3  
Old November 14th, 2003, 10:19 AM
percivall percivall is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 133 percivall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
You usually install python files by using distutils.

Reply With Quote
  #4  
Old November 14th, 2003, 06:30 PM
telex4's Avatar
telex4 telex4 is offline
Wacky hack
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 513 telex4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 38 m 37 sec
Reputation Power: 13
Or, if you want to just stick your app somewhere like /usr/share/yourapp, you can create a simple install shell script like so:

Code:
#!/bin/sh
# Install script for YourApp

echo Checking for dependencies...

PYTHON=`which python`
if [ $PYTHON ]; then
	echo "python found at: $PYTHON"
else
	echo "python not found!"
	exit 1
fi

python -c "from qt import qVersion, PYQT_VERSION"
PYQT=$?
if [ $PYQT -eq 0 ]; then
	echo "PyQt found."
    #(sip found at: $PYQT)"
else
	echo "PyQt not found!"
	exit 1
fi

echo
echo Changing to root to install files

su -c "mkdir -p /usr/share/yourapp && cp *.py README LICENSE  /usr/share/yourapp && chmod a+x /usr/share/yourapp/yourapp.py && ln -sf /usr/share/yourapp/yourapp.py /usr/bin/yourapp && cp yourapp.1.gz /usr/man/man1"

echo
echo Here you can put some post-install hints
echo to pass on any necessary instructions, like
echo the name of the binary to run


That's a cannabalised version of my install script for QuickRip.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Create Installer for Python code

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap