chore: track python dependencies with pip (#1447)

We're currently hardcoding various pip dependencies in
`appveyor-install.bat` and `travis-install.sh`.

This commit moves all the dependencies to a `requirements.txt` file in
the root of the project, and makes every install script run `pip install
-r requirements.txt`.

See: https://github.com/resin-io/etcher/pull/1401#discussion_r116547053
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2017-05-18 16:35:06 -04:00 committed by GitHub
parent 30ed217c79
commit 78f36dfd16
9 changed files with 19 additions and 7 deletions

View File

@ -1 +1,2 @@
*
!requirements.txt

1
.gitattributes vendored
View File

@ -24,6 +24,7 @@ Makefile text
*.svg text
*.yml text
*.patch text
*.txt text
# Binary files (no line-ending conversions)
*.bz2 binary diff=hex

View File

@ -12,9 +12,13 @@ Prerequisites
- [NodeJS](https://nodejs.org) (at least v6)
- [Python](https://www.python.org)
- [jq](https://stedolan.github.io/jq/)
- [Codespell](https://github.com/lucasdemarchi/codespell)
- [curl](https://curl.haxx.se/)
- [cpplint](https://github.com/cpplint/cpplint)
```sh
pip install -r requirements.txt
```
You might need to run this with `sudo` or administrator permissions.
### Windows

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
codespell==1.9.2
cpplint==1.3.0
awscli==1.11.87

View File

@ -41,4 +41,5 @@ RUN npm config set spin=false
RUN npm install -g uglify-es@3.0.3 electron-installer-debian@0.5.1
# Python
RUN pip install codespell==1.9.2 awscli cpplint
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

View File

@ -41,4 +41,5 @@ RUN npm config set spin=false
RUN npm install -g uglify-es@3.0.3 electron-installer-debian@0.5.1
# Python
RUN pip install codespell==1.9.2 awscli cpplint
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

View File

@ -41,4 +41,5 @@ RUN npm config set spin=false
RUN npm install -g uglify-es@3.0.3 electron-installer-debian@0.5.1
# Python
RUN pip install codespell==1.9.2 awscli cpplint
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

View File

@ -26,7 +26,7 @@ call choco install nsis -version 2.51 || ( EXIT /B 1 )
call choco install jq || ( EXIT /B 1 )
call choco install curl || ( EXIT /B 1 )
call pip install codespell==1.9.2 awscli cpplint || ( EXIT /B 1 )
call pip install -r requirements.txt || ( EXIT /B 1 )
call make info || ( EXIT /B 1 )
call make electron-develop || ( EXIT /B 1 )

View File

@ -37,7 +37,7 @@ else
npm config set spin=false
npm install -g uglify-es@3.0.3
pip install codespell==1.9.2 awscli cpplint
pip install -r requirements.txt
brew install afsctool jq
make info
make electron-develop