platformio: 4.0.3 -> 4.1.0
This commit is contained in:
parent
c5d06b022b
commit
8c6f35a607
|
@ -1,8 +1,9 @@
|
||||||
{ stdenv, lib, buildPythonApplication, fetchFromGitHub
|
{ stdenv, lib, buildPythonApplication, fetchFromGitHub, fetchpatch
|
||||||
, bottle, click, colorama
|
, bottle, click, colorama, semantic-version
|
||||||
, lockfile, pyserial, requests
|
, lockfile, pyserial, requests
|
||||||
, pytest, semantic-version, tox, tabulate
|
, tabulate, pyelftools, marshmallow
|
||||||
, git
|
, pytest, tox, jsondiff
|
||||||
|
, git, spdx-license-list-data
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -39,6 +40,7 @@ let
|
||||||
"test_pkgmanifest.py::test_packages"
|
"test_pkgmanifest.py::test_packages"
|
||||||
]) ++ (map (e: "--ignore=tests/${e}") [
|
]) ++ (map (e: "--ignore=tests/${e}") [
|
||||||
"commands/test_boards.py"
|
"commands/test_boards.py"
|
||||||
|
"commands/test_check.py"
|
||||||
"commands/test_platform.py"
|
"commands/test_platform.py"
|
||||||
"commands/test_update.py"
|
"commands/test_update.py"
|
||||||
"test_maintenance.py"
|
"test_maintenance.py"
|
||||||
|
@ -47,25 +49,25 @@ let
|
||||||
|
|
||||||
in buildPythonApplication rec {
|
in buildPythonApplication rec {
|
||||||
pname = "platformio";
|
pname = "platformio";
|
||||||
version = "4.0.3";
|
version = "4.1.0";
|
||||||
|
|
||||||
# pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964
|
# pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "platformio";
|
owner = "platformio";
|
||||||
repo = "platformio-core";
|
repo = "platformio-core";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1naaa53cc7n7zyqggqjvvgkcq8cyzngdf904y9ag0x1vvb70f8j9";
|
sha256 = "10v9jw1zjfqr3wl6kills3cfp0ky7xbm1gc3z0n57wrqbc6cmz95";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
bottle click colorama git lockfile
|
bottle click colorama git lockfile
|
||||||
pyserial requests semantic-version
|
pyserial requests semantic-version
|
||||||
tabulate
|
tabulate pyelftools marshmallow
|
||||||
];
|
];
|
||||||
|
|
||||||
HOME = "/tmp";
|
HOME = "/tmp";
|
||||||
|
|
||||||
checkInputs = [ pytest tox ];
|
checkInputs = [ pytest tox jsondiff ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
|
@ -75,7 +77,20 @@ in buildPythonApplication rec {
|
||||||
runHook postCheck
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = [ ./fix-searchpath.patch ];
|
patches = [
|
||||||
|
./fix-searchpath.patch
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/platformio/platformio-core/commit/442a7e357636522e844d95375c246644b21a7802.patch";
|
||||||
|
sha256 = "0a3kj3k02237gr2yk30gpwc6vm04dsd1wxldj4dsbzs4a9yyi70m";
|
||||||
|
excludes = ["HISTORY.rst"];
|
||||||
|
})
|
||||||
|
./use-local-spdx-license-list.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substitute platformio/package/manifest/schema.py platformio/package/manifest/schema.py \
|
||||||
|
--subst-var-by SPDX_LICENSE_LIST_DATA '${spdx-license-list-data}'
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
broken = stdenv.isAarch64;
|
broken = stdenv.isAarch64;
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
--- ./platformio/proc.py-old 2017-09-29 01:20:08.174548250 +0200
|
diff --git a/platformio/proc.py b/platformio/proc.py
|
||||||
+++ ./platformio/proc.py 2017-09-29 01:19:48.410485308 +0200
|
index 80e50201..15cee5a5 100644
|
||||||
@@ -164,7 +164,7 @@
|
--- a/platformio/proc.py
|
||||||
isdir(join(p, "click")) or isdir(join(p, "platformio")))
|
+++ b/platformio/proc.py
|
||||||
|
@@ -167,7 +167,7 @@ def copy_pythonpath_to_osenv():
|
||||||
|
conditions.append(isdir(join(p, "click")) or isdir(join(p, "platformio")))
|
||||||
if all(conditions):
|
if all(conditions):
|
||||||
_PYTHONPATH.append(p)
|
_PYTHONPATH.append(p)
|
||||||
- os.environ['PYTHONPATH'] = os.pathsep.join(_PYTHONPATH)
|
- os.environ["PYTHONPATH"] = os.pathsep.join(_PYTHONPATH)
|
||||||
+ os.environ['PYTHONPATH'] = os.pathsep.join(sys.path)
|
+ os.environ["PYTHONPATH"] = os.pathsep.join(sys.path)
|
||||||
|
|
||||||
|
|
||||||
def get_serialports(filter_hwid=False):
|
def where_is_program(program, envpath=None):
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py
|
||||||
|
index f1d68e08..9b7b1da8 100644
|
||||||
|
--- a/platformio/package/manifest/schema.py
|
||||||
|
+++ b/platformio/package/manifest/schema.py
|
||||||
|
@@ -174,9 +174,5 @@ class ManifestSchema(Schema):
|
||||||
|
@staticmethod
|
||||||
|
@memoized(expire="1h")
|
||||||
|
def load_spdx_licenses():
|
||||||
|
- r = requests.get(
|
||||||
|
- "https://raw.githubusercontent.com/spdx/license-list-data"
|
||||||
|
- "/v3.7/json/licenses.json"
|
||||||
|
- )
|
||||||
|
- r.raise_for_status()
|
||||||
|
- return r.json()
|
||||||
|
+ import json
|
||||||
|
+ return json.load(open("@SPDX_LICENSE_LIST_DATA@/json/licenses.json"))
|
Loading…
Reference in New Issue