File tree Expand file tree Collapse file tree 5 files changed +70
-1
lines changed Expand file tree Collapse file tree 5 files changed +70
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Package mpremote
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v2
10
+ with :
11
+ # Version is determined from git,
12
+ # should be deep enough to get to latest tag
13
+ fetch-depth : ' 500'
14
+ - run : |
15
+ git fetch --prune --unshallow --tags
16
+ - uses : actions/setup-python@v1
17
+ - name : Install build tool
18
+ run : pip install build
19
+ - name : Build mpremote wheel
20
+ run : cd tools/mpremote && pip wheel .
21
+ - name : Archive mpremote wheel
22
+ uses : actions/upload-artifact@v2
23
+ with :
24
+ name : mpremote
25
+ path : |
26
+ tools/mpremote/mpremote*.whl
Original file line number Diff line number Diff line change
1
+ /mpremote /makemanifest.py
2
+ /mpremote /pyboard.py
3
+ /mpremote.egg-info
4
+ /dist
5
+ * .whl
Original file line number Diff line number Diff line change
1
+ import shutil
2
+ from pathlib import Path
3
+ from setuptools .build_meta import (
4
+ get_requires_for_build_wheel ,
5
+ get_requires_for_build_sdist ,
6
+ prepare_metadata_for_build_wheel ,
7
+ build_wheel as real_build_wheel ,
8
+ build_sdist as real_build_sdist ,
9
+ )
10
+
11
+
12
+ PACKAGE = Path (__file__ ).parent / "mpremote"
13
+ TOOLS_DIR = Path (__file__ ).parent / "../../tools"
14
+
15
+
16
+ def copy_tools ():
17
+ if TOOLS_DIR .exists ():
18
+ for f in (
19
+ TOOLS_DIR / "pyboard.py" ,
20
+ TOOLS_DIR / "makemanifest.py" ,
21
+ ):
22
+ print ("copy {} -> {}" .format (f , PACKAGE ))
23
+ shutil .copy (f , PACKAGE )
24
+
25
+
26
+ def build_wheel (wheel_directory , config_settings = None , metadata_directory = None ):
27
+ copy_tools ()
28
+ return real_build_wheel (wheel_directory , config_settings , metadata_directory )
29
+
30
+
31
+ def build_sdist (sdist_directory , config_settings = None ):
32
+ copy_tools ()
33
+ return real_build_sdist (sdist_directory , config_settings )
Original file line number Diff line number Diff line change @@ -3,8 +3,12 @@ requires = [
3
3
" setuptools>=42" ,
4
4
" wheel" ,
5
5
" setuptools_scm>=6.2" ,
6
+ " intreehooks" ,
6
7
]
7
- build-backend = " setuptools.build_meta"
8
+ build-backend = " intreehooks:loader"
9
+
10
+ [tool .intreehooks ]
11
+ build-backend = " build"
8
12
9
13
[tool .setuptools_scm ]
10
14
root = " ../.."
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ packages = mpremote
19
19
python_requires = >= 3.4
20
20
install_requires =
21
21
pyserial >= 3.3
22
+ include_package_data = True
22
23
23
24
[options.entry_points]
24
25
console_scripts =
You can’t perform that action at this time.
0 commit comments