You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

source-dists.rst 1.8KB

5 yıl önce
5 yıl önce
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Source Distributions
  2. ####################
  3. A *source distribution* is ``dds``'s primary format for consuming and
  4. distributing packages. A source distribution, in essence, is a
  5. :ref:`package root <pkgs.pkg-root>` directory that contains only the files
  6. necessary for ``dds`` to reproduce the full build of all libraries in the
  7. package. The source distribution retains the directory structure of every
  8. :ref:`source root <pkgs.source-root>` of the original package, and thus retains
  9. the header structure thereof. In this way, the ``#include`` directives to use
  10. a library in a source distribution are identical to if the libraries therein
  11. were directly part of the consuming project.
  12. Generating a Source Distribution
  13. ********************************
  14. Generating a source distribution from a project directory is done with the
  15. ``sdist`` subcommand::
  16. > dds sdist create
  17. The above command can be executed within any package root, and the result will
  18. be a new directory that reproduces the package's filesystem structure, but
  19. only maintaining the files that are necessary for ``dds`` to reproduce the
  20. build of that package.
  21. The ``--project=<dir>`` flag can be provided to override the directory that
  22. ``dds`` will use as the package root. The default is the working directory of
  23. the project.
  24. The ``--out=<path>`` flag can be provided to override the destination path of
  25. the resulting source distribution. The path should not name an existing file or
  26. directory. By default, ``dds`` will generate a source distribution in the
  27. working directory with the name ``project.dsd/`` (The output is itself a
  28. directory, not an archive). If the ``--replace`` flag is provided, then ``dds``
  29. will overwrite the destination if it names an existing file or directory.
  30. Exporting a Package to the Local Repository
  31. *******************************************
  32. .. seealso:: :ref:`repo.export-local`