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

Conversation

asmodehn
Copy link
Contributor

This PR is only about having separate makefile rules for the different dependencies.
It will be simpler to deal with them separately in a subsequent PR.

@asmodehn
Copy link
Contributor Author

Q: How can I check that my changes don't break the TASTE build ?

@maxime-esa
Copy link
Contributor

The TASTE builds have their own CI on gitlab. Passing the CI here on Github is sufficient

@asmodehn asmodehn marked this pull request as ready for review December 18, 2022 16:33
Makefile Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated
@@ -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.

@asmodehn asmodehn mentioned this pull request Jan 3, 2023
python3 -m pip install --user --upgrade pyside6 pygraphviz stringtemplate3 singledispatch

dependencies: ~/.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)

@asmodehn
Copy link
Contributor Author

FYI I am planning to merge the recent master in this branch. I haven't looked at it in a while, and I want to make sure everything still works fine with version 4.0. Hopefully sometime in the next few days.

@asmodehn
Copy link
Contributor Author

Everything looks fine, I merged master in this branch, and did an install again:

  • system dependencies were installed
  • pip dependencies were installed
  • the new opengeode version replaced the old one
$ make install
sudo apt install -y python3 python3-pip libgl1 gnat python3-pexpect graphviz libgraphviz-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libgl1 is already the newest version (1.4.0-1).
python3-pexpect is already the newest version (4.8.0-2ubuntu1).
gnat is already the newest version (10.1ubuntu1).
graphviz is already the newest version (2.42.2-6).
libgraphviz-dev is already the newest version (2.42.2-6).
python3-pip is already the newest version (22.0.2+dfsg-1ubuntu0.1).
python3 is already the newest version (3.10.6-1~22.04).
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.

# 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 pygraphviz stringtemplate3 singledispatch
Requirement already satisfied: pyside6 in /home/alexv/.local/lib/python3.10/site-packages (6.4.2)
Requirement already satisfied: pygraphviz in /home/alexv/.local/lib/python3.10/site-packages (1.10)
Requirement already satisfied: stringtemplate3 in /home/alexv/.local/lib/python3.10/site-packages (3.1)
Requirement already satisfied: singledispatch in /home/alexv/.local/lib/python3.10/site-packages (4.0.0)
Requirement already satisfied: PySide6-Addons==6.4.2 in /home/alexv/.local/lib/python3.10/site-packages (from pyside6) (6.4.2)
Requirement already satisfied: PySide6-Essentials==6.4.2 in /home/alexv/.local/lib/python3.10/site-packages (from pyside6) (6.4.2)
Requirement already satisfied: shiboken6==6.4.2 in /home/alexv/.local/lib/python3.10/site-packages (from pyside6) (6.4.2)

PATH=~/.local/bin:"...user's path..." pyside6-rcc opengeode.qrc -o opengeode/icons.py

python3 -m pip install --user --upgrade .
Processing /opt/Projects/opengeode
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: opengeode
  Building wheel for opengeode (setup.py) ... done
  Created wheel for opengeode: filename=opengeode-4.0.2-py3-none-any.whl size=8785945 sha256=34a7c5f99f73dce49fcb89eef72c4f8d85d6c7ab30f002828c893a9fe36c48d2
  Stored in directory: /tmp/pip-ephem-wheel-cache-_4y1loep/wheels/55/7c/a9/e80fe9b24e508f9a3f0c8dc9afa74cee43da45faa7ebea4ab0
Successfully built opengeode
Installing collected packages: opengeode
  Attempting uninstall: opengeode
    Found existing installation: opengeode 3.13.0
    Uninstalling opengeode-3.13.0:
      Successfully uninstalled opengeode-3.13.0
Successfully installed opengeode-4.0.2

(newlines added for readability)

And running opengeode opens the GUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants