Skip to content

Commit

Permalink
Split Python requirements into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
ribbanya committed Feb 21, 2024
1 parent cd9123d commit 5fe4522
Show file tree
Hide file tree
Showing 18 changed files with 107 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ We use Python for our command line tooling. It is recommended that you use a [vi
```
1. After that, you can install or update our packages with:
```sh
pip install -r requirements.txt
pip install -r reqs/decomp.txt
```
1. Now you can run `decomp.py` to decomp a function using [m2c](https://github.com/matt-kempster/m2c). Pass it `-h` to see all the options.
```sh
Expand Down
2 changes: 1 addition & 1 deletion .github/packages/build-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ARG WIBO_PATH="/usr/local/sbin/wibo"
COPY --from=ghcr.io/decompals/wibo:latest \
${WIBO_PATH} \
${WIBO_PATH}
COPY requirements.txt /tmp/
ARG DEVKITPRO=/opt/devkitpro
ARG DEVKITPPC=${DEVKITPRO}/devkitPPC
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -30,6 +29,7 @@ ENTRYPOINT entrypoint.sh
FROM linux-rw AS gen-pages
COPY .github/packages/gen-pages/setup.sh /usr/local/bin
COPY tools/progress-site/package*.json /tmp
COPY /reqs/gen-pages.txt /tmp/reqs/
RUN setup.sh
COPY .github/packages/gen-pages/entrypoint.sh /usr/local/bin
ENTRYPOINT entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/packages/gen-pages/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ln -s /opt/mwcc_compiler tools/

cp -R /opt/venv .venv
. .venv/bin/activate
pip install --no-cache-dir -r requirements.txt
pip install --no-cache-dir -r reqs/gen-pages.txt

touch /output/.nojekyll

Expand Down
2 changes: 1 addition & 1 deletion .github/packages/gen-pages/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ popd
# Create and update Python venv
python -m venv --upgrade-deps /opt/venv
. /opt/venv/bin/activate
pip install --no-cache-dir -r /tmp/requirements.txt
pip install --no-cache-dir -r /tmp/reqs/gen-pages.txt

# Install melee compiler (for checking ctx.c)
curl -L "$MELEE_COMPILERS_URL" |
Expand Down
1 change: 1 addition & 0 deletions reqs/build.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests
16 changes: 16 additions & 0 deletions reqs/build.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile reqs/build.in
#
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
idna==3.6
# via requests
requests==2.31.0
# via -r reqs/build.in
urllib3==2.2.1
# via requests
6 changes: 6 additions & 0 deletions reqs/decomp.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
colorama
git+https://github.com/matt-kempster/m2c.git
pcpp
pyperclip
Pygments
pyelftools
22 changes: 22 additions & 0 deletions reqs/decomp.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile reqs/decomp.in
#
colorama==0.4.6
# via -r reqs/decomp.in
graphviz==0.20.1
# via m2c
m2c @ git+https://github.com/matt-kempster/m2c.git
# via -r reqs/decomp.in
pcpp==1.30
# via -r reqs/decomp.in
pycparser==2.21
# via m2c
pyelftools==0.30
# via -r reqs/decomp.in
pygments==2.17.2
# via -r reqs/decomp.in
pyperclip==1.8.2
# via -r reqs/decomp.in
2 changes: 2 additions & 0 deletions reqs/dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
black
isort
20 changes: 20 additions & 0 deletions reqs/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile reqs/dev.in
#
black==24.2.0
# via -r reqs/dev.in
click==8.1.7
# via black
isort==5.13.2
# via -r reqs/dev.in
mypy-extensions==1.0.0
# via black
packaging==23.2
# via black
pathspec==0.12.1
# via black
platformdirs==4.2.0
# via black
3 changes: 3 additions & 0 deletions reqs/diff.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TODO -e file:tools/asm-differ#egg=asm-differ
humanfriendly
argcomplete
10 changes: 10 additions & 0 deletions reqs/diff.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile reqs/diff.in
#
argcomplete==3.2.2
# via -r reqs/diff.in
humanfriendly==10.0
# via -r reqs/diff.in
1 change: 1 addition & 0 deletions reqs/gen-pages.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pcpp
8 changes: 8 additions & 0 deletions reqs/gen-pages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile reqs/gen-pages.in
#
pcpp==1.30
# via -r reqs/gen-pages.in
1 change: 1 addition & 0 deletions reqs/misc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GitPython
12 changes: 12 additions & 0 deletions reqs/misc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile reqs/misc.in
#
gitdb==4.0.11
# via gitpython
gitpython==3.1.42
# via -r reqs/misc.in
smmap==5.0.1
# via gitdb
14 changes: 0 additions & 14 deletions requirements.in

This file was deleted.

8 changes: 1 addition & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --strip-extras requirements.in
# pip-compile requirements.in
#
argcomplete==3.2.2
# via -r requirements.in
Expand All @@ -20,14 +20,10 @@ gitdb==4.0.11
# via gitpython
gitpython==3.1.41
# via -r requirements.in
graphviz==0.20.1
# via m2c
humanfriendly==10.0
# via -r requirements.in
isort==5.13.2
# via -r requirements.in
m2c @ git+https://github.com/matt-kempster/m2c.git
# via -r requirements.in
mypy-extensions==1.0.0
# via black
packaging==23.2
Expand All @@ -38,8 +34,6 @@ pcpp==1.30
# via -r requirements.in
platformdirs==4.1.0
# via black
pycparser==2.21
# via m2c
pyelftools==0.30
# via -r requirements.in
pygments==2.17.2
Expand Down

0 comments on commit 5fe4522

Please sign in to comment.