Files
rz-pipe/python/Makefile
T
Khairul Azhar Kasmiran 3b2fb66b56 ci: Fix Python rz-pipe test step (#59)
* Don't ignore errors
* Use pytest 8.3.3
* Remove rz-agent use from open_base_test.py test
2024-11-11 21:45:37 +08:00

49 lines
1.0 KiB
Makefile

PWD=$(shell pwd)
PYTHON?=python3
PYTHON_VERSION?=`${PYTHON} --version 2>&1 | cut -d ' ' -f 2 | cut -d . -f 1,2`
PYTHON_PKGDIR=$(shell ${PYTHON} ../../mp.py)
PYTHON_INSTALL_DIR=${DESTDIR}/${PYTHON_PKGDIR}/rzpipe
PYTHON3=python3
all:
$(PYTHON) setup.py build sdist
install: uninstall
$(PYTHON) setup.py install
clean:
$(PYTHON) setup.py clean
rm -rf dist
symstall: uninstall
ln -fs $(PWD)/rzpipe "$(PYTHON_INSTALL_DIR)"
twine:
sudo pip install twine
pytest:
@echo "Running the pytest"
PYTHONPATH=$$PWD $(PYTHON) -m pytest -p no:cacheprovider tests/
test: test2 test3
test2:
@echo "Testing $(PYTHON)"
-PYTHONPATH=$$PWD $(PYTHON) examples/bug.py
-PYTHONPATH=$$PWD $(PYTHON) examples/test.py
test3:
@$(MAKE) test2 PYTHON=$(PYTHON3)
uninstall:
rm -rf "$(PYTHON_INSTALL_DIR)"
format:
black $(PWD)/**/*.py
pub publish:
#LC_CTYPE=C python3 setup.py sdist upload -r pypi
#LC_CTYPE=C python setup.py sdist upload -r https://upload.pypi.org/pypi/
twine upload --repository-url https://upload.pypi.org/legacy/ --verbose dist/*