()                                                                          ()



NNAAMMEE
        -

AABBOOUUTT
       This  is a plugin for setuptools that enables git integration. Once in‐
       stalled, Setuptools can be told to include in  a  package  distribution
       all the files tracked by git. This is an alternative to explicit inclu‐
       sion specifications with MMAANNIIFFEESSTT..iinn.

       A package distribution here refers to a package that you  create  using
       setup.py, for example:

          $> python setup.py sdist
          $> python setup.py bdist_rpm
          $> python setup.py bdist_egg

       This  package  was formerly known as gitlsfiles. The name change is the
       result of an effort by the setuptools plugin developers  to  provide  a
       uniform naming convention.

IINNSSTTAALLLLAATTIIOONN
       With easy_install:

          $> easy_install setuptools_git

       Alternative manual installation:

          $> tar -zxvf setuptools_git-X.Y.Z.tar.gz
          $> cd setuptools_git-X.Y.Z
          $> python setup.py install

       Where X.Y.Z is a version number.

UUSSAAGGEE
       To activate this plugin, you must first package your python module with
       sseettuupp..ppyy and use setuptools. The  former  is  well  documented  in  the
       _d_i_s_t_u_t_i_l_s _m_a_n_u_a_l.

       To use setuptools instead of distutils, just edit sseettuupp..ppyy and change:

          from distutils.core import setup

       to:

          from setuptools import setup, find_packages

       When  Setuptools  builds a source package, it always includes all files
       tracked by your revision control system, if it knows how to learn  what
       those files are.

       When  Setuptools builds a binary package, you can ask it to include all
       files tracked by your revision control system, by adding these argument
       to your invocation of _s_e_t_u_p_(_):

          setup(...,
                packages=find_packages(),
                include_package_data=True,
                ...)

       which  will  detect  that  a  directory  is  a package if it contains a
       ____iinniitt____..ppyy file.  Alternatively, you can do without ____iinniitt____..ppyy  files
       and tell Setuptools explicitly which packages to process:

          setup(...,
                packages=["a_package", "another_one"],
                include_package_data=True,
                ...)

       This plugin lets setuptools know what files are tracked by your git re‐
       vision control tool.  Setuptools ships with support for cvs and subver‐
       sion.   Other plugins like this one are available for bzr, darcs, mono‐
       tone, mercurial, and many others.

       It might happen that you track files with your revision control  system
       that you don't want to include in your packages.  In that case, you can
       prevent setuptools from packaging those files with a directive in  your
       MMAANNIIFFEESSTT..iinn, for example:

          exclude .gitignore
          recursive-exclude images *.xcf *.blend

       In  this  example,  we prevent setuptools from packaging ..ggiittiiggnnoorree and
       the Gimp and Blender source files found under the iimmaaggeess directory.

       Files to exclude from the package can also be listed in the _s_e_t_u_p_(_) di‐
       rective.  To do the same as the MANIFEST.in above, do:

          setup(...,
                exclude_package_data={'': ['.gitignore'],
                                      'images': ['*.xcf', '*.blend']},
                ...)

       Here is another example:

          setup(...,
                exclude_package_data={'': ['.gitignore', 'artwork/*'],
                                      'model': ['config.py']},
                ...)

GGOOTTCCHHAASS
       Be  aware  that  for  this  module  to  work  properly, git and the git
       meta-data must be available. That means that if someone tries to make a
       package distribution out of a non-git distribution of yours, say a tar‐
       ball, setuptools will lack the  information  necessary  to  know  which
       files  to include. A similar problem will happen if someone clones your
       git repository but does not install this plugin.

       Resolving those problems is out of the scope of this plugin; you should
       add  relevant  warnings to your documentation if those situations are a
       concern to you.

       You can make sure that anyone who clones your git repository  and  uses
       your setup.py file has this plugin by adding a _s_e_t_u_p___r_e_q_u_i_r_e_s argument:

          setup(...,
                setup_requires=[ "setuptools_git >= 0.3", ],
                ...)

CCHHAANNGGEESS
   11..22;; 22001177--0022--1177
          • Add    ability    to    get    version    from    git    tags   (‐
            _h_t_t_p_s_:_/_/_g_i_t_h_u_b_._c_o_m_/_m_s_a_b_r_a_m_o_/_s_e_t_u_p_t_o_o_l_s_-_g_i_t_/_p_u_l_l_/_9)

          • Return  early  if  a   directory   isn't   managed   by   git   (‐
            _h_t_t_p_s_:_/_/_g_i_t_h_u_b_._c_o_m_/_m_s_a_b_r_a_m_o_/_s_e_t_u_p_t_o_o_l_s_-_g_i_t_/_p_u_l_l_/_1_0)

          • Support              universal              wheels              (‐
            _h_t_t_p_s_:_/_/_g_i_t_h_u_b_._c_o_m_/_m_s_a_b_r_a_m_o_/_s_e_t_u_p_t_o_o_l_s_-_g_i_t_/_p_u_l_l_/_1_1)

          • Optimize  directory  scanning  to  skip  ignored  directories   (‐
            _h_t_t_p_s_:_/_/_g_i_t_h_u_b_._c_o_m_/_m_s_a_b_r_a_m_o_/_s_e_t_u_p_t_o_o_l_s_-_g_i_t_/_p_u_l_l_/_1_2)

RREEFFEERREENNCCEESS
       • _H_o_w _t_o _d_i_s_t_r_i_b_u_t_e _P_y_t_h_o_n _m_o_d_u_l_e_s _w_i_t_h _D_i_s_t_u_t_i_l_s

       • _S_e_t_u_p_t_o_o_l_s _c_o_m_p_l_e_t_e _m_a_n_u_a_l

       Thanks  to  _Z_o_o_k_o _O_'_W_h_i_e_l_a_c_r_o_n_x for many improvements to the documenta‐
       tion.



                                                                            ()
