Py2app : Différence entre versions

Un article de Informaticiens département des sciences de la Terre et l'atmosphère
Aller à: navigation, charcher
 
Ligne 13: Ligne 13:
 
==  Installing with easy_install ==
 
==  Installing with easy_install ==
  
  To install py2app using easy_install you must make sure you have a recent version of distribute installed (as of this writing, 0.6b4 or later):
+
  '''To install py2app using easy_install you must make sure you have a recent version of distribute installed (as of this writing, 0.6b4 or later):'''
  
 
  $ curl -O http://python-distribute.org/distribute_setup.py
 
  $ curl -O http://python-distribute.org/distribute_setup.py
 
  $ python ez_setup.py -U distribute
 
  $ python ez_setup.py -U distribute
 
'''
 
'''
'''To install or upgrade to the latest released version of py2app:''''
+
'To install or upgrade to the latest released version of py2app:''''
  
 
  $ easy_install -U py2app
 
  $ easy_install -U py2app
Ligne 24: Ligne 24:
 
''' If you install into a system installation of Python you might need additional privileges, you can use the sudo commando to get those:''''
 
''' If you install into a system installation of Python you might need additional privileges, you can use the sudo commando to get those:''''
  
$ sudo easy_install -U py2app
+
$ sudo easy_install -U py2app
Installing from source
+
To install py2app from source, simply use the normal procedure for installing any Python package. Since py2app uses distribute, all dependencies (including distribute itself) will be automatically acquired and installed for you as appropriate:
+
'''''' Installing from source'''
 
+
  To install py2app from source, simply use the normal procedure for installing any Python package. Since py2app uses distribute, all dependencies (including distribute itself) will be automatically acquired and installed for you as appropriate:
 +
'''
 
$ python setup.py install
 
$ python setup.py install
If you’re using a svn checkout, it’s recommended to use the distribute develop command, which will simply activate py2app directly from your source directory. This way you can do a svn up or make changes to the source code without re-installing every time:
+
 +
'''If you’re using a svn checkout, it’s recommended to use the distribute develop command, which will simply activate py2app directly from your source directory. This way you can do a svn up or make changes to the source code without re-installing every time:'''
  
$ python setup.py develop
+
$ python setup.py develop
Upgrade Notes
+
'''Upgrade Notes
The setup.py template has changed slightly in py2app 0.3 in order to accommodate the enhancements brought on by distribute. Old setup.py scripts look like this:
+
The setup.py template has changed slightly in py2app 0.3 in order to accommodate the enhancements brought on by distribute. Old setup.py scripts look like this:'''
  
from distutils.core import setup
+
from distutils.core import setup
import py2app
+
import py2app
  
setup(
+
setup(
 
     app=["myscript.py"],
 
     app=["myscript.py"],
)
+
)
New py2app scripts should look like this:
+
New py2app scripts should look like this:
  
from setuptools import setup
+
from setuptools import setup
setup(
+
setup(
 
     app=["myscript.py"],
 
     app=["myscript.py"],
 
     setup_requires=["py2app"],
 
     setup_requires=["py2app"],
)
+
)

Version actuelle datée du 22 de janvier 2015 à 22:11

'Installation¶'

Installing with pip

To installp py2app using pip, or to upgrade to the latest released version of py2app:
$ pip install -U py2app ==
If you install into a system installation of Python you might need additional privileges, you can use the sudo commando to get those:
$ sudo pip install -U py2app


Installing with easy_install

To install py2app using easy_install you must make sure you have a recent version of distribute installed (as of this writing, 0.6b4 or later):
$ curl -O http://python-distribute.org/distribute_setup.py
$ python ez_setup.py -U distribute

'To install or upgrade to the latest released version of py2app:'

$ easy_install -U py2app

If you install into a system installation of Python you might need additional privileges, you can use the sudo commando to get those:'

$ sudo easy_install -U py2app

' Installing from source

 To install py2app from source, simply use the normal procedure for installing any Python package. Since py2app uses distribute, all dependencies (including distribute itself) will be automatically acquired and installed for you as appropriate:

$ python setup.py install

If you’re using a svn checkout, it’s recommended to use the distribute develop command, which will simply activate py2app directly from your source directory. This way you can do a svn up or make changes to the source code without re-installing every time:
$ python setup.py develop
Upgrade Notes
The setup.py template has changed slightly in py2app 0.3 in order to accommodate the enhancements brought on by distribute. Old setup.py scripts look like this:
from distutils.core import setup
import py2app
setup(
   app=["myscript.py"],
)
New py2app scripts should look like this:
from setuptools import setup
setup(
   app=["myscript.py"],
   setup_requires=["py2app"],
)