mirror of
https://github.com/rizinorg/rz-pipe.git
synced 2026-11-07 22:51:44 -10:00
* Use shutil to figure out where ls lives * Add contextlib shim for OpenBase * Improve OpenBase * Make shutil portable across python2/3 * Use print to print to sys.stderr * Renames for easier readibility * Improve indentation of help strings * Improve namings and fix default param list issue * Simplify comparison in native.py * Add requirements-dev.txt * Add format target which formats via black * Reformat using black * Improve the native module * Remove unnecessary usage of eval * Make pass through of lib functional * Improve import logic * Add context manager for convenience * Add a test for the native module * Add pytest make target * Use asyncio >= 3.6 style, improve overall quality * Add open_base_test Signed-off-by: 4thel00z <[email protected]>
49 lines
1.0 KiB
Makefile
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/*
|