Skip to content

Commit

Permalink
try to restore tox
Browse files Browse the repository at this point in the history
  • Loading branch information
samirg1 committed Sep 1, 2023
1 parent 9f0d237 commit 8314722
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 30 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
pip install -r ./requirements_dev.txt
- name: Tests
run: pytest
- name: Typing
run: mypy src
- name: Formatting
run: black src
pip install tox tox-gh-actions
- name: Test with tox
run: tox
23 changes: 23 additions & 0 deletions exe_setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import sys

from cx_Freeze import Executable, setup # type: ignore

build_exe = {
"excludes": ["pytest", "PyQt6", "PyQt5", "cv2", "numpy", "mypy", "test", "email", "pydoc_data", "multiprocessing", "rubicon"],
"packages": ["pyautogui", "pyperclip", "attrs", "pynput"],
"include_msvcr": True,
"include_files": ["autosmx.png"],
}

bdist_mac = {"iconfile": "autosmx.ico", "bundle_name": "AutoSMX"}

base = "Win32GUI" if sys.platform == "win32" else None

setup(
name="AutoSMX",
version="1.0.0",
description="GUI Automater for SMX",
author="Samir Gupta",
options={"build_exe": build_exe, "bdist_mac": bdist_mac},
executables=[Executable("src/App.py", base=base, target_name="AutoSMX", icon="autosmx.ico")],
)
25 changes: 3 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
import sys
from setuptools import setup

from cx_Freeze import Executable, setup # type: ignore

build_exe = {
"excludes": ["pytest", "PyQt6", "PyQt5", "cv2", "numpy", "mypy", "test", "email", "pydoc_data", "multiprocessing", "rubicon"],
"packages": ["pyautogui", "pyperclip", "attrs", "pynput"],
"include_msvcr": True,
"include_files": ["autosmx.png"],
}

bdist_mac = {"iconfile": "autosmx.ico", "bundle_name": "AutoSMX"}

base = "Win32GUI" if sys.platform == "win32" else None

setup(
name="AutoSMX",
version="1.0.0",
description="GUI Automater for SMX",
author="Samir Gupta",
options={"build_exe": build_exe, "bdist_mac": bdist_mac},
executables=[Executable("src/App.py", base=base, target_name="AutoSMX", icon="autosmx.ico")],
)
if __name__ == "__main__":
setup()
24 changes: 24 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tox]
minversion = 4.8.0
envlist = py310, py311, black, mypy
isolated_build = true

[gh-actions]
python =
3.10: py310
3.11: py311

[testenv]
setenv = PYTHONPATH = {toxinidir}
deps = -r{toxinidir}/requirements_dev.txt
commands = pytest --basetemp={envtmpdir}

[testenv:black]
basepython = python3.11
deps = black
commands = black src

[testenv:mypy]
basepython = python3.11
deps = -r{toxinidir}/requirements_dev.txt
commands = mypy src

0 comments on commit 8314722

Please sign in to comment.