Commit Graph

560 Commits

Author SHA1 Message Date
Hind-M 4604d390e9
Fix test_no_python_pinning (#3319) 2024-06-12 14:29:16 +02:00
Hind Montassif 45e4b7c8ba release libmamba 2.0.0beta2, libmambapy 2.0.0beta2, micromamba 2.0.0beta2 2024-06-07 10:21:19 +02:00
Hind-M 3e1e97b0e6
Add checking typos to pre-commit (#3278)
* Add checking typos to pre-commit

* Add missed corrections

* Add more corrections to doc
2024-05-27 09:16:14 +02:00
Johan Mabille 9006fb963b release libmamba 2.0.0beta1, libmambapy 2.0.0beta1, micromamba 2.0.0beta1 2024-05-04 17:16:21 +02:00
Johan Mabille a0d2333a03 release libmamba 2.0.0beta0, libmambapy 2.0.0beta0, micromamba 2.0.0beta0 2024-05-03 23:06:07 +02:00
Johan Mabille dcd777fbd1
Test with xtensor-python instead of unmaintained xframe (#3286)
Upgraded tests to use packages available on osx-arm64
2024-05-03 18:02:33 +02:00
Johan Mabille b5195d96b0 release libmamba 2.0.0beta0, libmambapy 2.0.0beta0, micromamba 2.0.0beta0 2024-04-04 09:29:13 +02:00
Antoine Prouvost 245de2009e
Update pre-commit hooks" (#3252)
* Update Pre-commit hooks

* Apply updated hook
2024-03-28 16:18:19 +01:00
Antoine Prouvost 327534724a
Refactor os utilities (#3248)
* Refactor make_virtual_package

* Refactor macos_version

* Add new windows_version

* Add __win virtual package version

* Use new util::windows_version

* Add virtual packages version test

* Add Plaform os detection

* Refactor linux_version

* Fix linux_version on mac with unix_name_version
2024-03-28 14:08:35 +01:00
Johan Mabille 3a31b8390a release libmamba 2.0.0alpha4, libmambapy 2.0.0alpha4, micromamba 2.0.0alpha4 2024-03-26 06:34:09 +01:00
Hind-M cad6793e21
[mamba-content-trust] Add integration test (#3234)
* -Fix trusted_channels in ctx not working with more than one item
-Add test for mamba-content-trust (mamba client side) using conda-content-trust (server side)
-Add missing install with pip (to fix)

* Remove repo_signed (supposed to be generated with testserver_pkg_signing.sh)

* Add MAMBA_ROOT_PREFIX to Taskfile.dist.yml
2024-03-20 10:58:29 +01:00
Antoine Prouvost 43e38efb18
Custom resolve complex MatchSpec in Solver (#3233)
* Add ObjPool::current_error

* Support reference_wrapper in MatchSpec::contains

* Rename subdir > platform in solv-cpp

* Add Matcher as namespace callback

* Add MatcherFlags

* Redefine MatchSpec::is_simple

* Add VersionSpec::from_predicate

* Refactor reinstall jobs

* Fix MatchSpec::is_simple

* Handle complex MatchSpec in solver

* Add version cache in Matcher

* Add more pool namespace tests

* Handle exception in ObjPool callback

* Try removing SOLVABLE_PROVIDES

* Add unsolvable complex spec test

* Fix Database callback exceptions

* Add channel in Matcher

* Adapt channel_specific tests

* Fix updates
2024-03-19 19:52:56 +01:00
Antoine Prouvost 02b36ba5a2
Mamba 2.0 name fixes (#3225)
* Change default mamba root prefix

* Name generic rc_file_content

* Refactor other rc content executable names

* Allow mamba name in sh shells

* Adapt test_activate.py to use mamba/micromamba name

* Allow mamba name in tcsh shells

* Fix micromamba names

* Rename extrac_subroc_mode::micromamba ? mamba_exe

* Rename is_micromamba > is_mamba_exe

* Change more micromamba names

* Fix test_shell.py

* Adapt mamba name in Win shell wrappers

* Adapt mamba name in Win powershell wrappers

* Remove an occurence of micromamba

* Fix wrap_call on Windows

* Deactivate failing test
2024-03-14 16:01:05 +01:00
Hind-M ce840bbf8c
[mamba content trust] Enable verifying packages signatures (#3192)
* Enable verifying packages signatures

* Remove post hook and use LOG_DEBUG instead of LOG_INFO

* Move getting "signatures" from `pkg_signatures` to `verify_package`

* Add tests for solvable and PackageInfo
Remove signatures from field in PackageInfo

* Add const and reorganize repo_checker
Add text in description for verify-package flag

* Add bindings and make `trusted_channels` configurable

* Define MAX_CONDA_TIMESTAMP

* Code review

* Add tests for add_repo_from_repodata_json in test_database

* Remove fake_signatures in favor of optional
2024-03-08 20:37:18 +01:00
Antoine Prouvost fd42d8dd8e
Subdir renaming (#3214)
* Rename PackageInfo::depends > dependencies

* Change BuildNumberSpec nuild number type

* Rename MatchSpec::subdirs > platforms

* Rename Platform > KnownPlatform

* Add DynamicPlatform alias

* Rename PackageInfo::subdir > platform

* Fix build platform

* Fix PackageInfo::platform on OSX
2024-03-05 16:31:54 +01:00
Antoine Prouvost 1f7b9de94f
Expected in specs parse API (#3207)
* Expected in CondaURL::parse

* Expected in Channel::resolve

* Expected in MatchSpec::parse

* Expected in MatchSpec::parse_url

* Return errors in exepcted in MatchSpec::parse

* Expected in PackageInfo::from_url
2024-03-04 14:27:04 +01:00
Johan Mabille 7da42636df release libmamba 2.0.0alpha3, libmambapy 2.0.0alpha3, micromamba 2.0.0alpha3 2024-02-28 06:09:54 +01:00
Johan Mabille 8f276cbefa
Added HTTP Mirrors (#3178)
* Added HTTP Mirrors

* Mirror mirror on the wall...

* True hope lies beyond the coast

* You're a damned kind can't you see

* That the winds will change

* Mirror mirror on the wall

* True hope lies beyond the coast

* You're a damned kind can't you see

* That tomorrow bears insanity
2024-02-27 18:47:30 +01:00
Antoine Prouvost 88748be956
Use expected for specs parsing (#3201)
* Expected in Version::parse

* Use boolean check in expr trees

* Expected in VersionSpec::parse

* Add assert caster safeguard

* Expected in BuildNumberSpec::parse

* Minor improvement in GlobSpec

* Expected in UnresolvedChannel::parse

* Expected in URL::parse
2024-02-27 09:35:27 +01:00
Antoine Prouvost 3a6d010e38
Remove unmaintained and broken pytest-lazy-fixture (#3193)
Remove pytest-lazy-fixtures
2024-02-19 13:31:52 -05:00
Antoine Prouvost d20d176b86
Rename MPool into solver::libsolv::Database (#3180)
* Move only MPool

* Rename MPool > Database

* Move Database to solver::libsolv

* Add missing explicit

* Rename pool in function names

* Rename core/pool.hpp package_database_loader
2024-02-08 16:41:11 +01:00
Antoine Prouvost a2a2d26445
Simplify MPool Interface (#3177)
* Remove some use to MPool::ChannelContext

* Explicit palette in UnSolvable

* Explicit option for use_only_tar_bz2 in Pool

* Remove context from Pool

* Remove Context capture in Pool

* Remove ChannelContext capture in Pool

* Silence warnings

* Chane Unsolvable to use solv::ObjPool

* Fine grain control of MPoll raw access

* Remove MPool::id2pkginfo

* Remove MPool::matchspec2id and select_solvables

* Remove MPool::dep2str

* Auto create_whatprovides in repoquery

* Remove MPool::create_whatprovides

* Change MPool::remove_repo API

* Private libsolv
2024-02-07 09:25:37 -05:00
Antoine Prouvost b3cb456764
Clean libsolv use in Transaction (#3171)
* Take by value and move in TransactionContext

* Refactor Transaction from Lockfile

* Refactor remove/install Transaction ctor

* Add MPool::for_each_package_in_repo

* Attempt fix forced remove

* Move Python search in MPool not ObjPool

* Use solver functions

* Move Solution post-processing to solver

* Remove Pool, Context, ChannelContext captrure from Transaction
2024-02-05 13:40:47 -05:00
Antoine Prouvost 23b90a9b73
Rewrite Query with Pool functions (wrapping libsolv) (#3168)
* Add MPool::for_each_package_matching

* Use MPool::for_each_package_matching in self-update

* Add test for pool.select_solvables

* Add MPool::for_each_package_depending_on

* Implement some queries with MPool

* Reorganize query.cpp

* Refactor Query Graph walk to not use libsolv

* Rewrite Query::whoneeds in PkgInfo space

* Remove unused functions

* Improve string param
2024-02-05 11:45:48 -05:00
Hind Montassif 6618349cba release libmamba 2.0.0alpha2, libmambapy 2.0.0alpha2, micromamba 2.0.0alpha2 2024-02-02 17:37:25 +01:00
Bela Stoyan 4075f0b58d
add manually given .tar.bz2 / .conda packages to solver pool (#3164)
* add packages to solver pool

* lint
2024-02-01 13:51:06 -05:00
Antoine Prouvost 9f1b5b7e06
Solver sort deps (#3163)
* Improve Solver::solve

* Add Solver request ordering

* Refactor context solver flags

* Add config option order_solver_request

* Fix config

* Change pin test expected solution

* Refactor custom variant comparison

* Add 2.0 order_solver_request doc
2024-01-31 16:21:29 -05:00
Antoine Prouvost dedf072874
Split Solver and Unsolvable (#3156)
* No capture MPool in Solver

* Solution in MSolver

* Change MTransaction solver ctor

* Split UnSolvable from MSolver

* Implement MSolver Outcome

* Private SolverProblem

* Move UnSolvable to solve::libsolv

* Move sat* solver::problems_graph

* Clean test_problems_graph

* Move MSolver to solver::libsolv

* Rename MSolver > Solver

* Add minimal 2.0 doc

* Bind solver::Solution

* Move problems_graph bindings to libmambapy.solver

* Change Solver namespace

* Move Solver bindings to libmambapy.solver.libsolv
2024-01-30 22:20:36 +01:00
Antoine Prouvost a190d9394c
Solver Request (#3141)
* Change type for MSolver::add_pin

* Add Solver Request 1

* Add Solver Request 2

* Add Solver Request 3

* Cleanup retry flags

* Remove constant parameter

* Add Solver Request 4

* Add Request::Freeze

* Add Request::Keep

* Add Request::UpdateAll

* Remove MSolver::add_global_job

* Use MSolver::add_request for remove

* Remove MSolver::add_jobs

* Remove MSolver::add_pins

* Add api/install pins in request

* Add api/update pins in request

* Remove MSolver::add_pin

* Remove dead MSovler neuter_specs & pinned_specs

* Move Request to solver::Request

* Bind solver::Request

* Apply review comments
2024-01-23 13:38:11 +01:00
Antoine Prouvost 81504b5614
Explcit transaction duplicate code (#3138)
* Add channel and subdir to PackageInfo::from_url

* Remove duplicate code
2024-01-18 11:03:38 +01:00
Antoine Prouvost 7d6856e9b5
MRepo refactor (#3118)
* Rename Enum members in MRepo

* use solv::Pool in MRepo

* Free MRepo add_pip_as_python_dependency

* Free MRepo repodata reading

* Free MRepo read_solv

* Free MRepo write_solv

* Remove MRepo constructor

* Remove MPool capture from MRepo

* Add missing pip dependency

* Refactor solv file serialization

* No lock on non-existant files

* Cleanup dead code

* write_solve create-directories

* Clean MRepo member functions

* Decouple MRepo and Pool

* Finetune Clang-format

* Add filename location to error

* Do not fail on solv file write

* Load new pool loader for repodata and .solv files

* Remove repo name in favor of URL

* Refactor MRepo index loading

* Fix SubDirData.writable_solv_cache

* Fix solv file loading

* Lock repodata.json while reading metadata

* Refactor expected in load_subdir_in_pool

* use expected in solver helpers

* Refactor helpers functions and error messages in Repo

* Add MPool::create_repo_from_packages

* Use load_installed_packages_in_pool

* Remove MRepo ctor

* Fix rebase

* Refactor MRepo::priority

* Update Taskfile realpath to work on MacOS

* Fix virtual packages being removed

* Move MRepo::priority to MPool

* Rename MRepo > solver::libsolv::RepoInfo

* Move RepoInfo parameters for its own library

* Move make_package_info to helpers

* Add libmambapy.solver.libsolv

* Add solver::libsolv::Priorities op

* Bind libsolv parameters

* Bind RepodataOrigin

* Merge libsolv/serialization and libsolv/parameters

* Bind new MPool methods

* Add RepoInfo op

* Add RepoInfo changes to log

* Rename attribute

* Remove RepoInfo::repo
2024-01-17 16:44:47 +01:00
Antoine Prouvost 0b5e2d013b
Refactor test_remove.py to use fixture (#3131)
* test_depends_local

* Fix test yaml_env

* Refactor TestRemove to use fixtures

* Refactor TestRemoveConfig to use fixtures
2024-01-16 17:51:36 +01:00
Antoine Prouvost 8e9b376161
Move util_random.hpp > util/random.hpp (#3129)
* Move util_random.hpp > util/random.hpp

* Use new random in libmamba

* Use template instanciation instead
2024-01-16 10:14:45 +01:00
Antoine Prouvost 717456890a
Move PackageInfo in specs:: (#3109)
* Move PackageInfo in specs::

* Move PackageInfo in specs::

* Rename PackageInfo::url > PackageInfo::package_url

* Add changelog entry

* Add MatchSpec migration help
2024-01-08 16:06:22 +01:00
Antoine Prouvost 53a5171360
Clean PackageInfo interface (#3103)
* Refactor PackageInfo operator==

* Remove unused headers

* Simplify PackageInfo interface

* Move PackageInfo signature order

* Change type for PackageInfo::defaulted_keys

* Use nlohman::from_json for PackageInfo

* Use nlohman::to_json for PackageInfo

* Fallback in PackageInfo::str

* Rename PackageInfo::fn > filename
2024-01-05 18:26:51 +01:00
Antoine Prouvost f99c4288c6
Remove micromamba shell init -p (#3092)
* Remove micromamba shell init -p

* Fix rc content
2024-01-05 14:07:11 +01:00
Josh Chorlton bcf8141e9e
gracefully handle conflicting names in yaml specs (#3083)
* Revert "Remove hard coded mamba (#3069)"

This reverts commit 212d1e9ad2.

* gracefully handle conflicting names in yaml specs

* Revert "Revert "Remove hard coded mamba (#3069)""

This reverts commit b5717e6871.
2023-12-27 10:08:43 +01:00
Antoine Prouvost 15e8056029
Some future proofing MatchSpec (#3082)
* Private MatchSpec::name

* Private MatchSpec::filename

* Private MatchSpec::url

* Make MatchSpec::is_file a function

* Private MatchSpec::namespace

* Private MatchSpec::build_number

* Remove dead affectation

* Private MatchSpec::optional

* Remove dead code

* Clean MatchSpec dist parsing

* Fix MatchSpec dist parse

* Private MatchSpec::version

* Private MatchSpec::build_string

* Private MatchSpec::channel

* Add missing MatchSpec setters

* Put MatchSpec in specs::
2023-12-26 17:23:33 +01:00
Antoine Prouvost 77484f5a63
Fix URL enconding in repodata.json (#3076)
* Fix filename URL encoding

* Remove dead code

* Fix Channel URL encoding

* Improve test_create caching
2023-12-21 13:54:34 +01:00
Antoine Prouvost 425aef9dd2
Duplicate reposerver to isolate micromamba tests (#3071) 2023-12-19 18:30:37 +01:00
Josh Chorlton 57a6a691be
Support multiple env yaml specs (#2993)
* tested and working

* docs update

* disallow multiple spec types

* add test for only one yaml specifies channel

* fix install yaml test

* Update micromamba/tests/test_create.py

Co-authored-by: Jonas Haag <jonas@lophus.org>

* Update micromamba/tests/test_create.py

Co-authored-by: Jonas Haag <jonas@lophus.org>

* suggestions

* separate loop

* appease the linter

* another test

---------

Co-authored-by: Jonas Haag <jonas@lophus.org>
2023-12-19 08:56:59 +01:00
Antoine Prouvost 212d1e9ad2
Remove hard coded mamba (#3069)
* Remove hard-coded micromamba

* Revert test_env

* Fix Taskfile

* Put mamba inside the feedstock

* Fix permission error

* Move git safe dir

* Restore micromamba-feedstock main branch

* Try chown
2023-12-19 08:54:50 +01:00
Johan Mabille 29a19e1ef5 release libmamba 2.0.0alpha1, libmambapy 2.0.0alpha1, micromamba 2.0.0alpha1 2023-12-18 11:50:36 +01:00
Johan Mabille c54c4b530e release libmamba 2.0.0alpha0, libmambapy 2.0.0alpha0, micromamba 2.0.0alpha0 2023-12-14 16:42:44 +01:00
Johan Mabille 4f2d1ebd43
Added mamba as dynamic build of micromamba (#3060) 2023-12-14 14:22:31 +01:00
Johan Mabille 7709425155
Disabled failing test (#3062) 2023-12-14 10:54:59 +01:00
Antoine Prouvost 21675b6517
Enforce space between definitions (#3049) 2023-12-07 23:00:25 +01:00
Antoine Prouvost f36c3f222e
Change MatchSpec::parse to named constructor (#3048) 2023-12-07 16:06:02 +01:00
Antoine Prouvost d3b72c44fb
Plug ChannelSpec in MatchSpec (#3046)
* Plug ChannelSpec in MatchSpec

* Remove unused split_platform

* Fix channel specific error messages

* Fix MatchSpec tests

* Remove ChannelSpec Context and ChannelContext dep
2023-12-07 13:45:56 +01:00
Antoine Prouvost edb7565462
Default to conda-forge channel (#3035)
* Default to conda-forge channel

* Fix test

* Refactor umamba repoquery to drop --use-local=int

* Fix tests
2023-12-06 09:32:20 +01:00
Antoine Prouvost 9c68ee239b
Refactor (some) OpenSSL functions (#3024)
* Add sha256 to cryptography

* Refactor cryptographic hasher

* Use new hasher in validation

* Split util::encoding

* Improve hash tests

* Move and refactor cache_name_from_url

* Fix conversion

* Fix namespace

* Fix conversion

* Refactor Base64 encoding

* Move URL percent encoding

* Document encoding.hpp

* Move EVPContextDeleter

* Add doc to DigestHasher

* Remove util::hex_string

* Add UTF8 source file encoding on Windows

* Add hex_to_bytes

* Use util::hex_to_bytes

* Private Digest inheritance

* Make thread_local hasher

* Use digester in validation

* Fix Win
2023-12-04 16:11:35 +01:00
Antoine Prouvost 32ffc54249
Default to hide credentials (#3017)
* Default to hide credentials in util::URL

* Default to hide credentials in CondaURL::pretty_str

* Default to hide credentials in CondaURL::str
2023-11-29 12:47:30 +01:00
Antoine Prouvost abd21ccc8c
Remove ChanelContext context capture (#3015)
* Remove some ChannelContext::context

* Explicit Context capture in SubdirData

* Explicit Context param in MatchSpec

* Move URL hardening to Transaction

* Remove Context capture in ChannelContext
2023-11-28 18:32:09 +01:00
Antoine Prouvost 1230b92094
Move to Ruff (#3011)
* Use Ruff LSP

* Remove unused imports

* More Ruff fixes

* Remove unused test vars

* Explicit import

* Explicit import

* Explicit import

* Explicit import

* Explicit import

* Warning fixes

* Import fixtures

* Add ruff pre-commit

* Remove pre-commits checks superceded by ruff

* Fix imports

* Fix ruff warning

* Fix test_linking fixtures

* Fix typo

* Fix test_update fixture import

* Python line-length to 100

* Reformat Python code line length

* Fix typo
2023-11-27 19:10:34 +01:00
Antoine Prouvost 1ee4893eeb
Move core/channel > specs/channel (#3000)
* Move core/channel > specs/channel

* Remove unnecessary [[nodiscard]]

* Minor specs::Channel improvements

* Add value based ChannelResolveParams

* Add specs::Channel tests

* Add more Channel tests

* ChannelContext::context const only

* Remove unnecessary ChannelContext functions

* Rename core/channel.hpp > core/channel_context.hpp

* Sort (some) CMake files

* Refactor ChannelContext constructor

* Review comments

* Const reference

* Use ChannelContext::make_conda_compatible
2023-11-22 15:29:34 +01:00
Antoine Prouvost e874e7ea71
Migrate Channel::make_channel to resolve multi channels (#2986)
* Add one to many get_channels

* Refactor ChannelContext params

* ChannelContext::make_channel migration 1

* ChannelContext::make_channel migration 2

* ChannelContext::make_channel migration 3

* ChannelContext::make_channel migration 4

* ChannelContext::make_channel migration 5

* ChannelContext::make_channel migration 6

* ChannelContext::make_channel migration 7

* Remove Channel bindings

* Remove ChannelContext::make_channel

* ChannelContext::get_channels migration 1

* ChannelContext::get_channels migration 2

* ChannelContext::get_channels migration 3

* Remove get_channels bindings

* Remove ChannelContext::get_channels

* Channel::resolve return a list

* Resolve multi_channel in Channel::resolve

* Use weakening map for multi_channels

* Split Channel resolve_name

* Cleanup signatures

* Add Channel::clear_xxx

* Force removal of trailing '/' in Channel

* Add weak channel comparison

* Use better channel comparisons

* Remove Channel::base_url

* Rename Channel::make_chan > make_channel

* Add doc

* Resolve Channel paths from params

* Review from JohanMabille

* Fix absolute path
2023-11-21 12:07:19 +01:00
Antoine Prouvost 139b7ef020
Refactor env::which (#2997)
* Clenup env::which

* RAII C calls

* Refactor which functions

* Remove second param from which

* Change which namespace

* Fix which extension

* Add missing OSX headers

* Add util::which tests
2023-11-20 15:13:22 +01:00
Antoine Prouvost 7c5f0562c4
Migrate expand/shrink_home (#2990) 2023-11-17 19:45:30 +01:00
Antoine Prouvost a0f81393dd
Refactor env directories (#2983)
* Refactor env directories

* util::split char sep

* Refactor pathsep

* Add path_concat

* user_home_dir as string

* get_windows_known_user_folder return as string

* xdg location as string
2023-11-16 18:26:03 +01:00
Antoine Prouvost cd744e765c
Channel initialization (#2953)
* Set default_channels at config level

* Resolve default multi channel at the config level

* Fix Yaml source printers

* Resolve local multi channel at the config level

* Remove ChannelContext::make_simple_channel

* Remove Channel::name usage

* Factorize split_once functions

* Try looking for name match in URL path

* Refactor ending_splits_in

* Code improvement

* Replace get_common_parts with concat_dedup

* Remove Channel::name

* Remove Channel::location

* Use URL for priority in channel loader

* Make Channel value-based

* Add range hashing

* Add Channel comparison and hash

* Make channel map/list return by value

* Resolve 1

* Resolve 2

* Resolve 3

* Remove unknown channels

* Hide get_known_platforms

* Add unknown ChannelSpec

* Remove unused function

* Rename Channel::canonical_name > display_name

* Remove Channel friend class

* Add Channel::resolve

* Remove ChannelContext::from_value
2023-11-15 15:52:59 +01:00
Johan Mabille 21c6d73680
removed dependency on conda-index (#2964) 2023-11-08 22:15:05 +01:00
Antoine Prouvost d116ff8917
Add cmake-format (#2962)
* Add cmake-format

* Apply cmake-format
2023-11-07 11:08:26 +01:00
Antoine Prouvost 8683078464
Refactor CI and libamambapy tests (on Win) (#2955)
* TMP disable Unix tests

* Try refactor win CI

* Add libmambapy tests

* Run Windows libamamba tests via CMake

* Add Windows menuinst dependency

* Fix typo

* Debug libmambapy tests Win

* Add micromamba tests windows

* Call test_libmamba from different paths

* Merge workflow launchers

* Fix libmamba tests win

* Fxi

* Fix workspace key

* DEbug win

* Implement local channel tests as part of the intergration tests

* Try Win libmamba tests bash

* Cleanup

* Restore Unix tests

* Make test local channel noarch

* Fix workspace action number

* No error on test cleanup in CI

* Reduce number of threads to conda-index

* Disable local channel tests on Windows
2023-11-03 14:07:54 +01:00
Antoine Prouvost fdf2b65a27
Refactor CI and libamambapy tests (on Unix) (#2952)
* Add simple libmambapy test

* Use CMakePresets in CI

* Share workspace between jobs

* Add Conda dependency

* Remove CMake STRIP

* Fix menuinst skipping

* Refactor CMakePresets

* Change ccache key

* Add pkg-config
2023-11-02 13:55:39 +01:00
Antoine Prouvost 5564887b97
Rename env functions (#2954) 2023-10-31 16:08:49 +01:00
Antoine Prouvost 80e3475e06
Explicit and smart CMake target (#2935)
* Explicit and smart CMake target

* Only expose explicit CMake targets
2023-10-31 12:07:03 +01:00
Antoine Prouvost 33649d1005
Add refactor getenv setenv unsetenv (#2944)
* Add refactor getenv setenv unsetenv

* Move to refactored env functions
2023-10-31 10:56:33 +01:00
Antoine Prouvost a38196e284
Move reposerver tests to micromamba (#2941)
* Move reposerver tests to micromamba

* Add micromamba channel data

* Remove mamba test

* Fix mamba path

* Restore mamba files

* Fix mamba code
2023-10-26 22:17:48 +02:00
Antoine Prouvost bca398a5dc
Refactor win encoding conversion (#2939) 2023-10-26 19:00:17 +02:00
Antoine Prouvost 6592c84084
Combine dev environments (#2937) 2023-10-26 12:48:50 +02:00
Antoine Prouvost c7aba975b5
Resolve ChannelSpec into a Channel (#2899)
* Change URL custom_channel matcher

* Cannot change location at once

* Simpler channel_alias_location

* Change URL channel_alias matcher

* Refactor ChannelContext::from_url

* Add Windows URL path encoding test

* Simplify URL::set_path

* Fix URL encoding parsing

* Refactor platforms urls

* Fix missing forward declaration

* Fix Win file URL encoding

* Split Channel url functions

* Remove no-URL ctor from ChannelContext::from_name

* Remove no-URL ctor from ChannelContext::make_simple_channel

* Remove old Channel ctor

* Remove channel_alias_location

* Refactor Channel::base_url

* Try not to use location mamba.py

* Remove Channel comparison

* Try Channel::platform_url

* Refactor Channel::platform_urls to use platform_url

* Remove build_url

* Remove concat_scheme_url

* Use spec in from_name

* Tuple equality for URL

* Add tuple_hash

* Add std::hash<mamba::util::URL>

* Make CondaURL hashable

* Refactor make_channel

* New algorithm for authetification map

* Add specs::AutheticationDataBase

* Fix typo authentification > authentication

* Use AuthenticationDataBase

* Fix AuthenticationDataBase

* use AuthenticationDataBase::find_compatible

* Use canonical_name

* Add Credential check to URL

* Simplify crendential check in channel

* Refactor AuthDB credential setters

* No Channel::location in tests

* Remove Channel user scheme password

* Document AuthenticationInfo

* Remove Channel token

* Remove Channel::auth

* Remove Channel::package_name

* More replacement name > canonical_name

* Remove unused function

* No credential from URLs

* Remove unneeded header

* Disable Channel::repo_checker

This is disbled as TUF implementation is not well defined and this
function is not used except in experimental conditions.

* Apply auth info as needed

* Simplify custom_channels instanciation

* Simplify custom_multi_channels instanciation

* Review improvements
2023-10-25 19:06:46 +02:00
Isuru Fernando f23e078f2c
Fix channels with slashes regression (#2926)
* Fix channels with slashes regression

* fix formatting

* make the test isolated

Co-authored-by: Antoine Prouvost <AntoinePrv@users.noreply.github.com>

* Add more tests

* Use pytest utilities for negative testing

* Add extra test doc

---------

Co-authored-by: Antoine Prouvost <AntoinePrv@users.noreply.github.com>
2023-10-24 18:35:31 +02:00
Isuru Fernando 24f26a0175
Allow defaults::* spec (#2927) 2023-10-23 20:03:58 +03:00
Johan Mabille 00dd002fe6
Added PackageFetcher (#2917)
* Added PackageFetcher

* slight refactoring

* Additional cleanup and first pass according to review

* Last pass according to review
2023-10-19 15:26:57 +02:00
Antoine Prouvost a8464367c4
Make some fixture local (#2919)
* Make xdg fixtures local

* Make create fixtures local
2023-10-17 16:27:47 +02:00
Marius van Niekerk c32d3ae116
Fix for #2910 (#2911) 2023-10-13 21:54:03 +02:00
Antoine Prouvost 4e93b7967a
Add ChannelSpec (#2870)
* Make find_slash_and_platform private-lib

* Add ChannelSpec

* Add ChannelSpec::Type

* Add abs_path_or_url_to_url

* Add ChannelSpec path normalization and type detection

* Add ChannelSpec::location

* Allow any platform string in ChannelSpec

* Channel::platforms is a flat_set

* Move flat_set_caster to own file

* More flat_set in Channel

* Regenerate Python stubs

* Plug ChannelSpec into Channel

* Resolve path in ChannelSpec

* Fix env export channels

* No resolve symlink in ChannelSpec

* Fix tests on Windows

* Add ChannelSpec attribute extractors

* Add raw domain ChannelSpec test

* Use URL in read_channel_configuration

* Fix local channel name

* Improve path_to_url

* Construct from Channel from URL

* Properly parse channel alias

* Fix wrong move

* Channel alias is a CondaURL

* Add defaulted scheme to URL

* Add defaulted host to URL

* CondaURL tokens can only be at the begining

* Add CondaURL::path_without_token

* Add option to remove credentials in URLs

* Add empty cretendial URL tests

* Add str Credential options

* Add credential option to CondaURL::str

* Add split_prefix/suffix

* Add ChannelContext::from_package_path

* URL::pretty_path only on Windows

* Add ChannelContext::from_path

* Do not resolve paths in ChannelSpec

* Change mapping order in path resolving

* Compute URL canonical_name in read_channel_configurations

* Add URL::authority credentials

* Rename private URL::authentification > URL::authentifaction_elems

* Refactor URL::authority

* Refactor some read_channel_configurations

* Remove empty path URL case

* Add path_is_prefix

* Fix url_match

* Add flat_set doctest printer

* Add CondaURL doctest printer

* Alias dynamic_platform_set in ChannelSpec

* Use util:concat

* Restore subdir in matchspecs

* Make find_slash_and_platform private
2023-10-12 15:56:49 +02:00
Antoine Prouvost 5d515fa043
Add multiple queries to repoquery search (#2897)
* Remove kENUM

* Fix Hide URL confidential

* Refactor repoquery initialization

* Hide implementation headers

* Add enum_name(QueryType)

* Add QueryType_from_name

* Mulitple queries in repoquery search

* Stubgen

* No mathspec in Json query

* Remove unused ChannelContext
2023-10-09 21:40:50 +02:00
Hind-M 620ae9500c
Add CI test for local channels (#2854)
* Add CI test for local channels

* Replace conda_prefix with mamba_root_prefix

* Add note for `-c local` in channels long description

* Throw exception if no `conda-bld` dir exists and `-c local` is given

* Add umamba local channel tests to windows CI

* Fix test_config
2023-10-06 11:11:49 +02:00
Antoine Prouvost 5a302fc4cb
Filesystem library (#2879)
* move mamba_fs.hpp

* Header cleanup

* No util:: dependency in filesystem

* Change header names

* Use std::replace in filesystem
2023-10-05 20:52:41 +02:00
Antoine Prouvost 91b6c44a51
Read repodata.json using nl::json (rerun) (#2753)
* Add simdjson dependency

* Add experimental_repodata_parsing option

* Add simdjson repodata parser

* Add missing dependency

* Deactivate simdjson by default
2023-10-04 22:06:46 +02:00
Antoine Prouvost 7c02338cb5
Fix Ci (#2889)
* Pin pre-commit Python version

* update pre-commit config

* Try fix Mamba tests Windows

* use boltons

* Fix channel in tests
2023-10-03 22:20:29 +02:00
Hind-M b1c4950261
[Micromamba] Add mamba tests (#2877)
* Add mamba `test_api` tests to umamba

* Add more tests
2023-10-03 10:51:16 +02:00
Antoine Prouvost 0fbb0e4fab
Use CMake targets for reproc (#2883)
* Use CMake targets for reproc

* Use reproc-cpp-static on Windows

* Upper pin on Mamba
2023-10-02 18:01:14 +02:00
Antoine Prouvost be30af600a
Build micromamba win with feedstock (#2859)
* Try CI

* Remove useless header

* Try mixing static windows build with Conda

* More packages from conda-forge

* Move to yaml-cpp>=0.8.0

* Ensure proper yaml-cpp target

* Use yaml-cpp-static on Windows

* Fix versions

* Use libsolv-static from Conda-Forge
2023-09-27 10:32:47 +02:00
Antoine Prouvost a8d595b6ff
Fix Posix shell on Windows (#2803)
Fix path spearator on Win Posix shells
2023-09-25 14:04:22 +02:00
Hind-M 0fbb449bd7
Add comments in `micromamba` repoquery (#2863)
Add comments in repoquery
2023-09-23 06:18:41 +02:00
Antoine Prouvost 3c200f9e8e
Don't force MSVC_RUNTIME (#2861)
* Don't force MSVC_RUNTIME

* Run micromamba-feedstock fork

* Explicit MSVC runtime in CI

* Fix typo
2023-09-21 20:02:02 +02:00
Antoine Prouvost 7cf41652cf
Channel cleanup (#2832)
* Compress channel alias creation

* Remove split_scheme_auth_token from query

* Remove split_scheme_auth_token from output.cpp

* Remove split_scheme_auth_token from channel.cpp

* Delete split_scheme_auth_token

* Channel no string copy

* channel.hpp include sanitazing

* Remove split_anaconda_token

* Remove split_conda_url

* Remove is_package_file

* Remove needless include

* Move secret regex to util.cpp
2023-09-19 09:43:54 +02:00
Jonas Haag 0319eaf97f
Support $var syntax in .condarc (#2833) 2023-09-15 09:00:52 +02:00
Casper van Elteren f4cea9b732
Add Nushell activation support (#2693) 2023-09-14 12:14:09 +02:00
Antoine Prouvost 9b757c24a8
No ugly kenum (#2831) 2023-09-14 10:56:29 +02:00
Antoine Prouvost 8cb0985cd1
Refactor tests (#2829)
* Make test Python 3.8 compatible

* Speed up test_activation.py

* Refactor test_list.py
2023-09-13 19:26:38 +02:00
rmittal87 a5c51980ba
Adding locks for cache directories in case multiple processes are try…. (#2811)
Adding locks for cache directories in case multiple processes are trying to create an environment at the same time
2023-09-13 15:04:29 +02:00
Hind-M 806287599c
[Micromamba] Add `env update` (#2827)
* Remove weird piece of code

* Add micromamba env update

* Add env update test

* Add xtl check in tests
2023-09-13 13:15:37 +02:00
Lisandro Dalcin 0289050d17
Fix linking on Windows when Scripts folder is missing (#2825)
* Add reproducer for issue #2808

* Ensure parent directory exists when creating Python entry points (#2808)
2023-09-11 18:02:24 +02:00
Klaim (Joël Lamotte) bbac096a04
Context: not a singleton (#2615)
Context is not a singleton anymore.

---------

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2023-09-05 10:55:43 +02:00
Johan Mabille 0a5ed8d71f release libmamba 1.5.1, libmambapy 1.5.1, mamba 1.5.1, micromamba 1.5.1 2023-09-05 10:23:43 +02:00
Jonas Haag 07ce0c4bdb
Implement --md5 and --channel-subdir for non-explicit env export (#2672)
Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2023-09-02 00:20:33 +02:00
Hind-M 1919fc0854
[Micromamba] Fix wrong command description (#2804)
Fix wrong command description
2023-09-01 14:29:50 +02:00
Antoine Prouvost 207e7556e4
Fix extra agrument in self-update reinit (#2787) 2023-08-31 22:18:30 +02:00
Antoine Prouvost 3fcff3904b
Windows path manipulation and other cleanups (#2801)
* Add path_win_to_posix

* Move path_has_drive_letter and is_path

* Refactor on_[plat]

* Add util::path_to_posix

* Fix static builds
2023-08-31 22:10:18 +02:00
Daniel Elsner 7dfbf2cf0d
Clearer output from `micromamba search` (#2782)
* [feat] Show other versions with --pretty printing

* [feat] Refine version/build table in search pretty print

* [feat] Change table view to contain further aligned build information

* [feat] Redirect non-wildcard search to single package view

* Fix repoquery test for empty single package view

* Cleanup + add string marker for alignment

* Fix string marker for libmambapy

* Add changes suggested by JH

* Move to unordered_map where it makes sense

* Move to string_view and switch-case constexpr alignment mapping

* Fail lookup for non-existing alignments

* Remove unnecessary reference in constructor
2023-08-31 16:10:03 +02:00
Antoine Prouvost e5abd4249f
Fix pins (#2786)
* Add libsolv test scenarios

* Fix pins

* Add test for python pinning

* Fix test

* Deactivate test on Windows
2023-08-29 03:32:09 +02:00
Antoine Prouvost da70542cbe
Enable Link Time Optimization (#2742)
* Add MAMBA_LTO option to CMake

* Handle no CMAKE_BUILD_TYPE in LTO
2023-08-25 09:50:35 +02:00
Jonas Haag 20b477f459
Restore `__linux=0` test (#2778) 2023-08-24 20:05:52 +02:00
Antoine Prouvost 41bc4ee5f3
Speed up tests (a bit) (#2776)
Make independent long path test
2023-08-24 14:47:50 +02:00
Johan Mabille 795734fb7f release libmamba 1.5.0, libmambapy 1.5.0, mamba 1.5.0, micromamba 1.5.0 2023-08-24 09:24:26 +02:00
Jonas Haag ae2f3e84ca
Revert failing test (#2777) 2023-08-23 23:10:12 +02:00
Antoine Prouvost d5cd432e7e
Strong pin in test (#2774) 2023-08-23 14:21:01 +02:00
Jonas Haag 2cd1bd0d38
Fix __linux virtual package default version (#2749)
Co-authored-by: AntoinePrv <AntoinePrv@users.noreply.github.com>
2023-08-23 13:26:12 +02:00
Hind-M 378c4db57e
[micromamba] Fix config list sources (#2756)
* Fix config list sources in micromamba

* Add test

* Handle case of source as map
2023-08-22 09:10:39 +02:00
Hind-M 427771c4b4
Fix warnings (#2760) 2023-08-21 15:16:48 +02:00
Antoine Prouvost df918ccf06
Isolate URL object (#2744)
* Add remove_(prefix|suffix)

* Refactor and document unc_url

* Remove unused functions

* Add CURLUrl wrapper

* Hide CURL from URLHandler

* Rename URLHandler > URL

* Simplify test_url

* Fix path setter

* Add URL builder tests

* Rename URL::url > URL::str

* Rename URL ctor URL::parse

* Refactor has_scheme

* Add get_scheme

* Add scheme option to URL::parse

* Add scheme option to URL::str

* Fix build

* Add has_drive_letter

* Rename and document scheme functions

* Stronger URL invariant

* Rename URL::auth > URL::authentication

* Add URL::authority

* Add URL IP tests

* Document URL

* Fxi rebase util/string

* Fix channel tests

* Allow password without user in URL

* Scope util::URL

* No context in test_url_manip

* Remove unused CURLEasyHandle

* remove declaration

* Add case handling to URL

* Add URL::operator==

* Add URL::operator/

* Test url encoding

* Reimplement URL encoding without CURL

* Fix MSVC

* Add URL::user encoding

* Add URL::password encoding

* Add URL::host encoding

* Add URL::str options

* Small URL imrovement in channel.cpp

* Fix URL auth encoding

* Added review suggestions from @Hind-M
2023-08-21 11:43:09 +02:00
Antoine Prouvost 9438ac77d2
Fix and improve static builds (#2755)
* Check that CI fails

* Run CI through conda-forge script

* Run conda-forge script in feddstock dir

* Try setting mamba source visible to conda-forge script

* Fix feedstock patch path

* Checkout TMP AntoinePrv repo

* Don't template micromamba-feedstock

* Fix checkout ref

* Extract static package

* TMP debug OSX build

* Set OSX out dir

* Disable cleanup

* Run Linux ppc64le and aarch64 builds on emulated arch

* Try running python on fedora

* Run docker in docker

* Try ubuntu

* Change repo to conda-forge

* Revert "Check that CI fails"

This reverts commit 3b1a7d29ec.

* Remove unused recipe fork
2023-08-17 14:33:03 +02:00
Antoine Prouvost 03e34174dc
Move util_string to utility library (#2739) 2023-08-11 13:32:15 +02:00
Antoine Prouvost 1400c4e768
Refactor test_shell (#2726) 2023-08-04 13:00:02 +02:00
Antoine Prouvost 0c5154188c
Remove warnings from test_activation (#2727)
Remove warnings
2023-08-03 10:48:43 +02:00
Antoine Prouvost 58acf67d98
Fix wrong activated PATH in micromamba shell (#2722)
* Fix wrong activated PATH in micromamba shell

* Add PATH check for shell activation

* Simplify stdout check in shell test
2023-08-01 14:31:54 +02:00
Daniel Farrell 00fb86c726
Use xdg schemas for config saving/reading (minified) (#2714)
Co-authored-by: Danny Farrell <dan@cyrusbio.com>
2023-08-01 00:08:02 +02:00
ThomasBlauthQC a7cd3b6292
Respect subdir in match spec (#2300) 2023-07-26 10:33:55 +02:00
Antoine Prouvost f77b521253
Refactor test_repoquery to use new fixtures (#2691) 2023-07-21 10:46:33 +02:00
Johan Mabille 6f6fdd7b98 release libmamba 1.4.9, libmambapy 1.4.9, mamba 1.4.9, micromamba 1.4.9 2023-07-13 16:07:23 +02:00
Johan Mabille f55576587a
Added upper bound to fmt to avoid weird failure on ci (windows only) (#2671) 2023-07-13 14:14:34 +02:00
Johan Mabille bc818db386 release libmamba 1.4.8, libmambapy 1.4.8, mamba 1.4.8, micromamba 1.4.8 2023-07-11 09:50:02 +02:00
Antoine Prouvost 5b931ed4da
No profile.d fallback in rc files (#2649)
* No profile.d fallback in rc files

* Fallback to messages from 'micromamba activate'
2023-07-06 09:39:10 +02:00
Johan Mabille 2ed8bee1e1 release libmamba 1.4.7, libmambapy 1.4.7, mamba 1.4.7, micromamba 1.4.7 2023-07-06 09:00:00 +02:00
John H. Ayad c491f1c52c
Re-introduce ZST support to mamba and remove the feature flag (#2642)
* Re-introduce ZST support to mamba and remove the feature flag

* lint

* Ignore .state.json files for comparison

* lint

* One more
2023-07-02 21:28:37 +02:00
Johan Mabille fa3f7a2f73 release libmamba 1.4.6, libmambapy 1.4.6, mamba 1.4.6, micromamba 1.4.6 2023-06-30 22:07:45 +02:00
Antoine Prouvost d8c1ef1437
Not reading hook file (#2631)
* Do no read hook file

* Clean micromamba.sh

* csh activation without reading file

* Try fixing powershell activation
2023-06-30 09:33:50 +02:00
Antoine Prouvost 16c3da8e4d
Allow --force-reinstall on uninstalled specs (#2636) 2023-06-29 14:27:18 +02:00
Antoine Prouvost 50a627e002
Attempt to fix CI (#2637)
* Revert "Change brace space in clang-format (#2627)"

This reverts commit 3dce990111.

* Revert "Improvement: Support ZST in mamba and enable ZST by default (#2404)"

This reverts commit 60cd358c39.
2023-06-29 08:29:37 +02:00
Antoine Prouvost 3dce990111
Change brace space in clang-format (#2627)
Change braced init spaces
2023-06-28 11:38:33 +02:00
Hind-M 1b28840016
Channels refactoring/cleaning (#2537)
* Remove unused functions

* Have make_channel and parsing in different lines

* Remove m_canonical_name setting in getter

* Set canonical_name in make_simple_channel and make it mandatory

* Fix canonical_name setting

* Remove make_cached_channel

* Remove channel_context from channel

* Cleaning and moving functions around and add some tests

* Add forgotten mamba namespace in tests

* Move utility functions to url files and remove util_url
2023-06-28 11:22:40 +02:00
Johan Mabille 9c46dbadd2 release libmamba 1.4.5, libmambapy 1.4.5, mamba 1.4.5, micromamba 1.4.5 2023-06-27 11:05:14 +02:00
Antoine Prouvost f4bb43676b
Add topological sort explict export tests (#2618) 2023-06-23 17:59:47 +02:00
Jonas Haag 0a7490c940
Remove banner (#2298) 2023-06-20 16:53:19 +02:00
Antoine Prouvost be99482471
Fix --force-reinstall (#2601) 2023-06-16 17:50:54 +02:00
Antoine Prouvost 7b0b9a5aeb
Move GHA to setup-micromamba (#2545)
* Move to setup-micromamba

* Try init-shell

* Activate env in umamba_tests_win_cmd

* Add test_run failure output

* Try pwsh

* Use TEST_MAMBA_EXE in test_run.sh

* Unset CONDARC

* Remove more CONDARC

* Remove unecessary cleanup in main CI

* Flexible Pytest deletion

* Remove explicit activation
2023-06-15 18:20:10 +02:00
Klaim (Joël Lamotte) ec95d18986
No Singleton: `Configuration` (#2541)
* Removed unused debugging macros.

* mamba::Configuration is not a singleton anymore.

* review fix
2023-06-15 11:41:21 +02:00
Jonas Haag 48d595ae45
Update pre-commit hooks (#2586) 2023-06-13 22:39:50 +02:00
Antoine Prouvost ecb5a7edc5
Micromamba tests improvements (#2517)
* Automatically restore os.environ in umamba tests

* Cleanup test_info

* Refactor conftest.py

* Eagerly clean micromamba test dir

* Refactor micromamba test_info with new fixtures

* Fix test self_update on Win
2023-05-26 18:27:54 +02:00
Antoine Prouvost 17232ca90e
Honor envs_dirs (#2538)
* Improve `is_writable` on non-existing sub-folders

Co-authored-by: Katrin Muck <katrin.muck@tuwien.ac.at>

* Add contains test case

* Include envs_dirs in target_prefix computation

* Use target_prefix and root_prefix in micromamba shell cmds

* Add umamba envs_dirs activation test

* Add envs_dirs create test

* Mantain umamba shell cmds backward compat

* Improve activate error message

* Fix activation on windows

---------

Co-authored-by: Katrin Muck <katrin.muck@tuwien.ac.at>
2023-05-25 10:16:56 +02:00
Antoine Prouvost 02a539db65
Fix umamba tests ¯\_(ツ)_/¯ (#2540)
Fix umamba test update
2023-05-23 17:22:15 +02:00
Antoine Prouvost 09dc37addc
[Internal] Use subsub commands for `micromamba shell` (#2527)
* Refactor shell subcommand function

* Split shell CLI callback fucntions

* Use subsubcommands for micromamba shell

* Adapt calls to micromamba shell

* Fix typo

* Fix config loading in micromamba shell hook

* Replace vector with array

* Restore  launcher

* Fix run_in_environment prefix

* Fix shell subcommand loading config

* Fix greedly config set

* Don't change bat files because I have no idea
2023-05-22 11:52:21 +02:00
Klaim (Joël Lamotte) ea8249bc7e
No singleton: ChannelContext, ChannelBuilder and channel cache (#2455)
* Fusionned ChannelBuilder and ChannelContext and channel cache

* ChannelContext is not a singleton anymore.

* libmambapy now holds singletons for ChannelContext etc.

* formatting

* Simplified libmambapy singleton handling.

* formatting
2023-05-17 17:11:23 +02:00
Johan Mabille 7a92fa5f62 release libmamba 1.4.4, libmambapy 1.4.4, mamba 1.4.4, micromamba 1.4.4 2023-05-16 23:08:34 +02:00
Ruben Arts 5b8d2a2149
fix: let the new executable run the shell init script (#2529) 2023-05-16 21:37:55 +02:00
Johan Mabille 46d3acd3c1 release libmamba 1.4.3, libmambapy 1.4.3, mamba 1.4.3, micromamba 1.4.3 2023-05-15 23:25:22 +02:00
Wolf Vollprecht 18ca4f16fc
add bearer token authentication (#2512)
add bearer token authentication
2023-05-15 17:23:22 +02:00
Antoine Prouvost 15f6b6e606
Use libsolv wrappers in MPool and MRepo (#2453)
* Use ObjPool in MPool

* Straightforward wrapper call

* MPool debug callback wrapper

* Fix format

* Use m_real_repo_key

* MRepos need not be stored

* Change MRepo::set_urls call

* Rename real_repo_key

* Awlways set solvable URL

* Rename mrepo_key

* Leaf comment note on package Info

* Ensure proper channel format in query

* Fix set url everywhere

* Rename solvable:noarch

* Fix real_repo_url in pybind

* Bump mamba tool version

* fix: prevent (possible) dangling pointer in query

* Fix url in transaction

* fix: setting url or repo from mamba

* fix: UB string_view of deallocated string

* Use solv:: interface in channel specific dep

* Use new solv:: interface in make_package_info

* Use solv:: interface in add_package_info

* Small implementation changes in MRepo

* Use wrapped reading functions

* kill MRepo::m_url

* Mark MRepo C++ function for Python deprecated

* Add ObjRepo::legacy_read_conda_repodata

* Mark more MRepo functions private

* Remove filename attributes from MRepo

* Fix Mrepo add_extra_pkg_info

* Not ignoring MRepo name

* Split url outside MRepo

* Remove MRepo ctor overload
2023-05-05 11:07:21 +02:00
Antoine Prouvost 0739da245f
cleanup: fix pytest warnings (#2490) 2023-04-25 14:22:31 +02:00
Hind-M 9831342dd1
Resume `Context` structuring (#2460)
Add ThreadsParams and PrefixParams in Context
2023-04-25 10:02:51 +02:00
Hind-M 40c220c4ce
Context structuring (#2432)
Context structuring

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2023-04-12 21:08:29 +02:00
Antoine Prouvost 5fa2ce3f3d
No Storing Channel* and MRepo* in Solvables (#2409)
No Storing Channel* and MRepo* in Solvables, removed dependency between Channel and MRepo

---------

Co-authored-by: Johan Mabille <johan.mabille@gmail.com>
2023-04-11 15:32:44 +02:00
Johan Mabille 30ca2e2d5d release libmamba 1.4.2, libmambapy 1.4.2, mamba 1.4.2, micromamba 1.4.2 2023-04-06 14:58:37 +02:00
Hind-M 22d37ceeb8
Remove const ref to string_view in codebase (#2440)
Remove const ref to string_view
2023-04-05 09:16:47 +02:00
Antoine Prouvost d12ea01795
Fix segfault in add_pin/all_problems_structured (#2428)
Fix segfault in add_pin/all_problems_structured
2023-04-04 11:31:04 +02:00
Antoine Prouvost 0345b9d7f8
Use custom function to properly parse matchspec (#2433)
Make MPool::matchspec2id properly process channels
2023-04-03 16:39:43 +02:00
Ivan Ogasawara a3597e33ff
fix: Improve message after the env creating with micromamba (#2425) 2023-03-31 20:50:07 +02:00
Antoine Prouvost 05f1b9b6b3
Refactor test_create, test_proxy, and test_env for test isolation (#2416)
* Deactivate PyCQA line-length warnings

* Proper os.environ restore in pytest

* Add --mamba-pkgs-dir for cache reuse in Pytest

* Set pytest tmp retention policy

* Allow Path in test helpers

* Refactor test_create for isolation

* Improve pytest fixtures

* Refactor test_env.py for test isolation

* Refactor test_proxy for isolating tests
2023-03-29 19:30:38 +02:00
Johan Mabille 6ed35f84ef release libmamba 1.4.1, libmambapy 1.4.1, mamba 1.4.1, micromamba 1.4.1 2023-03-28 11:39:49 +02:00
Thorsten Beier b7a60591cd
add option to relocate prefix. (#2385)
add option to relocate prefix
2023-03-27 10:26:19 +02:00
Johan Mabille d212f4aeac release libmamba 1.4.0, libmambapy 1.4.0, mamba 1.4.0, micromamba 1.4.0 2023-03-22 17:42:38 +01:00
Antoine Prouvost 156edfd89f
Arrange header sorting (#2375)
* Change headers sorting in Clang-format

* Reorder headers
2023-03-14 17:15:21 +01:00
Antoine Prouvost 26fbc7836e
Clean some warnings (#2374) 2023-03-14 10:02:41 +01:00
Johan Mabille 44c8abe391
Fixed micromamba server and removed some warnings (#2361)
Fixed microserver building
2023-03-08 19:35:39 +01:00
Wolf Vollprecht 7866468c51
Micromamba server (#2185)
Implemented a micromamba server
2023-03-08 15:54:10 +01:00
Hind-M e549d07b0c
Fix `repoquery` issues (#2330)
Fix `depends` and `whoneeds` repoquery sub-commands in micromamba
2023-03-06 12:13:19 +01:00
Johan Mabille b38377a479
Only full shared or full static build (#2342) 2023-03-03 17:27:25 +01:00
Antoine Prouvost 2811c25d75
Clean util_string (#2339)
clean up the util_string header and add util_string.cpp
2023-03-03 16:22:15 +01:00
Antoine Prouvost 24261d15b2
Isolate solv::ObjQueue (#2289)
Isolate solv::ObjQueue
2023-03-02 11:25:57 +01:00
Antoine Prouvost 5e30262e99
Fix some warnings (#2303) 2023-03-02 11:18:48 +01:00
Wolf Vollprecht f701ba8853
fixed failing CI (#2334) 2023-03-01 14:37:04 +01:00
Hind-M f279b484f2
Fix `micromamba env export` to get channel name instead of full url (#2260)
* Fix `micromamba env export` to get channel name instead of full url

* Use pkgs/main instead of defaults as channel name
2023-02-22 16:53:11 +01:00
Antoine Prouvost 365342cc04
Fine tune clang-format proposal (#2290)
* Fine-tune .clang-format

* Fix missing header and right const

* Fix header order on Windows

* Apply pre-commit
2023-02-20 16:01:43 +01:00
Antoine Prouvost 0002794f3c
Aggressive compilation warnings (#2304) 2023-02-20 09:02:36 +01:00
timostrunk 2fc0624013
repoquery: Implemented recursive dependency printout. Closes: #1242 (#2283)
Co-authored-by: Timo Strunk <Timo.Strunk@nanomatch.com>
2023-02-13 22:40:21 +02:00
timostrunk c80493a22c
Fix segmentation fault in case of an invalid package name (#2287)
Co-authored-by: Timo Strunk <Timo.Strunk@nanomatch.com>
2023-02-13 22:39:23 +02:00
Wolf Vollprecht baf3c48cc3
release libmamba 1.3.1, libmambapy 1.3.1, mamba 1.3.1, micromamba 1.3.1 (#2280) 2023-02-10 11:05:46 +01:00
Jonas Haag 59050cd4a7
Fix micromamba shell with environment name (#2272)
Also fix up target_prefix computation and prevent auto_activate_base when environment already active
---------

Co-authored-by: Hind Montassif <hind.montassif@gmail.com>
Co-authored-by: Wolf Vollprecht <w.vollprecht@gmail.com>
2023-02-10 09:58:22 +01:00
Wolf Vollprecht 87343ca7d6
fix up single download target perform finalization (#2274) 2023-02-09 09:17:07 +01:00
Wolf 9de6782e02 release libmamba 1.3.0, libmambapy 1.3.0, mamba 1.3.0, micromamba 1.3.0 2023-02-03 13:03:49 +01:00
Hind-M 61da8d8337
Remove unused `get_tarball` function (#2261)
Remove unused get_tarball function
2023-02-02 17:16:02 +01:00
Wolf Vollprecht be98796855
fix tests for pkg_cache (#2259) 2023-02-02 15:54:24 +01:00
Hind-M 353ed8d7f6
[micromamba] Stop run command when given prefix does not exist (#2257)
Fix https://github.com/mamba-org/mamba/issues/2084
2023-02-02 13:35:51 +02:00
Wolf Vollprecht 3390da9ab9 release libmamba 1.2.0, libmambapy 1.2.0, mamba 1.2.0, micromamba 1.2.0 2023-01-16 10:20:39 +01:00
Wolf Vollprecht 0fa866b3bd
also reset uname & gname when creating archives (#2217) 2023-01-12 10:10:16 +01:00
Wolf Vollprecht 3f2135ef9e
remove patches for feedstock (#2216) 2023-01-11 13:40:19 +01:00
Wolf Vollprecht 1de3df2fc3
use new shebang style (#2211) 2023-01-11 13:39:58 +01:00
Wolf Vollprecht e9695a45cc
use local meta.yaml for static builds (#2214) 2023-01-10 17:45:49 +01:00
Jonas Haag 3f716332f9
Fix #1783: Add `micromamba env create` (#1790)
Fixes https://github.com/mamba-org/mamba/issues/1783
2023-01-10 17:40:25 +01:00
Ben Mares 4ab454766f
Don't create a prefix which is missing conda-meta (#2162) 2023-01-09 16:50:40 +01:00
Wolf Vollprecht a6c0082e37
faster (streaming) conda decompress (#2200) 2023-01-05 16:13:14 +01:00
Wolf Vollprecht f6e717173c
make tarballs look more similar to conda-package-handling, add compression threads (#2177) 2023-01-03 17:56:12 +01:00
Wolf Vollprecht e0848e695e
release 1.1.0 (#2130) 2022-11-28 18:44:19 +01:00
Antoine Prouvost f32b42e3f2
Move to fmt::terminal_color and other output IO improvements (#2085)
* Remove termcolor for fmt
* Reimplement termcolor::is_atty
* Switch to fmt::terminal_color
* Add missing header for to_utf8
* Add Context color palette
* Refactor progress bar to use palette
* Remove misleading flag-like enum
* Fix windows build
* Remove output::format
* Add visited colors for repoquery
* Use palette in SAT error messages
* Console::stream() clear line
2022-11-21 14:22:51 +01:00
Wolf Vollprecht 4ec23a65e6
fix direct hook for powershell (#2122) 2022-11-18 20:17:43 +01:00
Wolf Vollprecht c5d73a204b release 1.0.0 2022-11-01 21:01:36 +01:00
Wolf Vollprecht 68a6568de1
add shell command to enter activated subshell (#2056)
* initial port of run to libmamba and adding shell command to enter activated shell
* remove micromamba/run.hpp
2022-11-01 19:53:34 +01:00