Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make separate dependencies rules #89

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,24 @@ update:
/tmp/antlr3_python3_runtime_3.4:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path is temporary and cleaned up on reboot. Why don't you check for a file where the antlr runtime has actually been installed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, that would be better...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, turns out it only install python libraries, no binary, so the location would depend on the virtualenv setup and the python version used... I might take the option to download and extract in the working directory to avoid multiple downloads... until all pip requirements are managed directly via python/pip.

# python3-antlr3 runtime is not available in any official repo, taking in from TASTE
cd /tmp ; wget -q -O - https://download.tuxfamily.org/taste/antlr3_python3_runtime_3.4.tar.bz2 | tar jxpvf - ; cd antlr3_python3_runtime_3.4 ; python3 -m pip install --user --upgrade .
sudo apt install -y python3-pygraphviz
sudo apt install -y python3-stringtemplate3
sudo apt install -y python3-singledispatch

pyside6-pip:
sudo apt install -y python3 python3-pip
pip-packages: dependencies
# Note : these could be installed via setup.py or requirements.txt
# installing pyside6 through pip because of bugs with QML in the Debian bullseye release
python3 -m pip install --user --upgrade pyside6
python3 -m pip install --user --upgrade pyside6 pygraphviz stringtemplate3 singledispatch

dependencies: pyside6-pip /tmp/antlr3_python3_runtime_3.4 ~/.local/bin/asn1scc
# TODO: These should move into the dependency where they are actually needed
sudo apt install -y libgl1 gnat python3-pexpect
dependencies: /tmp/antlr3_python3_runtime_3.4 ~/.local/bin/asn1scc
sudo apt install -y python3 python3-pip libgl1 gnat python3-pexpect graphviz libgraphviz-dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have you replaced python3-pygraphviz with graphviz + libgraphviz-dev + pygraphviz from pip?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If pygraphviz is a dependency of opengeode, it should be installed when opengeode is installed (via pip in the perspective of opengeode being installed as any python package).
Therefore I rely on pygraphviz from pip.
The installer of pygraphviz will detect if the appropriate graphviz libraries are installed on the machine, so I let pygraphviz deal with its dependencies. Ref: https://pygraphviz.github.io/documentation/stable/install.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that's good for me (I tried it, it works)


opengeode/icons.py: opengeode.qrc pip-packages
pyside6-rcc opengeode.qrc -o opengeode/icons.py

install:
PATH=~/.local/bin:"${PATH}" pyside6-rcc opengeode.qrc -o opengeode/icons.py && python3 -m pip install --user --upgrade .
asmodehn marked this conversation as resolved.
Show resolved Hide resolved
install: opengeode/icons.py pip-packages
python3 -m pip install --user --upgrade .

full-install: update
$(MAKE) dependencies
maxime-esa marked this conversation as resolved.
Show resolved Hide resolved
$(MAKE) pip-packages
$(MAKE) install

publish:
Expand Down