mirror of https://github.com/mamba-org/mamba.git
merge upstream
This commit is contained in:
commit
4a10e52c85
11
bin/mamba
11
bin/mamba
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys, os
|
||||
|
||||
|
@ -97,7 +97,7 @@ def main():
|
|||
channel_json = [(str(x.channel), x.cache_path_json) for x in index]
|
||||
|
||||
installed_pkg_recs, output = get_installed_packages(prefix, show_channel_urls=True)
|
||||
installed_json_f = tempfile.NamedTemporaryFile('w')
|
||||
installed_json_f = tempfile.NamedTemporaryFile('w', delete=False)
|
||||
installed_json_f.write(json_dump(output))
|
||||
installed_json_f.flush()
|
||||
|
||||
|
@ -163,5 +163,12 @@ def main():
|
|||
conda_transaction = UnlinkLinkTransaction(pref_setup)
|
||||
handle_txn(conda_transaction, prefix, args, True)
|
||||
|
||||
try:
|
||||
installed_json_f.close()
|
||||
os.unlink(installed_json_f.name)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
|
|
@ -3,7 +3,16 @@
|
|||
#include <array>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <string_view>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <string_view>
|
||||
#else
|
||||
#include "thirdparty/string_view.hpp"
|
||||
namespace std {
|
||||
using namespace nonstd;
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
|
||||
extern "C"
|
||||
|
@ -31,6 +40,10 @@ std::string normalize_version(std::string_view version, int build_number)
|
|||
return out;
|
||||
}
|
||||
|
||||
std::string force_string(const std::string_view& sv) {
|
||||
return std::string(sv.cbegin(), sv.cend());
|
||||
}
|
||||
|
||||
std::string normalize_version(std::string_view version, int build_number, std::string_view build)
|
||||
{
|
||||
static const std::string zero = "0";
|
||||
|
@ -41,7 +54,7 @@ std::string normalize_version(std::string_view version, int build_number, std::s
|
|||
out += ".";
|
||||
out += std::to_string(build_number);
|
||||
out += "-";
|
||||
out += build;
|
||||
out += force_string(build);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,14 @@
|
|||
#include <array>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <string_view>
|
||||
#ifndef _WIN32
|
||||
#include <string_view>
|
||||
#else
|
||||
#include "thirdparty/string_view.hpp"
|
||||
namespace std {
|
||||
using namespace nonstd;
|
||||
}
|
||||
#endif
|
||||
#include <cassert>
|
||||
|
||||
extern "C"
|
||||
|
|
|
@ -37,6 +37,16 @@
|
|||
#ifndef PYSTRING_DEFAULT_STRING_VIEW
|
||||
// #include "string_view_lite.hpp"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <string_view>
|
||||
#else
|
||||
#include "thirdparty/string_view.hpp"
|
||||
namespace std {
|
||||
using namespace nonstd;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
namespace pystring
|
||||
{
|
||||
using string_view = std::string_view;
|
||||
|
|
|
@ -427,6 +427,15 @@ static inline void print_with_escapes(const char *src, std::ostream &os) {
|
|||
#ifndef SIMDJSON_JSONIOUTIL_H
|
||||
#define SIMDJSON_JSONIOUTIL_H
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <string_view>
|
||||
#else
|
||||
#include "../string_view.hpp"
|
||||
namespace std {
|
||||
using namespace nonstd;
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue