Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: build

on: [ push ]
on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
PYTHON ?= python3

all:
python setup.py sdist
python -m doctest ./customerio/__init__.py
$(PYTHON) setup.py sdist
$(PYTHON) -m doctest ./customerio/__init__.py

install:
python setup.py install
$(PYTHON) setup.py install

clean:
python setup.py clean
$(PYTHON) setup.py clean
rm -rf MANIFEST build dist

dev: clean all
if ! pip uninstall customerio; then echo "customerio not installed, installing it for the first time" ; fi
pip install dist/*
python -i -c "from customerio import *"
$(PYTHON) -i -c "from customerio import *"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete migration to PYTHON variable in upload target

Low Severity

The upload target still uses a hardcoded python on line 20 (python setup.py register) instead of $(PYTHON). Every other target was migrated to $(PYTHON), which defaults to python3. This inconsistency means the upload target may invoke a different Python interpreter (or fail entirely on systems where bare python is unavailable).

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9107693. Configure here.


upload:
python setup.py register
$(PYTHON) setup.py register
echo "*** Now upload the binary to PyPi *** (one second)" && sleep 3 && open dist & open "http://pypi.python.org/pypi?%3Aaction=pkg_edit&name=customerio" # python setup.py upload

test:
openssl req -new -newkey rsa:2048 -days 10 -nodes -x509 -subj "/C=CA/ST=Ontario/L=Toronto/O=Test/CN=127.0.0.1" -keyout ./tests/server.pem -out ./tests/server.pem
python -m unittest discover -v
$(PYTHON) -m unittest discover -v
Loading