Lines Matching +full:- +full:- +full:file
1 .. _source-dist:
9 As shown in section :ref:`distutils-simple-example`, you use the :command:`sdist` command
15 or config file), :command:`sdist` creates the archive of the default format for
16 the current platform. The default format is a gzip'ed tar file
17 (:file:`.tar.gz`) on Unix, and ZIP file on Windows.
19 You can specify as many formats as you like using the :option:`!--formats`
22 python setup.py sdist --formats=gztar,zip
24 to create a gzipped tarball and a zip file. The available formats are:
26 +-----------+-------------------------+-------------+
29 | ``zip`` | zip file (:file:`.zip`) | (1),(3) |
30 +-----------+-------------------------+-------------+
31 | ``gztar`` | gzip'ed tar file | \(2) |
32 | | (:file:`.tar.gz`) | |
33 +-----------+-------------------------+-------------+
34 | ``bztar`` | bzip2'ed tar file | \(5) |
35 | | (:file:`.tar.bz2`) | |
36 +-----------+-------------------------+-------------+
37 | ``xztar`` | xz'ed tar file | \(5) |
38 | | (:file:`.tar.xz`) | |
39 +-----------+-------------------------+-------------+
40 | ``ztar`` | compressed tar file | (4),(5) |
41 | | (:file:`.tar.Z`) | |
42 +-----------+-------------------------+-------------+
43 | ``tar`` | tar file (:file:`.tar`) | \(5) |
44 +-----------+-------------------------+-------------+
65 deprecated by `PEP 527 <https://peps.python.org/pep-0527/>`_;
74 python setup.py sdist --owner=root --group=root
92 .. XXX getting C library sources currently broken---no
93 :meth:`get_source_files` method in :file:`build_clib.py`!
96 See :ref:`distutils-installing-scripts`.
98 * anything that looks like a test script: :file:`test/test\*.py` (currently, the
103 * Any of the standard README files (:file:`README`, :file:`README.txt`,
104 or :file:`README.rst`), :file:`setup.py` (or whatever you called your setup
105 script), and :file:`setup.cfg`.
108 See :ref:`distutils-installing-package-data`.
111 See :ref:`distutils-additional-files`.
115 called :file:`MANIFEST.in` by default. The manifest template is just a list of
116 instructions for how to generate your manifest file, :file:`MANIFEST`, which is
121 If you prefer to roll your own manifest file, the format is simple: one filename
123 :file:`MANIFEST`, you must specify everything: the default set of files
127 An existing generated :file:`MANIFEST` will be regenerated without
129 :file:`MANIFEST.in` or :file:`setup.py`.
132 :file:`MANIFEST` files start with a comment indicating they are generated.
136 :command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in`
140 :file:`README.rst` is now included in the list of distutils standard READMEs.
147 .. code-block:: none
150 recursive-include examples *.txt *.py
154 matching :file:`\*.txt`, all files anywhere under the :file:`examples` directory
155 matching :file:`\*.txt` or :file:`\*.py`, and exclude all directories matching
156 :file:`examples/sample?/build`. All of this is done *after* the standard
159 :option:`!--no-defaults` option to disable the standard set entirely.) There are
160 several other commands available in the manifest template mini-language; see
161 section :ref:`sdist-cmd`.
169 * all files in the Distutils "build" tree (default :file:`build/`)
171 * all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`,
172 :file:`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`
178 :option:`!--no-defaults` option, and you can disable the standard exclude set
179 with :option:`!--no-prune`.
185 #. include all Python source files in the :file:`distutils` and
186 :file:`distutils/command` subdirectories (because packages corresponding to
188 setup script---see section :ref:`setup-script`)
190 #. include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` (standard
193 #. include :file:`test/test\*.py` (standard files)
195 #. include :file:`\*.txt` in the distribution root (this will find
196 :file:`README.txt` a second time, but such redundancies are weeded out later)
198 #. include anything matching :file:`\*.txt` or :file:`\*.py` in the sub-tree
199 under :file:`examples`,
201 #. exclude all files in the sub-trees starting at directories matching
202 :file:`examples/sample?/build`\ ---this may exclude files included by the
204 template comes after the ``recursive-include`` command
206 #. exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS`,
207 :file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` and :file:`_darcs`
210 Just like in the setup script, file and directory names in the manifest template
211 should always be slash-separated; the Distutils will take care of converting
216 .. _manifest-options:
218 Manifest-related options
223 * if the manifest file (:file:`MANIFEST` by default) exists and the first line
224 does not have a comment indicating it is generated from :file:`MANIFEST.in`,
227 * if the manifest file doesn't exist or has been previously automatically
228 generated, read :file:`MANIFEST.in` and create the manifest
230 * if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest
231 with just the default file set
233 * use the list of files now in :file:`MANIFEST` (either just generated or read
237 :option:`!--no-defaults` and :option:`!--no-prune` to disable the standard
243 python setup.py sdist --manifest-only
245 :option:`!-o` is a shortcut for :option:`!--manifest-only`.