Comments (11)
How to set up can automatically install kflash dependency package?
from platform-kendryte210.
You need to pack kflash tool with pre-installed Python packages. See example with https://bintray.com/beta/#/platformio/dl-packages/tool-pulp-debug-bridge?tab=files.
Please download this file tool-pulp-debug-bridge-darwin_x86
and take a look at scripts/build.py
.
Lines: 78-107.
So, the core idea is to install dependencies to python/site-packages
and later inject them into Python sitedir
.
from platform-kendryte210.
The problem has been solved, I made the download location of enum34 wrong, it should be installed in the file directory of pio
from platform-kendryte210.
This is a bug. You no need to install extra packages with PlatformIO. Package should contain all dependencies.
from platform-kendryte210.
I saw your example, but I still can't figure out what happened to the package during the installation process. Can I use pip directly during installation? Kflash has been released as a package in pypi, and its setup.py may be able to handle these dependencies.
from platform-kendryte210.
We don't run python setup.py
when installing a package. We just unpack it and move to ~/.platformio/packages
folder.
It's not easy to install Python package because it can lead to a lot of issues. There are built-in Python installation in OS, custom virtual environment for PIO Core etc... Each of them has own site-packages
storage.
So, keeping package totally independent of pip
resolves all issues with local Python installation. Also, it resolves issue with install package without administrative/sudo permissions.
from platform-kendryte210.
We need to pack enum34
and pyelftool
into the package. Could you try to do that?
from platform-kendryte210.
I am trying...
I noticed this function,
def install_pysite(dst, packages):
for package in packages:
subprocess.call(["pip", "install", "--no-compile", "-t", dst, package])
But I don't know how it is called. Is it executed once in kflash.py every time it runs?
from platform-kendryte210.
You can run pip install -t from CLI. That script was provided as a hint. You actually don’t need it.
from platform-kendryte210.
I used a simple way to get kflash out of dependencies, which can now be run directly.
This may not be a perfect method.
{
"sha1": "87ef5303917ff2e1fcc7b2bc194f67bd14e5f597",
"system": "*",
"url": "http://dl.sipeed.com/MAIX/platformio/dl-packages/tool-kflash-kendryte210-v0.8.2.tar.gz",
"version": "0.8.2"
},
from platform-kendryte210.
@btx000 Thanks! I think we can live with it :)
I've just deployed this package. I've just thought, we can actually can run $PYTHONEXE -m pip install platform.get_package_dir("tool-kflash-kendryte210")
before uploading. In this case, we will install kflash dependencies to PIO Core site-packages.
Nevertheless, keeping packages in an isolated environment is a better option.
from platform-kendryte210.
Related Issues (20)
- Error in compiling HOT 1
- Add Sipeed RV Debuger cfg file. HOT 4
- Update kendryte-standalone-sdk to v0.5.6 HOT 5
- Cannot Blink Built-in LED with Basic Example Code HOT 3
- Problems running the debugger HOT 9
- Board: sipeed-maixduino, framework=arduino HOT 7
- Spaces in path causes build errors (kendryte210) HOT 1
- Maix Bit with Sipeed USB-JTAG/TTL RISC-V Debugger HOT 1
- Support for ARM CPUs HOT 5
- Upload fails - no attribute IntFlag HOT 2
- Platformio outdated platform
- information: is there some specific #define for this platform? HOT 1
- Upgrade standalone SDK to 5.7 HOT 2
- Exceptions cause sys_exit in C++
- Wrong download link HOT 1
- Sipeed Maix Amigo board support HOT 3
- MAIXCube Support HOT 2
- tool-openocd-kendryte not available for linux_armv7l HOT 2
- Which board is for widora AIRV that used to use kendryte210 ?
- platformio - Problem with maix one dock(k210) in debug using openocd
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platform-kendryte210.