-
Notifications
You must be signed in to change notification settings - Fork 976
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unix-ffi: Move more unix-only packages to unix-ffi.
With the dependencies captured in manifest.py, several packages in python-stdlib were still unix-only due to direct or transitive dependencies on unix-only or ffi modules. Or they just make no sense to run on microcontroller targets. In a few cases (e.g. base64) where possible, the unix dependency could be removed. Updates manifest.py to use the `unix_ffi=True` arg to `require()` for these libraries. Rename re-pcre to re now that unix-ffi is effectively its own namespace. Update unix-ffi/README.md, and strengthen the wording that the unix libraries are unmaintained. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
- Loading branch information
Showing
74 changed files
with
51 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
metadata(version="3.3.3-4") | ||
|
||
require("binascii") | ||
require("re-pcre") | ||
require("struct") | ||
|
||
module("base64.py") |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
metadata(version="0.5.1") | ||
|
||
require("binascii") | ||
require("os") | ||
require("os.path") | ||
|
||
module("uu.py") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
Unix-specific libraries | ||
======================= | ||
|
||
These are libraries that will only run on the Unix port of MicroPython. There is some limited support for the Windows port too. | ||
These are libraries that will only run on the Unix port of MicroPython, or are | ||
too big to be used on microcontrollers. There is some limited support for the | ||
Windows port too. | ||
|
||
**Note:** This directory is largely unmaintained, although large breaking changes are not expected. | ||
**Note:** This directory is unmaintained. | ||
|
||
Background | ||
---------- | ||
|
||
The libraries in this directory provide additional CPython compatibility using | ||
the host operating system's native libraries. | ||
|
||
This is implemented either by accessing the libraries directly via libffi, or by using built-in modules that are only available on the Unix port. | ||
This is implemented either by accessing the libraries directly via libffi, or | ||
by using built-in modules that are only available on the Unix port. | ||
|
||
In theory, this allows you to use MicroPython as a more complete drop-in | ||
replacement for CPython. | ||
|
||
Usage | ||
----- | ||
|
||
To use a unix-specific library, pass `unix_ffi=True` to `require()` in your | ||
manifest file. | ||
|
||
```py | ||
require("os", unix_ffi=True) # Use the unix-ffi version instead of python-stdlib. | ||
``` |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
python-stdlib/_markupbase/manifest.py → unix-ffi/_markupbase/manifest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
metadata(version="3.3.3-1") | ||
|
||
require("re-pcre") | ||
require("re", unix_ffi=True) | ||
|
||
module("_markupbase.py") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
python-stdlib/email.utils/manifest.py → unix-ffi/email.utils/manifest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
metadata(version="3.3.3-2") | ||
|
||
require("os") | ||
require("re-pcre") | ||
require("os", unix_ffi=True) | ||
require("re", unix_ffi=True) | ||
require("base64") | ||
require("random") | ||
require("datetime") | ||
require("urllib.parse") | ||
require("urllib.parse", unix_ffi=True) | ||
require("warnings") | ||
require("quopri") | ||
require("email.charset") | ||
require("email.charset", unix_ffi=True) | ||
|
||
package("email") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
# Originally written by Paul Sokolovsky. | ||
|
||
require("ffilib") | ||
require("ffilib", unix_ffi=True) | ||
|
||
module("fcntl.py") |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
metadata(version="3.3.3-1") | ||
|
||
require("os") | ||
require("os", unix_ffi=True) | ||
|
||
module("getopt.py") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
# Originally written by Paul Sokolovsky. | ||
|
||
require("ffilib") | ||
require("ffilib", unix_ffi=True) | ||
|
||
module("re.py") |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
# Originally written by Paul Sokolovsky. | ||
|
||
require("ffilib") | ||
require("ffilib", unix_ffi=True) | ||
|
||
module("signal.py") |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
# Originally written by Paul Sokolovsky. | ||
|
||
require("ffilib") | ||
require("ffilib", unix_ffi=True) | ||
|
||
module("sqlite3.py") |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
metadata(version="0.5") | ||
|
||
require("ffilib") | ||
require("ffilib", unix_ffi=True) | ||
|
||
module("time.py") |
4 changes: 2 additions & 2 deletions
4
python-stdlib/timeit/manifest.py → unix-ffi/timeit/manifest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
metadata(version="3.3.3-3") | ||
|
||
require("getopt") | ||
require("getopt", unix_ffi=True) | ||
require("itertools") | ||
# require("linecache") TODO | ||
require("time") | ||
require("time", unix_ffi=True) | ||
require("traceback") | ||
|
||
module("timeit.py") |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
python-stdlib/unittest/manifest.py → unix-ffi/unittest/manifest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
metadata(version="0.9.0") | ||
|
||
require("argparse") | ||
require("argparse", unix_ffi=True) | ||
require("fnmatch") | ||
|
||
module("unittest.py") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
python-stdlib/urllib.parse/manifest.py → unix-ffi/urllib.parse/manifest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.