Skip to content

Commit

Permalink
Moved download related files to dedicated folder
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Jan 25, 2024
1 parent a310d31 commit 78e8493
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 32 deletions.
17 changes: 7 additions & 10 deletions libmamba/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,18 @@ set(
${LIBMAMBA_SOURCE_DIR}/validation/update_framework_v0_6.cpp
${LIBMAMBA_SOURCE_DIR}/validation/update_framework_v1.cpp
${LIBMAMBA_SOURCE_DIR}/validation/repo_checker.cpp
# C++ wrapping of libcurl
${LIBMAMBA_SOURCE_DIR}/core/curl.cpp
# C++ wrapping of compression libs (zstd and bzlib)
${LIBMAMBA_SOURCE_DIR}/core/compression.cpp
# Implementation of downloaders and mirrors
${LIBMAMBA_SOURCE_DIR}/download/compression.hpp
${LIBMAMBA_SOURCE_DIR}/download/compression.cpp
${LIBMAMBA_SOURCE_DIR}/download/curl.hpp
${LIBMAMBA_SOURCE_DIR}/download/curl.cpp
${LIBMAMBA_SOURCE_DIR}/download/downloader_impl.hpp
${LIBMAMBA_SOURCE_DIR}/download/downloader.cpp
# Core API (low-level)
${LIBMAMBA_SOURCE_DIR}/core/singletons.cpp
${LIBMAMBA_SOURCE_DIR}/core/activation.cpp
${LIBMAMBA_SOURCE_DIR}/core/channel_context.cpp
${LIBMAMBA_SOURCE_DIR}/core/context.cpp
${LIBMAMBA_SOURCE_DIR}/core/download.cpp
${LIBMAMBA_SOURCE_DIR}/core/download_progress_bar.cpp
${LIBMAMBA_SOURCE_DIR}/core/environments_manager.cpp
${LIBMAMBA_SOURCE_DIR}/core/error_handling.cpp
Expand Down Expand Up @@ -325,7 +327,6 @@ set(
${LIBMAMBA_INCLUDE_DIR}/mamba/core/channel_context.hpp
${LIBMAMBA_INCLUDE_DIR}/mamba/core/palette.hpp
${LIBMAMBA_INCLUDE_DIR}/mamba/core/context.hpp
${LIBMAMBA_INCLUDE_DIR}/mamba/core/download.hpp
${LIBMAMBA_INCLUDE_DIR}/mamba/core/download_progress_bar.hpp
${LIBMAMBA_INCLUDE_DIR}/mamba/core/environments_manager.hpp
${LIBMAMBA_INCLUDE_DIR}/mamba/core/error_handling.hpp
Expand Down Expand Up @@ -388,10 +389,6 @@ set(
${LIBMAMBA_SOURCE_DIR}/solv-cpp/solver.hpp
${LIBMAMBA_SOURCE_DIR}/solv-cpp/repo.hpp
${LIBMAMBA_SOURCE_DIR}/solv-cpp/transaction.hpp
# C++ wrapping of compression libs (zstd and bzlib)
${LIBMAMBA_SOURCE_DIR}/core/compression.hpp
# C++ wrapping of libcurl
${LIBMAMBA_SOURCE_DIR}/core/curl.hpp
)

# Targets and link
Expand Down
2 changes: 1 addition & 1 deletion libmamba/include/mamba/core/download_progress_bar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <vector>

#include "mamba/core/context.hpp"
#include "mamba/core/download.hpp"
#include "mamba/core/package_fetcher.hpp"
#include "mamba/download/downloader.hpp"

namespace mamba
{
Expand Down
4 changes: 2 additions & 2 deletions libmamba/include/mamba/core/package_fetcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

#include <functional>

#include "mamba/core/download.hpp"
#include "mamba/core/package_cache.hpp"
#include "mamba/core/package_handling.hpp"
#include "mamba/core/package_info.hpp"
#include "mamba/core/thread_utils.hpp"
#include "mamba/specs/package_info.hpp"
#include "mamba/download/downloader.hpp"

namespace mamba
{
Expand Down
2 changes: 1 addition & 1 deletion libmamba/include/mamba/core/subdirdata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#include <nlohmann/json_fwd.hpp>

#include "mamba/core/download.hpp"
#include "mamba/core/error_handling.hpp"
#include "mamba/core/package_cache.hpp"
#include "mamba/core/util.hpp"
#include "mamba/download/downloader.hpp"
#include "mamba/fs/filesystem.hpp"

namespace mamba
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//
// The full license is in the file LICENSE, distributed with this software.

#ifndef MAMBA_CORE_DOWNLOAD_HPP
#define MAMBA_CORE_DOWNLOAD_HPP
#ifndef MAMBA_DL_DOWNLOADER_HPP
#define MAMBA_DL_DOWNLOADER_HPP

#include <functional>
#include <optional>
Expand Down
3 changes: 3 additions & 0 deletions libmamba/src/api/channel_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "mamba/core/pool.hpp"
#include "mamba/core/prefix_data.hpp"
#include "mamba/core/subdirdata.hpp"
#include "mamba/download/downloader.hpp"
#include "mamba/solver/libsolv/repo_info.hpp"

namespace mamba
Expand Down Expand Up @@ -111,6 +112,8 @@ namespace mamba
ctx,
pool.channel_context(),
channel,
// platform,
// channel.platform_url(platform).str(specs::CondaURL::Credentials::Show),
package_caches,
subdirs,
error_list,
Expand Down
2 changes: 1 addition & 1 deletion libmamba/src/api/install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "mamba/core/activation.hpp"
#include "mamba/core/channel_context.hpp"
#include "mamba/core/context.hpp"
#include "mamba/core/download.hpp"
#include "mamba/core/env_lockfile.hpp"
#include "mamba/core/environments_manager.hpp"
#include "mamba/core/output.hpp"
Expand All @@ -27,6 +26,7 @@
#include "mamba/core/solver.hpp"
#include "mamba/core/transaction.hpp"
#include "mamba/core/virtual_packages.hpp"
#include "mamba/download/downloader.hpp"
#include "mamba/fs/filesystem.hpp"
#include "mamba/util/path_manip.hpp"
#include "mamba/util/string.hpp"
Expand Down
2 changes: 1 addition & 1 deletion libmamba/src/core/mirror.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "mamba/util/string.hpp"
#include "mamba/util/url_manip.hpp"

#include "curl.hpp"
#include "../download/curl.hpp"

namespace mamba
{
Expand Down
3 changes: 1 addition & 2 deletions libmamba/src/core/package_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
#include "mamba/util/string.hpp"
#include "mamba/validation/tools.hpp"

#include "../download/compression.hpp"
#include "nlohmann/json.hpp"

#include "compression.hpp"

namespace mamba
{
ExtractOptions ExtractOptions::from_context(const Context& context)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//
// The full license is in the file LICENSE, distributed with this software.

#ifndef MAMBA_COMPRESSION_HPP
#define MAMBA_COMPRESSION_HPP
#ifndef MAMBA_DL_COMPRESSION_HPP
#define MAMBA_DL_COMPRESSION_HPP

#include <bzlib.h>
#include <zstd.h>
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions libmamba/src/core/curl.hpp → libmamba/src/download/curl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//
// The full license is in the file LICENSE, distributed with this software.

#ifndef MAMBA_CURL_HPP
#define MAMBA_CURL_HPP
#ifndef MAMBA_DL_CURL_HPP
#define MAMBA_DL_CURL_HPP

#include <map>
#include <optional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
//
// The full license is in the file LICENSE, distributed with this software.

#include "mamba/core/download.hpp"
#include "mamba/core/invoke.hpp"
#include "mamba/core/thread_utils.hpp"
#include "mamba/core/util.hpp"
#include "mamba/core/util_scope.hpp"
#include "mamba/download/downloader.hpp"
#include "mamba/util/build.hpp"
#include "mamba/util/environment.hpp"
#include "mamba/util/iterator.hpp"
Expand All @@ -17,7 +17,7 @@
#include "mamba/util/url_manip.hpp"

#include "curl.hpp"
#include "download_impl.hpp"
#include "downloader_impl.hpp"

namespace mamba
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
//
// The full license is in the file LICENSE, distributed with this software.

#ifndef MAMBA_CORE_DOWNLOAD_IMPL_HPP
#define MAMBA_CORE_DOWNLOAD_IMPL_HPP
#ifndef MAMBA_DL_DOWNLOADER_IMPL_HPP
#define MAMBA_DL_DOWNLOADER_IMPL_HPP

#include <chrono>
#include <unordered_map>

#include "mamba/core/download.hpp"
#include "mamba/download/downloader.hpp"

#include "compression.hpp"
#include "curl.hpp"
Expand Down
5 changes: 3 additions & 2 deletions libmamba/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ set(
src/validation/test_tools.cpp
src/validation/test_update_framework_v0_6.cpp
src/validation/test_update_framework_v1.cpp
# The un-triaged rest
# Implementation of downloaders and mirrors
src/download/test_downloader.cpp
# Core tests
../longpath.manifest
src/core/test_activation.cpp
src/core/test_channel_context.cpp
src/core/test_configuration.cpp
src/core/test_cpp.cpp
src/core/test_downloader.cpp
src/core/test_env_file_reading.cpp
src/core/test_environments_manager.cpp
src/core/test_history.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <doctest/doctest.h>

#include "mamba/core/download.hpp"
#include "mamba/download/downloader.hpp"

#include "mambatests.hpp"

Expand Down

0 comments on commit 78e8493

Please sign in to comment.