Skip to content

Commit

Permalink
[#318] Introduced some quality of life improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
eoyilmaz committed Mar 9, 2024
1 parent 863ab1a commit 504f3b4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
/.venv/
.vscode/
/DisplayCAL/__version__.py
/build/
/dist/
Expand Down
9 changes: 5 additions & 4 deletions DisplayCAL/wxfixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
app = wx.GetApp() or wx.App(0)
result = wx.MessageBox(
"This application requires a version of wxPython "
"greater than or equal to %s, but your most recent "
"version is %s.\n\n"
"Would you like to download a new version of wxPython?\n"
% (".".join(str(n) for n in wx_minversion), wx.__version__),
"greater than or equal to {}, but your most recent "
"version is {}.\n\n"
"Would you like to download a new version of wxPython?\n".format(
".".join(str(n) for n in wx_minversion), wx.__version__
),
"wxPython Upgrade Needed",
style=wx.YES_NO,
)
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ NUM_CPUS = $(shell nproc || grep -c '^processor' /proc/cpuinfo)
SETUP_PY_FLAGS = --use-distutils
VERSION := $(shell cat VERSION_BASE)
VERSION_FILE=$(CURDIR)/VERSION_BASE
VIRTUALENV_DIR:=.venv

all: build FORCE

venv:
python3 -m venv .venv; \
source ./.venv/bin/activate; \
python3 -m venv $(VIRTUALENV_DIR); \
source ./$(VIRTUALENV_DIR)/bin/activate; \
pip install -r requirements.txt; \
pip install -r requirements-dev.txt;

build: venv FORCE
source ./.venv/bin/activate; \
source ./$(VIRTUALENV_DIR)/bin/activate; \
python3 -m build;

install:
source ./.venv/bin/activate; \
source ./$(VIRTUALENV_DIR)/bin/activate; \
pip install ./dist/DisplayCAL-$(VERSION)-*.whl;

launch:
Expand All @@ -39,6 +40,7 @@ clean-all: clean
-rm VERSION
-rm -Rf DisplayCAL.egg-info
-rm DisplayCAL/__version__.py
-rm -Rf $(VIRTUALENV_DIR)

html:
./setup.py readme
Expand All @@ -58,5 +60,9 @@ new-release:
# twine upload dist/DisplayCAL-$(VERSION).whl
twine upload dist/DisplayCAL-$(VERSION).tar.gz

tests: venv build install
source $(VIRTUALENV_DIR)/bin/activate; \
pytest -v -n auto -W ignore --color=yes --cov-report term;

# https://www.gnu.org/software/make/manual/html_node/Force-Targets.html
FORCE:

0 comments on commit 504f3b4

Please sign in to comment.