2 Commits

Author SHA1 Message Date
jdegenstein
9a41946bf6 ... PIP-TAR.yml -> disable linux/macos builds (only WIN) 2024-06-09 14:11:40 -05:00
jdegenstein
e9696209d0 ... -PIP-TAR.yml-> add choco install upx 2024-06-09 14:10:44 -05:00
6 changed files with 126 additions and 134 deletions

View File

@@ -9,131 +9,127 @@ on:
required: true required: true
default: 'dir' default: 'dir'
jobs: jobs:
build-linux-x86_64: # build-linux-x86_64:
runs-on: ubuntu-22.04 # runs-on: ubuntu-22.04
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1 # - uses: mamba-org/setup-micromamba@v1
with: # with:
environment-name: test # environment-name: test
environment-file: environment.yml # environment-file: environment.yml
init-shell: >- # init-shell: >-
bash # bash
# create-args: >- # - name: pip install cadquery CQ-editor ... etc
- name: pip install cadquery CQ-editor ... etc # shell: bash --login {0}
shell: bash --login {0} # run: |
run: | # sudo apt install -y libblas-dev libblas3 libblas64-3 libblas64-dev
sudo apt install -y libblas-dev libblas3 libblas64-3 libblas64-dev # sudo apt install -y libxkbcommon0 libxkbcommon-x11-0 libxcb-xinerama0
sudo apt install -y libxkbcommon0 libxkbcommon-x11-0 libxcb-xinerama0 # sudo apt install -y qtbase5-dev qt5-qmake
sudo apt install -y qtbase5-dev qt5-qmake # micromamba info
micromamba info # pip install pyopengl
pip install pyopengl # pip install git+https://github.com/jdegenstein/jmwright-CQ-Editor
pip install git+https://github.com/jdegenstein/jmwright-CQ-Editor # pip install -vvv --pre git+https://github.com/cadquery/cadquery casadi
pip install -vvv --pre git+https://github.com/cadquery/cadquery casadi # pip install pyinstaller>=5.6
pip install pyinstaller>=5.6 # pip install path
pip install path # pip install jupyter-rfb
pip install jupyter-rfb # pip install git+https://github.com/gumyr/cq_warehouse.git#egg=cq_warehouse
pip install git+https://github.com/gumyr/cq_warehouse.git#egg=cq_warehouse # pip install git+https://github.com/gumyr/bd_warehouse
pip install git+https://github.com/gumyr/bd_warehouse # pip install git+https://github.com/meadiode/cq_gears.git@main
pip install git+https://github.com/meadiode/cq_gears.git@main # pip install -e "git+https://github.com/CadQuery/cadquery-plugins.git#egg=cq_cache&subdirectory=plugins/cq_cache"
pip install -e "git+https://github.com/CadQuery/cadquery-plugins.git#egg=cq_cache&subdirectory=plugins/cq_cache" # pip install git+https://github.com/gumyr/build123d
pip install git+https://github.com/gumyr/build123d # pip install git+https://github.com/JustinSDK/cqMore
pip install git+https://github.com/JustinSDK/cqMore # pip list
pip list # - name: Run build
- name: Run build # shell: bash --login {0}
shell: bash --login {0} # run: |
run: | # micromamba activate test
micromamba activate test # micromamba info
micromamba info # pyinstaller pyinstaller_pip.spec ${{ github.event.inputs.type }}
echo $LD_LIBRARY_PATH # cp /home/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/pyinstaller/CQ-editor.sh /home/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/dist/
export LD_LIBRARY_PATH=/home/runner/micromamba/envs/test/lib # - uses: actions/upload-artifact@v4
echo $LD_LIBRARY_PATH # with:
pyinstaller --log-level=DEBUG pyinstaller_pip.spec ${{ github.event.inputs.type }} # name: CQ-editor-Linux-x86_64
cp /home/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/pyinstaller/CQ-editor.sh /home/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/dist/ # path: dist
- uses: actions/upload-artifact@v4 # build-macos-x86_64:
with: # runs-on: macos-13
name: CQ-editor-Linux-x86_64 # steps:
path: dist # - uses: actions/checkout@v4
build-macos-x86_64: # - uses: mamba-org/setup-micromamba@v1
runs-on: macos-13 # with:
steps: # environment-name: test
- uses: actions/checkout@v4 # environment-file: environment.yml
- uses: mamba-org/setup-micromamba@v1 # init-shell: >-
with: # bash
environment-name: test # - name: pip install cadquery CQ-editor ... etc
environment-file: environment.yml # shell: bash --login {0}
init-shell: >- # run: |
bash # micromamba info
- name: pip install cadquery CQ-editor ... etc # pip install git+https://github.com/jdegenstein/jmwright-CQ-Editor
shell: bash --login {0} # pip install --pre git+https://github.com/cadquery/cadquery casadi
run: | # pip install pyinstaller>=5.6
micromamba info # pip install path
pip install git+https://github.com/jdegenstein/jmwright-CQ-Editor # pip uninstall -y PyQt5
pip install --pre git+https://github.com/cadquery/cadquery casadi # pip install PyQt5==5.15.7
pip install pyinstaller>=5.6 # pip install PyQtWebEngine==5.15.6
pip install path # pip install git+https://github.com/gumyr/cq_warehouse.git#egg=cq_warehouse
pip uninstall -y PyQt5 # pip install git+https://github.com/gumyr/bd_warehouse
pip install PyQt5==5.15.7 # pip install git+https://github.com/meadiode/cq_gears.git@main
pip install PyQtWebEngine==5.15.6 # pip install -e "git+https://github.com/CadQuery/cadquery-plugins.git#egg=cq_cache&subdirectory=plugins/cq_cache"
pip install git+https://github.com/gumyr/cq_warehouse.git#egg=cq_warehouse # pip install git+https://github.com/gumyr/build123d
pip install git+https://github.com/gumyr/bd_warehouse # pip install git+https://github.com/JustinSDK/cqMore
pip install git+https://github.com/meadiode/cq_gears.git@main # pip list
pip install -e "git+https://github.com/CadQuery/cadquery-plugins.git#egg=cq_cache&subdirectory=plugins/cq_cache" # - name: Run build
pip install git+https://github.com/gumyr/build123d # shell: bash --login {0}
pip install git+https://github.com/JustinSDK/cqMore # run: |
pip list # micromamba activate test
- name: Run build # micromamba info
shell: bash --login {0} # pyinstaller pyinstaller_pip.spec ${{ github.event.inputs.type }}
run: | # cp /Users/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/pyinstaller/CQ-editor.sh /Users/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/dist/
micromamba activate test # - uses: actions/upload-artifact@v4
micromamba info # with:
pyinstaller pyinstaller_pip.spec ${{ github.event.inputs.type }} # name: CQ-editor-MacOS-x86_64
cp /Users/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/pyinstaller/CQ-editor-mac.sh /Users/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/dist/CQ-editor.sh # path: dist
- uses: actions/upload-artifact@v4 # build-macos-arm64:
with: # runs-on: macos-14
name: CQ-editor-MacOS-x86_64 # steps:
path: dist # - uses: actions/checkout@v4
build-macos-arm64: # - uses: mamba-org/setup-micromamba@v1
runs-on: macos-14 # with:
steps: # environment-name: test
- uses: actions/checkout@v4 # environment-file: environment.yml
- uses: mamba-org/setup-micromamba@v1 # init-shell: >-
with: # bash
environment-name: test # - name: pip install cadquery CQ-editor ... etc
environment-file: environment.yml # shell: bash --login {0}
init-shell: >- # run: |
bash # micromamba info
- name: pip install cadquery CQ-editor ... etc # pip install git+https://github.com/jdegenstein/jmwright-CQ-Editor
shell: bash --login {0} # pip install https://github.com/CadQuery/ocp-build-system/releases/download/7.7.2.0/cadquery_ocp-7.7.2-cp311-cp311-macosx_11_0_arm64.whl
run: | # pip install https://github.com/jdegenstein/nlopt-python/releases/download/2.7.1.3/nlopt-2.7.1-cp311-cp311-macosx_11_0_arm64.whl
micromamba info # pip install --pre git+https://github.com/cadquery/cadquery casadi
pip install git+https://github.com/jdegenstein/jmwright-CQ-Editor # pip install pyinstaller>=5.6
pip install https://github.com/CadQuery/ocp-build-system/releases/download/7.7.2.0/cadquery_ocp-7.7.2-cp311-cp311-macosx_11_0_arm64.whl # pip install path
pip install https://github.com/jdegenstein/nlopt-python/releases/download/2.7.1.3/nlopt-2.7.1-cp311-cp311-macosx_11_0_arm64.whl # pip uninstall -y PyQt5
pip install --pre git+https://github.com/cadquery/cadquery casadi # pip install PyQt5==5.15.10
pip install pyinstaller>=5.6 # pip install PyQtWebEngine==5.15.6
pip install path # pip install git+https://github.com/gumyr/cq_warehouse.git#egg=cq_warehouse
pip uninstall -y PyQt5 # pip install git+https://github.com/gumyr/bd_warehouse
pip install PyQt5==5.15.10 # pip install git+https://github.com/meadiode/cq_gears.git@main
pip install PyQtWebEngine==5.15.6 # pip install -e "git+https://github.com/CadQuery/cadquery-plugins.git#egg=cq_cache&subdirectory=plugins/cq_cache"
pip install git+https://github.com/gumyr/cq_warehouse.git#egg=cq_warehouse # pip install git+https://github.com/gumyr/build123d
pip install git+https://github.com/gumyr/bd_warehouse # pip install git+https://github.com/JustinSDK/cqMore
pip install git+https://github.com/meadiode/cq_gears.git@main # pip list
pip install -e "git+https://github.com/CadQuery/cadquery-plugins.git#egg=cq_cache&subdirectory=plugins/cq_cache" # - name: Run build
pip install git+https://github.com/gumyr/build123d # shell: bash --login {0}
pip install git+https://github.com/JustinSDK/cqMore # run: |
pip list # micromamba activate test
- name: Run build # micromamba info
shell: bash --login {0} # pyinstaller pyinstaller_pip.spec ${{ github.event.inputs.type }}
run: | # cp /Users/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/pyinstaller/CQ-editor.sh /Users/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/dist/
micromamba activate test # - uses: actions/upload-artifact@v4
micromamba info # with:
pyinstaller pyinstaller_pip.spec ${{ github.event.inputs.type }} # name: CQ-editor-MacOS-arm64
cp /Users/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/pyinstaller/CQ-editor-mac.sh /Users/runner/work/jmwright-CQ-Editor/jmwright-CQ-Editor/dist/CQ-editor.sh # path: dist
- uses: actions/upload-artifact@v4
with:
name: CQ-editor-MacOS-arm64
path: dist
build-windows: build-windows:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
@@ -148,6 +144,7 @@ jobs:
shell: bash --login {0} shell: bash --login {0}
run: | run: |
micromamba info micromamba info
choco install upx
pip install git+https://github.com/jdegenstein/jmwright-CQ-Editor pip install git+https://github.com/jdegenstein/jmwright-CQ-Editor
pip install --pre git+https://github.com/cadquery/cadquery casadi pip install --pre git+https://github.com/cadquery/cadquery casadi
pip install pyinstaller>=5.6 pip install pyinstaller>=5.6

