Commit Graph

42 Commits

Author SHA1 Message Date
Klaim (Joël Lamotte) 0b8b9a7aab
Fixed create/install requiring pip install failing when the prefix have whitespaces on Windows (#1838)
* micromamba: add tests creating/installing with pip in prefix with whitespaces
* Fixed installing with pip when prefix have whitespaces on Windows

Co-authored-by: Jonas Haag <jonas@lophus.org>
2022-08-08 19:36:46 +02:00
Klaim (Joël Lamotte) 4f63ef67b8
Fixed libmamba crash when using `pip` (#1828)
Added an overload of `env::which` taking a list of search paths for the executable to find.
2022-07-29 09:36:54 +02:00
Carsten Haubold 372bb4d7df Fix pip execution in environments with spaces in path (#1805) 2022-07-22 14:22:15 +02:00
Wolf Vollprecht 7954ad14a6
Merge pull request #1773 from AdrianFreundQC/feature-nodefaults
Add support for nodefaults channel
2022-07-20 16:46:40 +02:00
Jonas Haag 365ba23433 Change exit() to C++ exception 2022-07-19 17:39:54 +02:00
Adrian Freund f25702a638
Only check cli arguments for 'nodefaults' channel 2022-07-12 14:05:56 +02:00
Adrian Freund 0b6d81ac89
Add support for nodefaults channel 2022-07-01 15:08:14 +02:00
Joël Lamotte (Klaim) f3da147cd1 Fix: prevent Console from reinstantiate itself while being destroyed. 2022-05-10 12:26:52 +02:00
Wolf Vollprecht 9db5e26652
Implement micromamba login command (#1598) 2022-04-21 15:34:15 +02:00
Joël Lamotte (Klaim) 3674c213de Add support for environment lock file in `create` and `install` comands.
- add lockfile parsing functions with tests
- integrate lockfile detection and reading into `create` and `install`
2022-04-07 12:00:07 +02:00
Klaim (Joël Lamotte) 048cb67f62
Fix JSON output issues (#1600)
* Fixed: `--json` throwing exceptions in some situations (lockfiles)
* Refactored Console pimpl handling
* Automatic json printing instead of explicit.
* added a way to cancel the print of json log from libmamba, used in mamba which already output the right json;
From now on the json output will be automatically printed at the end of the program
(after `main()` call) instead of explicitly invoked.
2022-04-07 11:17:22 +02:00
Johan Mabille 5d986cdb7d Removed some iostream and functional from headers 2022-03-23 15:03:32 +01:00
Johan Mabille 6e493f023c Removed reproc.hpp from utils 2022-03-23 09:46:35 +01:00
Johan Mabille 489b3c0cc7 Refactored include chain 2022-03-22 16:29:17 +01:00
Wolf Vollprecht d232bcb9af
remove prefixdata from solver interface (#1550) 2022-03-21 17:33:38 +01:00
Johan Mabille c4699b19df Added expected for reference and removed poitners in the API 2022-03-21 14:50:39 +01:00
Johan Mabille 3eed546f4a Refactored error handling 2022-03-18 17:30:26 +01:00
Johan Mabille d5da2b3bf9 added static create method to PrefixData + error handling 2022-03-10 18:26:34 +01:00
Wolf Vollprecht d814d24c50
remove prefixdata.load() (#1555) 2022-03-02 18:06:06 +01:00
Johan Mabille 6b195b423a
Building MRepo objects through static function that register the repo into the pool (#1547) 2022-03-02 06:23:14 +01:00
Johan Mabille 5ce0c38b39
Storing repos in pool (#1546) 2022-03-01 15:21:15 +01:00
Johan Mabille 304bdb51b6
Stores channel into MSubdirdata and libsolv Repo appdata pointer (#1544) 2022-03-01 10:49:24 +01:00
Wolf Vollprecht 840ed07947
add --force-reinstall, --no-deps and --only-deps to micromamba (#1531) 2022-02-24 07:38:22 +01:00
Johan Mabille 6568e2e926
Refactoring of configuration system (#1500)
Simplified cli_config classes with std::optional
2022-02-17 23:44:50 +01:00
Austin Howard 14370be6ec
Reverting env variable wipe before running pip (#1477) 2022-02-10 19:01:26 +01:00
Wolf Vollprecht b50749798c propagate errors when installing with pip 2022-02-03 16:39:17 +01:00
Chris Burr 61c5de793c Only share environment with subprocesses if needed 2022-02-02 09:43:52 +01:00
Wolf Vollprecht 3a6ccea5c4 remove duplicated code 2022-01-27 18:41:13 +01:00
Adrien DELSALLE 9122c7aa8f
fix load channels in install 2022-01-27 16:12:47 +01:00
Adrien Delsalle 129920a304
Improve progress bars (#1350)
* refactor progress bars
* use fmt to better format progress bars fields
* add a Chrono class to handle time and status/state
* add a ProgressBarRepr class to handle representation of the bars
* add capability to remove progress bars from a manager
* add capability to set width when computing bars repr and printing
* handle no_progress_bars context value in all situations
* also ensure quiet, not a tty, and json modes are handled
* add and update tests
* make it optional to display sub-bars in aggregated mode
* display a carrousel of downloading or extracting packages is the aggregated bar
* make sure extracting packages from cache are printed by the progress bars manager
* remove postfix when printing the completed download status
* protect chrono state against modifications when sorting bars
* fix to_human_readable_filesize free function
* only wait for watch_print thread to exit if started
* store speed, also compute average speed from member or Chrono elapsed time
* use the average speed on download aggregated bar if cURL info is missing
* allows to get average speed on total elapsed time
* improved color scheme of progress bars
* collect and show the in-progress status using cyan
* init the progress randomly when activating spinner
* control sorting of multi downloads using an option
* use C-style options also for fastfail
* make sure pbar manager is init on multi bars when dl channels
* refactor on api changes
2022-01-26 15:47:13 +01:00
Wolf Vollprecht c2028a629d add better update-all and repoquery, factor out load channels 2022-01-25 15:32:05 +01:00
Bas Zalmstra a42eb94886 misc: use a vector instead of json 2021-12-13 09:57:03 +01:00
Bas Zalmstra 2e8c82a018 feat: log json if solving failed 2021-12-10 11:09:00 +01:00
Wolf Vollprecht 010aad71a0
Merge pull request #1306 from wolfv/fix_prefix_unicode
Fix prefix unicode
2021-11-30 17:16:21 +01:00
Wolf Vollprecht d97ac17570 fix unicode on win 2021-11-30 16:22:52 +01:00
Wolf Vollprecht 95e382dc61 remove subprio from arch/noarch 2021-11-30 15:48:01 +01:00
Adrien DELSALLE 95e65b8114
use spdlog as logger backend
split verbosity and log level
use backtrace to replay logs on critical error
use backtrace to replay logs emitted before setting the log level, with the appropriate level
make libmamba compile time log level a cmake option
break circular dependencies
remove hard-coded config loading sequence
2021-11-05 10:46:22 +01:00
Adrien DELSALLE e2d23dc771
handle missing dependencies
handle not existing spec file
handle bad deps conversion
2021-11-03 19:34:15 +01:00
Adrien DELSALLE f4a5f0c607
improve yaml logged errors
give more info about wrong env vars
2021-11-03 19:01:26 +01:00
Adrien DELSALLE 3c869591c3
better catch reproc errors
catch reproc status indicating process killed or terminated
use newly created assert_reproc_success function to check other pkgmgr calls
throw an error only is no stop action could have killed or terminated the process
remove reproc_killed and reproc_terminated from API
link against reproc
2021-11-03 15:31:10 +01:00
Adrien Delsalle 88c6b7c0e9
Improve pyc compilation (#1249)
* fix pyc compilation when using explicit spec
* add target prefix as installed repo in explicit specs installation
* detect missing Python, warn and skip compilation
* also catch wrong Python version conversion from string
* add test
* add a compile_pyc configurable
* make it rc, env var and CLI configurable
2021-11-02 18:09:23 +01:00
Adrien Delsalle bff16c2bdc
Split projects (#1219)
* make a clear split between CMake targets
* split versions between libmamba and mamba
* add libmambapy target for python bindings and make mamba depend on it
* rename CMake options to make them homogeneous, simplify CMake
* remove termcolor from thirdparties, use it as a dependency
* remove unnecessary version global vars and convert to functions
* update CI workflows
2021-10-26 16:01:53 +02:00