Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

47 lines
1.9KB

  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>` archive 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 a
  10. library in a source distribution are identical to if the libraries therein were
  11. 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 a package root, and the result will be
  18. a gzip'd tar archive that reproduces the package's filesystem structure, but
  19. only maintaining the files that are necessary for ``dds`` to reproduce a build
  20. 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 archive. The path should not name an existing file or directory. By default,
  26. ``dds`` will generate a source distribution in the working directory with the
  27. pattern ``<name>@<version>.tar.gz``. If the ``--replace`` flag is provided,
  28. then ``dds`` will overwrite the destination if it names an existing file or
  29. directory.
  30. Importing a Source Ditsribution
  31. *******************************
  32. Given a source distribution archive, one can import the package into the local
  33. repository with a single command::
  34. > dds repo import some-package@1.2.3.tar.gz