-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added rules to build and install package
- Loading branch information
1 parent
0d5bfaa
commit 5c17208
Showing
1 changed file
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,33 @@ | ||
.PHONY: test | ||
.PHONY: test install uninstall | ||
|
||
PYTHON=python3 | ||
|
||
all: build dist | ||
|
||
test: | ||
@echo "Running Tests using Python3 BlueSky" | ||
@TESTING=true PYEXEC=python3 python3 -m pytest -s bluesky/test | ||
@echo "Running Tests using $(PYTHON) BlueSky" | ||
@TESTING=true PYEXEC=$(PYTHON) $(PYTHON) -m pytest -s bluesky/test | ||
|
||
lint: | ||
@autopep8 --in-place -r bluesky/test | ||
# the use of fixtures in pytest causes unused-argument and redefined-outer-name 'issues' | ||
@PYTHONPATH=`pwd`:${PYTHONPATH} pylint3 -d "invalid-name,bare-except,unused-argument,redefined-outer-name,too-many-arguments" bluesky/test || true | ||
@PYTHONPATH=`pwd`:${PYTHONPATH} $(PYTHON) -m pylint -d "invalid-name,bare-except,unused-argument,redefined-outer-name,too-many-arguments" bluesky/test || true | ||
|
||
clean: | ||
rm -rf dist/ build/ *egg-info* | ||
find -type d -name '__pycache__' | xargs rm -rf | ||
|
||
build: setup.py requirements.txt MANIFEST.in | ||
@"`which $(PYTHON)`" setup.py build | ||
|
||
dist: | ||
@"`which $(PYTHON)`" setup.py sdist bdist_wheel | ||
|
||
pypi: | ||
twine upload dist/* | ||
|
||
install: | ||
@cd dist && "`which $(PYTHON)`" -m pip install bluesky*.whl | ||
|
||
uninstall: | ||
@"`which $(PYTHON)`" -m pip uninstall bluesky-simulator |