Docs for the provided distutils commands
This commit is contained in:
parent
f91999ac49
commit
24d4e16cfa
58
doc/efl.rst
58
doc/efl.rst
|
@ -5,6 +5,7 @@
|
|||
|
||||
.. versionadded:: 1.8
|
||||
|
||||
|
||||
Logging
|
||||
-------
|
||||
|
||||
|
@ -36,6 +37,7 @@ And you may control the child loggers individually::
|
|||
.. versionadded:: 1.8
|
||||
Loggers
|
||||
|
||||
|
||||
Class properties
|
||||
----------------
|
||||
|
||||
|
@ -51,3 +53,59 @@ are not already used by the constructor, for example like this::
|
|||
|
||||
.. versionadded:: 1.8
|
||||
Using keyword arguments to set properties
|
||||
|
||||
|
||||
Distutils helpers for your setup.py
|
||||
-----------------------------------
|
||||
|
||||
.. versionadded:: 1.13
|
||||
|
||||
For your convenience **python-efl** provide some usefull `distutils
|
||||
<https://docs.python.org/2/distutils/>`_ Commands to be used in your
|
||||
**setup.py** script.
|
||||
|
||||
Provided commands are:
|
||||
* ``build_edc`` To build (using edje_cc) and install your application themes.
|
||||
* ``build_i18n`` To integrate the gettext framework.
|
||||
* ``build_fdo`` To install .desktop and icons as per FreeDesktop specifications.
|
||||
* ``uninstall`` To uninstall your app.
|
||||
* ``build_extra`` Adds the provided commands to the build target.
|
||||
|
||||
The usage is quite simple, just import and add them in your setup() cmdclass.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from distutils.core import setup
|
||||
from efl.utils.setup import build_edc, build_i18n, build_fdo
|
||||
from efl.utils.setup import build_extra, uninstall
|
||||
|
||||
setup(
|
||||
...
|
||||
cmdclass = {
|
||||
'build': build_extra,
|
||||
'build_edc': build_edc,
|
||||
'build_i18n': build_i18n,
|
||||
'build_fdo': build_fdo,
|
||||
'uninstall': uninstall,
|
||||
},
|
||||
command_options={
|
||||
'install': {'record': ('setup.py', 'installed_files.txt')}
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
The **install** option is required if you want to use the **uninstall** command.
|
||||
|
||||
The **build_extra** command is only used to automatically add all the other
|
||||
commands to the default build command, you probably always want it, unless
|
||||
you are providing your own yet.
|
||||
|
||||
Once you have added a command you can look at the help for more informations,
|
||||
for example::
|
||||
|
||||
python setup.py build_i18n --help
|
||||
|
||||
or more in general::
|
||||
|
||||
python setup.py --help-commands
|
||||
|
||||
|
|
Loading…
Reference in New Issue