浏览代码

requirements: cleanup and fixes

- Unify Python dependencies into a single file, including editable
- Update brew requirements file (e.g. brew GCC is NOT usable)

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Gerard Marull-Paretas 4 月之前
父节点
当前提交
6f7729adba
共有 8 个文件被更改,包括 31 次插入81 次删除
  1. 1 6
      .github/workflows/build.yml
  2. 1 6
      .github/workflows/test.yml
  3. 1 9
      README.md
  4. 0 2
      requirements-brew.txt
  5. 0 38
      requirements-linux.txt
  6. 0 2
      requirements-osx.txt
  7. 23 17
      requirements.txt
  8. 5 1
      tools/tool_check.py

+ 1 - 6
.github/workflows/build.yml

@@ -39,12 +39,7 @@ jobs:
         run: |
           sudo apt-get update
           sudo apt-get install -y gettext gcc-multilib
-          pip install -r requirements-linux.txt
-          pip install -e \
-            python_libs/pblprog \
-            python_libs/pebble-commander \
-            python_libs/pulse2 \
-            python_libs/pebble-loghash
+          pip install -r requirements.txt
           wget --no-verbose "https://developer.arm.com/-/media/Files/downloads/gnu/${ARM_GNU_TOOLCHAIN_VERSION}/binrel/arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz"
           sudo tar xf arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz -C /opt
           echo "/opt/arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi/bin" >> $GITHUB_PATH

+ 1 - 6
.github/workflows/test.yml

@@ -37,12 +37,7 @@ jobs:
         run: |
           sudo apt-get update
           sudo apt-get install -y gettext gcc-multilib
-          pip install -r requirements-linux.txt
-          pip install -e \
-            python_libs/pblprog \
-            python_libs/pebble-commander \
-            python_libs/pulse2 \
-            python_libs/pebble-loghash
+          pip install -r requirements.txt
           wget --no-verbose "https://developer.arm.com/-/media/Files/downloads/gnu/${ARM_GNU_TOOLCHAIN_VERSION}/binrel/arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz"
           sudo tar xf arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz -C /opt
           echo "/opt/arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi/bin" >> $GITHUB_PATH

+ 1 - 9
README.md

@@ -51,15 +51,7 @@ may work right now.
   ```
 - Install dependencies:
   ```shell
-  pip install -r requirements-linux.txt
-  ```
-- Install local dependencies:
-  ```shell
-  pip install -e \
-    python_libs/pblprog \
-    python_libs/pebble-commander \
-    python_libs/pulse2 \
-    python_libs/pebble-loghash
+  pip install -r requirements.txt
   ```
 - Install emscripten
   - If you're on Mac and using [Homebrew](https://brew.sh), you can run `brew install emscripten`.

+ 0 - 2
requirements-brew.txt

@@ -1,9 +1,7 @@
-nanopb-generator
 freetype
 gettext
 llvm
 cmake
 lcov
 node
-arm-none-eabi-gcc
 emscripten

+ 0 - 38
requirements-linux.txt

@@ -1,38 +0,0 @@
-#--extra-index-url https://pebble:W9Ngyc3ohHFvLKfUUxmVruCmBaHQxNBCpfDCXyoAwLJgncZmAw@pypi.pbl.io/
-Pillow
-freetype-py
-ply==3.4
-pyusb==1.3.1
-pyserial
-sh==1.04
-pypng
-pexpect
-cobs==1.0.0
-svg.path
-requests
-GitPython==1.0.1
-pyelftools
-pycryptodome
-mock
-nose
-boto
-prompt-toolkit>=0.55
-enum34
-bitarray
-pep8
-polib
-intelhex>=2.1,<3
-protobuf
-grpcio-tools
-nanopb
-certifi
-libclang
-packaging
-
-# pypi.getpebble.com provided modules
-#pebble.loghash>=2.6
-#pebble.programmer>=0.0.4
-#pebble.commander==0.0.11
-libpebble2>=0.0.16
-pyftdi==0.56.0
-pathlib

+ 0 - 2
requirements-osx.txt

@@ -1,2 +0,0 @@
--r requirements.txt
-py2app

+ 23 - 17
requirements.txt

@@ -1,31 +1,37 @@
-#--extra-index-url https://pebble:W9Ngyc3ohHFvLKfUUxmVruCmBaHQxNBCpfDCXyoAwLJgncZmAw@pypi.pbl.io/
-Pillow==2.0.0
-freetype-py==1.0
+pillow
+freetype-py
 ply==3.4
-pyusb==1.0.0b2
-pyserial==2.7
+pyusb==1.3.1
+pyserial
 sh==1.04
-pypng==0.0.16
+pypng
 pexpect
-cobs<1.2.0
-svg.path<5
+cobs==1.0.0
+svg.path
 requests
 GitPython==1.0.1
-pyelftools==0.23
-pycrypto==2.6.1
+pyelftools
+pycryptodome
 mock
 nose
 boto
-prompt-toolkit>=0.55
+prompt_toolkit>=0.55
 enum34
 bitarray
 pep8
 polib
 intelhex>=2.1,<3
-
-# pypi.getpebble.com provided modules
-#pebble.loghash>=2.6
-#pebble.programmer>=0.0.4
-#pebble.commander==0.0.11
+protobuf
+grpcio-tools
+nanopb
+certifi
+libclang
+packaging
 libpebble2>=0.0.16
-#pyftdi==0.10.5
+pyftdi==0.56.0
+pathlib
+
+-e python_libs/pblprog
+-e python_libs/pebble-commander
+-e python_libs/pulse2
+-e python_libs/pebble-loghash

+ 5 - 1
tools/tool_check.py

@@ -20,7 +20,7 @@ from packaging import version
 
 from waflib import Logs
 
-REQUIREMENTS_OSX = 'requirements-osx.txt'
+REQUIREMENTS_OSX = 'requirements.txt'
 REQUIREMENTS_BREW = 'requirements-brew.txt'
 
 VERSION_REGEX = r"^(?P<package>.*)(?P<comparator>==|<=|>=|<|>)(?P<version>.*)"
@@ -69,6 +69,10 @@ def text_to_req_list(req_list_text):
     req_list = []
 
     for raw_line in req_list_text.splitlines():
+        # Skip editable (local) packages for now
+        if raw_line.startswith('-e'):
+            continue
+
         # Recursively handle -r includes
         if raw_line.startswith('-r '):
             with open(raw_line[3:]) as file: