|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
||||
|
||||
|
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. |
|
#2
|
|||
|
|||
|
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.
|
|
#4
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Create Installer for Python code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|