Wykres commitów

50 Commity (5cb3fe10f0a534f1506bde6a4b757e3d2cb0c048)

Autor SHA1 Wiadomość Data
Anne Jan Brouwer e8053fb06a upip: Add server_hostname param to ussl.wrap_socket() call. 2017-06-15 16:04:58 +02:00
Paul Sokolovsky 91d9c168b8 upip: url_open: Reworking error handling to guaranteedly close socket. 2017-05-05 03:25:07 +03:00
Paul Sokolovsky 024d6bc2b1 upip: install_pkg: Use try-finally to ensure opened socket always closed. 2017-05-05 03:17:21 +03:00
Paul Sokolovsky 1bfd389a81 upip: url_open: If --debug, dump URL being opened. 2017-05-04 10:44:54 +03:00
Paul Sokolovsky c9337def58 upip: Treat PyPI redirects as "package not found".
PyPI has got too smart and redirects typos, etc. to a similarly-called
packages.
2017-05-04 10:17:27 +03:00
Paul Sokolovsky 823b743daf upip: get_pkg_metadata: Use ujson.load() to save memory. 2017-05-04 01:12:58 +03:00
Paul Sokolovsky aa02e41056 upip: Allow to have commented packages in requirements.txt. 2017-05-01 00:02:33 +03:00
Paul Sokolovsky 1f91189e04 upip: Be sure to close socket if we abort with error early.
Need to close properly in more places.
2017-02-08 01:14:56 +03:00
Paul Sokolovsky a86e7cf5a7 upip: Report host name resolve error in user friendly manner. 2017-02-08 01:12:45 +03:00
Paul Sokolovsky 068988085e upip: Report package not found and similar errors with less noise.
While still allow to get full backtrace with --debug.
2017-02-08 00:39:47 +03:00
Paul Sokolovsky 7e9eed98cb upip: Fix handling of non-existing absolute install paths.
The latest refactor of _makedirs() had a buf preventing to create them
properly.
2016-10-22 21:07:56 +03:00
Paul Sokolovsky 2c83920f36 upip: Fix heap size to use for decreased gzip dictionary.
Original intended value is 64K of heap or smaller, 640K figure was a
testing one.
2016-10-12 18:14:07 +03:00
Paul Sokolovsky 2696367cda upip: Add explicit gc.collect() calls for low-heap ports. 2016-10-11 00:07:39 +03:00
Paul Sokolovsky 8fa7dcc9c0 upip: Use gzip dictionary size depending on heap size available.
For systems with 64K of heap or less, use small dictionary size of 4KB.
Otherwise, use standard 32KB.
2016-10-09 02:19:53 +03:00
Paul Sokolovsky d804100c20 upip: Add import-based usage help. 2016-10-09 02:13:05 +03:00
Paul Sokolovsky 47a6633a31 upip: Don't parse MICROPYPATH, just use sys.path[1] as set by micropython.
Makes POSIX and baremetal behavior simpler and more consistent.
2016-10-09 02:12:31 +03:00
Paul Sokolovsky 1ca07881e3 upip: A bit better reporting of networking errors. 2016-10-08 14:56:09 +03:00
Paul Sokolovsky 29c90a6231 upip: Don't rely on presence of directory entries in tar.
Just create intermediate path components for every filename.
2016-10-08 14:41:41 +03:00
Paul Sokolovsky 69390da38f upip: _makedirs(): Make compatible with FatFs quirks.
Don't have trailing "/" in paths.
2016-10-08 01:17:20 +03:00
Paul Sokolovsky c06f693ac3 upip: expandhome(): Call uos.getenv() only if there's something to expand.
To work on baremetal targets without getenv().
2016-10-08 00:36:24 +03:00
Paul Sokolovsky f115b8c22f upip: install(): Accept single package name in addition to a list. 2016-10-08 00:25:29 +03:00
Paul Sokolovsky bf63593305 upip: Factor out deducing default installation path to a function.
Make this deducing friendly to baremetal systems by falling back to
sys.path if os.getenv() is not available (sys.path[1] is used as
an install path in this case).
2016-10-08 00:12:17 +03:00
Paul Sokolovsky c1bfa36dbf upip: Factor out install() function. 2016-10-07 01:41:19 +03:00
Paul Sokolovsky ce843f3ffc upip: Make importable as a module. 2016-10-07 01:27:50 +03:00
Paul Sokolovsky 542c8cf9ef upip: save_file(): Optimize, use inplace buffer. 2016-10-06 00:50:55 +03:00
Paul Sokolovsky ab714615c6 upip: Remove wget fallback. 2016-10-01 17:32:07 -07:00
Paul Sokolovsky cbc423ae41 upip: Remove unneed cruft.
upip now works only with MicroPython, and the only Py-level dependency is
upip_utarfile.
2016-09-30 00:28:29 -07:00
Paul Sokolovsky 6764d27d78 upip: Switch to stream mode of operation using uzlib.DecompIO.
So, there's no longer requirement that uncompressed file fit into memory,
though for stream mode, max dictionary size of 32K is used so far.
2016-09-28 09:00:33 -07:00
Michaël Schrijver 2903d599c7 upip: Initialize socket with protocol family as gotten from resolver.
Fixes working over IPv6.
2016-09-12 23:56:36 +03:00
Paul Sokolovsky 8bb8b59dc3 upip: Add installation path hints to usage message. 2016-05-28 02:56:31 +03:00
Paul Sokolovsky d6f91563e6 upip: Use uerrno module, drop errno dependency.
uerrno is a recently added builtin module.
2016-05-28 02:56:11 +03:00
Paul Sokolovsky 6cd414e0b5 upip: Print warning about not validatng PyPI SSL certificate.
Suggested by upstream (CPython).
2016-05-27 00:27:28 +03:00
Paul Sokolovsky 14e945f1a3 upip: Builtin module was renamed to "uos" (consistent with stmhal, etc.) 2015-12-12 00:17:42 +02:00
Nico cd1fea8798 upip: MaxOSX mkdir("/") returns EISDIR, and not EEXIST.
Unlike Linux, which return EEXIST. This MacOSX behavior is not documented
in the official documentation:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/mkdir.2.html
(EISDIR isn't described as possible error for mkdir()!), but other projects
had to apply similar workarounds, e.g.:
https://github.com/janestreet/core/issues/7 . The issue appear to happen
only for root directory path, but workaround is applied conservatively
just in case.
2015-11-15 00:10:30 +02:00
Paul Sokolovsky 4b2d7e91ff upip: Workaround _os.getenv() accepting only 1 argument. 2015-11-14 17:51:55 +02:00
Paul Sokolovsky bd37778efb upip: Get rid of FFI dependency, use builtin _os module instead.
Also, delete as many as possible other dependencies (needed functions
are just copied into codebase). This will allow to work on static
MicroPython builds (including being a first step to support bare-metal
ports).
2015-11-14 00:02:10 +02:00
Paul Sokolovsky b9ca8ea921 upip: Honor MICROPYPATH environment variable. 2015-10-17 20:11:22 +03:00
Paul Sokolovsky 8c749d292a upip: Add support for native (no wget) SSL operations using ussl module. 2015-09-03 17:27:55 +03:00
Paul Sokolovsky f568238a0f upip: Try to detect and report package noy found condition.
Doesn't work to well while using wget, may be mixed up with another
server error.
2015-06-25 01:38:30 +03:00
Paul Sokolovsky be4f508122 upip: Clarify help message. 2015-05-09 00:25:27 +03:00
Paul Sokolovsky a8edf7f0c8 upip: Dump a line per installed package in non-debug mode. 2015-05-04 00:10:51 +03:00
Paul Sokolovsky b90bca7468 upip: Reduce amount of debug output (use --debug to re-enable). 2015-05-04 00:10:51 +03:00
Paul Sokolovsky e143637b50 upip: Don't install README files. 2015-05-04 00:10:51 +03:00
Paul Sokolovsky 267b21252d upip: Clean up downloaded and temporary files unless --debug is given. 2015-05-04 00:10:51 +03:00
Paul Sokolovsky a33a93cc9f upip: Name temporing files with starting dot. 2015-05-04 00:10:51 +03:00
Paul Sokolovsky e8e7e84a89 upip: Capture recursive dependencies required for standalone running.
Also, improve package import handling.
2015-02-18 19:56:50 +02:00
Paul Sokolovsky 16431da542 upip: Add quick help. 2015-02-13 11:07:21 +08:00
Paul Sokolovsky 3f79fc64d3 upip: Prepare to support standalone dependency modules for upip. 2015-02-10 11:36:47 +08:00
Paul Sokolovsky 5fd3d0d860 upip: Implement install -r option (install from requirements file). 2015-02-09 09:58:04 +08:00
Paul Sokolovsky 3cccc69aac upip: Initial steps towards self-hosted package manager.
Already capable of installing packages from command line, resolving
dependencies recursively. Downloading is handled via wget due to
SSL, so currently this is not self-hosted.
2015-02-08 09:15:42 +02:00