View File

@@ -148,7 +148,7 @@ class Editor(CodeEditor,ComponentMixin):
if not self.confirm_discard(): return if not self.confirm_discard(): return
curr_dir = Path(self.filename).absolute().dirname() curr_dir = Path(self.filename).abspath().dirname()
fname = get_open_filename(self.EXTENSIONS, curr_dir) fname = get_open_filename(self.EXTENSIONS, curr_dir)
if fname != '': if fname != '':
self.load_from_file(fname) self.load_from_file(fname)

View File

@@ -186,7 +186,7 @@ class Debugger(QObject, ComponentMixin):
def _exec(self, code, locals_dict, globals_dict): def _exec(self, code, locals_dict, globals_dict):
with ExitStack() as stack: with ExitStack() as stack:
fname = self.parent().components["editor"].filename fname = self.parent().components["editor"].filename
p = Path(fname if fname else "").absolute().dirname() p = Path(fname if fname else "").abspath().dirname()
if self.preferences["Add script dir to path"] and p.exists(): if self.preferences["Add script dir to path"] and p.exists():
sys.path.insert(0, p) sys.path.insert(0, p)

View File

@@ -147,7 +147,7 @@ class Editor(CodeEditor,ComponentMixin):
if not self.confirm_discard(): return if not self.confirm_discard(): return
curr_dir = Path(self.filename).absolute().dirname() curr_dir = Path(self.filename).abspath().dirname()
fname = get_open_filename(self.EXTENSIONS, curr_dir) fname = get_open_filename(self.EXTENSIONS, curr_dir)
if fname != '': if fname != '':
self.load_from_file(fname) self.load_from_file(fname)

View File

@@ -1,4 +0,0 @@
#!/bin/sh
export QT_MAC_WANTS_LAYER=1
chmod u+x ./CQ-editor/CQ-editor
QT_QPA_PLATFORM=cocoa PYOPENGL_PLATFORM=x11 ./CQ-editor/CQ-editor

View File

@@ -26,7 +26,7 @@ setup(
"CQ-editor = cq_editor.__main__:main", "CQ-editor = cq_editor.__main__:main",
] ]
}, },
python_requires=">=3.10,<3.13", python_requires=">=3.8,<3.12",
install_requires=[ install_requires=[
"logbook>=1", "logbook>=1",
"ipython", "ipython",
@@ -35,6 +35,5 @@ setup(
"requests>=2,<3", "requests>=2,<3",
"spyder>=5,<6", "spyder>=5,<6",
"pyqtgraph", "pyqtgraph",
"numpy >= 2, <3",
], ],
) )