Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

93 lines
3.1KB

  1. The Local Package Repository
  2. ############################
  3. ``dds`` maintains a local repository of packages that it has obtained at the
  4. request of a user. The packages themselves are stored as
  5. :doc:`source distributions <source-dists>` (``dds`` does not store the binaries
  6. that it builds within the repository).
  7. Reading Repository Contents
  8. ***************************
  9. Most times, ``dds`` will manage the repository content silently, but it may be
  10. useful to see what ``dds`` is currently storing away.
  11. The content of the repostiory can be seen with the ``repo`` subcommand::
  12. > dds repo ls
  13. This will print the names of packages that ``dds`` has downloaded, as well as
  14. the versions of each.
  15. Obtaining Packages
  16. ******************
  17. .. seealso:: See also: :doc:`catalog`
  18. When ``dds`` builds a package, it will also build the dependency libraries of
  19. that package. In order for the dependency build to succeed, it must have a
  20. local copy of the source distribution of that dependency.
  21. When ``dds`` performs dependency resolution, it will consider both existing
  22. packages in the local repository, as well as packages that are available from
  23. the :doc:`package catalog <catalog>`. If the dependency solution requires any
  24. packages that are not in the local repository, it will use the information in
  25. the catalog to obtain a source distribution for each missing package. These
  26. source distributions will automatically be added to the local repository, and
  27. later dependency resolutions will not need to download that package again.
  28. Manually Downloading a Dependency
  29. =================================
  30. It may be useful to obtain a copy of the source distribution of a package
  31. contained in the catalog. The ``catalog get`` command can be used to do this::
  32. > dds catalog get <name>@<version>
  33. This will obtain the source distribution of the package matching the named
  34. identifier and place that distribution in current working directory, using the
  35. package ID as the name of the source distribution directory::
  36. $ dds catalog get spdlog@1.4.2
  37. [ ... ]
  38. $ ls .
  39. .
  40. ..
  41. spdlog@1.4.2
  42. $ ls ./spdlog@1.4.2/
  43. include/
  44. src/
  45. library.dds
  46. package.dds
  47. .. _repo.export-local:
  48. Exporting a Project into the Repository
  49. ***************************************
  50. ``dds`` can only use packages that are available in the local repository. For
  51. packages that have a listing in the catalog, this is not a problem. But if one
  52. is developing a local package and wants to allow it to be used in another local
  53. package, that can be done by exporting a source distribution from the package
  54. root::
  55. > dds sdist export
  56. This command will create a source distribution and place it in the local
  57. repository. The package is now available to other projects on the local system.
  58. .. note::
  59. This doesn't export in "editable" mode: A snapshot of the package root
  60. will be taken and exported to the local repository.
  61. If one tries to export a package root into a repository that already contains
  62. a package with a matching identifier, ``dds`` will issue an error. If the
  63. ``--replace`` flag is specified with ``sdist export``, then ``dds`` will
  64. forcibly replace the package in the local repository with a new copy.