Project has been moved to https://github.com/aivarannamaa/pipkin
aivarannamaa / minipip Goto Github PK
View Code? Open in Web Editor NEWProject moved to https://github.com/aivarannamaa/pipkin
License: MIT License
Project moved to https://github.com/aivarannamaa/pipkin
License: MIT License
Project has been moved to https://github.com/aivarannamaa/pipkin
When spec is a local tar.gz, then attempt with upip installer. All other cases where spec is not a simple distribution name, should be delegated to pip.
Currently minipip
only handles the case of single tar.gz
file without setup.py in it (ie upip-packages) on its own. All other cases get delegated to pip
.
There can be cases, when package publisher wants to provide different content for different targets. For example, most dependencies and content Adafruit-Blinka currently are not relevant for MicroPython.
I don't know whether someone has already used this approach, but according to PEP 425, the most natural thing to do is using separate wheels with micropython
or circuitpython
Python tag: https://www.python.org/dev/peps/pep-0425/#python-tag . Here is an experiment with this https://github.com/aivarannamaa/packaging_experiment.
If the communities accept this approach, then make sure minipip
supports it.
For this it is required to keep relevant files of *.dist-info
(or *.egg-info
) directories. Currently minipip deletes these directories after pip
completes.
The list
can be delegated to pip
. pip list --path ...
is happy, if only first few lines of the METADATA is kept, all other files can be deleted.
minipip uninstall --path ...
can be based on the RECORD file. pip uninstall
doesn't currently offer similar --path
flag, but it should not be hard to reimplement in minipip.
For upip packages PKG-INFO needs to be renamed to METADATA (TODO: check whether pip list
accepts PKG-INFO as well) and RECORD should be recreated.
... this way the user can plug in their CP device and do simply eg. minipip install adafruit-circuitpython-ssd1306
instead of minipip install --target C:\lib adafruit-circuitpython-ssd1306
The dependencies in Adafruit CircuitPython libraries at PyPI assume CPython target. As long as Adafruit doesn't publish different wheels for different targets (#5), a work-around is needed.
My idea is to pre-populate temporary target directory with (fake and empty?) Blinka installation, so that pip skips installing it. It is not clear, which version to assign for it, though... Latest stable version? When copying files over to the target device, minipip would simply skip Blinka.
MicroPython targets could benefit from (part of) Blinka, but they don't require Blinka's deps. For now, I'm skipping Blinka for MicroPython as well, as picking required parts would be more complex and I'm not sure how many people are interested in it anyway.
Currently pip
does not have means for overriding the value of implementation_name
when filtering dependencies. In particular, --implementation
option does not work for this. See pypa/pip#9981 for discussion.
I suppose this issue can't progress until pip
starts supporting overriding markers. I could try patching sys.implementation.name
, but even if it works with current version of pip
, this hack is not guaranteed to work in the future.
Thanks for working on this!
I'm on Fedora Silverblue 34, using Python version 3.9.6 and pip 21.0.1.
When I attempt to install CircuitPython libraries, I receive the following error message.
$ minipip install --port /dev/ttyACM1 --target /lib adafruit-circuitpython-framebuf
Processing 'adafruit-circuitpython-framebuf'
Querying package metadata from https://micropython.org/pi/adafruit-circuitpython-framebuf/json
Could not find 'adafruit-circuitpython-framebuf' from https://micropython.org/pi
Querying package metadata from https://pypi.org/pypi/adafruit-circuitpython-framebuf/json
Inspecting version 1.4.7
Installing with pip: ['adafruit-circuitpython-framebuf']
Usage:
/usr/bin/python3 -m pip <command> [options]
no such option: --no-compile
... to allow implementing #4 afterwards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.