Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. The Local Package Cache
  2. #######################
  3. ``dds`` maintains a local cache of packages that it has obtained at the request
  4. 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 this package cache).
  7. Reading Repository Contents
  8. ***************************
  9. Most times, ``dds`` will manage the cache content silently, but it may be useful
  10. to see what ``dds`` is currently storing away.
  11. The content of the cache can be seen with the ``pkg ls`` subcommand::
  12. > dds pkg 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:`remote-pkgs`
  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 locally
  22. cached packages, as well as packages that are available from any
  23. :doc:`remote packages <remote-pkgs>`. If the dependency solution requires any
  24. packages that are not in the local cache, it will use the information in its
  25. catalog database to obtain a source distribution for each missing package. These
  26. source distributions will automatically be added to the local cache, and later
  27. dependency resolutions will not need to download that package again.
  28. This all happens automatically when a project is built: There is **no**
  29. "``dds install``" subcommand.
  30. Manually Downloading a Dependency
  31. =================================
  32. It may be useful to obtain a copy of the source distribution of a package
  33. from a remote. The ``pkg get`` command can be used to do this::
  34. > dds pkg get <name>@<version>
  35. This will obtain the source distribution of the package matching the given
  36. package ID and place that distribution in current working directory, using the
  37. package ID as the name of the source distribution directory::
  38. $ dds pkg get spdlog@1.4.2
  39. [ ... ]
  40. $ ls .
  41. .
  42. ..
  43. spdlog@1.4.2
  44. $ ls ./spdlog@1.4.2/
  45. include/
  46. src/
  47. library.json5
  48. package.json5
  49. .. _repo.import-local:
  50. Exporting a Project into the Repository
  51. ***************************************
  52. ``dds`` can only use packages that are available in the local cache. For
  53. packages that have a listing in the catalog, this is not a problem. But if one
  54. is developing a local package and wants to allow it to be used in another local
  55. package, that can be done by importing that project into the package cache as a
  56. regular package, as detailed in :ref:`sdist.import`::
  57. > dds pkg import /path/to/project
  58. This command will create a source distribution and place it in the local cache.
  59. The package is now available to other projects on the local system.
  60. .. note::
  61. This doesn't import in "editable" mode: A snapshot of the package root
  62. will be taken and imported to the local cache.