CadQuery / CQ-editor

CadQuery GUI editor based on PyQT
Apache License 2.0
757 stars 116 forks source link

Add dependencies to setup.py for Pip install #357

Open sethfischer opened 2 years ago

sethfischer commented 2 years ago

Tested on Ubuntu 20.04 with Python 3.9.

Pip

python3.9 -m venv .venv
. .venv/bin/activate
pip install -U pip
pip install git+https://github.com/sethfischer/CQ-editor.git@352-setup-deps

Poetry

Experimental.

python3.9 -m venv .venv
. .venv/bin/activate
pip install -U pip
poetry init --name="test" --python=">=3.8,<3.11" --no-interaction
poetry add casadi==3.5.5
poetry add git+https://github.com/sethfischer/CQ-editor.git@352-setup-deps
pip install -U setuptools

Closes #352

codecov[bot] commented 2 years ago

Codecov Report

Merging #357 (acbe221) into master (4b461fe) will decrease coverage by 0.04%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
- Coverage   88.59%   88.55%   -0.04%     
==========================================
  Files          19       19              
  Lines        1490     1546      +56     
  Branches      204      187      -17     
==========================================
+ Hits         1320     1369      +49     
- Misses        137      143       +6     
- Partials       33       34       +1     

see 7 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

darrellenns commented 2 years ago

Tested successfully in a venv on Arch Linux with Python 3.10

jdegenstein commented 1 year ago

Based on working with my pyinstaller static builds and some recent changes to a few of the dependencies, here is my recommendation, which has been tested on Windows.

    install_requires=[
        "logbook>=1",
        "ipython==8.4.0",
        "jedi==0.17.2",
        "path>=16",
        "PyQt5>=5",
        "requests>=2,<3",
        "spyder>=5,<6",
        "pyqtgraph==0.12.4",
    ],
crealytic commented 1 year ago

I would be very happy to be able to install CQ-Editor and its correct dependencies with pip. I am on Ubuntu Linux

jschall commented 1 year ago

@sethfischer I rebased this on master and tried to install using sudo pip3 install .

It installs, but when I try to run cq-editor, I am getting:

jschall@jc-laptop:~/CQ-editor ((HEAD detached from sethfischer/352-setup-deps))$ cq-editor 
Traceback (most recent call last):
  File "/usr/local/bin/cq-editor", line 5, in <module>
    from cq_editor.__main__ import main
  File "/usr/local/lib/python3.10/dist-packages/cq_editor/__main__.py", line 12, in <module>
    from .main_window import MainWindow
  File "/usr/local/lib/python3.10/dist-packages/cq_editor/main_window.py", line 5, in <module>
    import cadquery as cq
  File "/usr/local/lib/python3.10/dist-packages/cadquery/__init__.py", line 14, in <module>
    from .occ_impl.shapes import (
  File "/usr/local/lib/python3.10/dist-packages/cadquery/occ_impl/shapes.py", line 59, in <module>
    from OCP.BRepAdaptor import (
ImportError: cannot import name 'BRepAdaptor_HCurve' from 'OCP.BRepAdaptor' (unknown location)
jschall commented 1 year ago

Solved by: sudo pip3 install git+https://github.com/CadQuery/cadquery.git@master And then got: ModuleNotFoundError: No module named 'PyQt5.QtSvg' Solved by: sudo apt install python3-pyqt5.qtsvg

DeflateAwning commented 1 month ago

What's the state of this? This seems like a good change