Skip to content

Commit

Permalink
makefile work
Browse files Browse the repository at this point in the history
  • Loading branch information
kalefranz committed Feb 4, 2017
1 parent 50d3f66 commit 92396a0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
PYTHON ?= $(shell which python)
BIN := $(shell dirname $(PYTHON))
TEST_PLATFORM := $(shell python -c "import sys; print('win' if 'win' in sys.platform else 'unix')")
PYTHON_MAJOR_VERSION := $(shell $(PYTHON) -c "import sys; print(sys.version_info[0])")
PYTEST := PYTHON_MAJOR_VERSION=$(PYTHON_MAJOR_VERSION) TEST_PLATFORM=$(TEST_PLATFORM) $(BIN)/py.test

clean:
find . -name \*.py[cod] -delete
find . -name __pycache__ -delete
rm -rf *.egg-info* .cache build
rm -f .coverage .coverage.* junit.xml tmpfile.rc conda/.version tempfile.rc coverage.xml
rm -rf auxlib bin conda/progressbar
rm -rf conda-forge\:\: file\: https\: local\:\: r\:\:
rm -rf conda-forge\:\: file\: https\: local\:\: r\:\: aprefix


clean-all: clean
Expand Down Expand Up @@ -44,4 +50,10 @@ toolz:
rm -rf conda/_vendor/toolz/curried conda/_vendor/toolz/sandbox conda/_vendor/toolz/tests


.PHONY : clean clean-all anaconda-submit anaconda-submit-upload auxlib boltons toolz
smoketest:
py.test tests/test_create.py::test_create_install_update_remove

unit:
time $(PYTEST) -m "not integration"

.PHONY : clean clean-all anaconda-submit anaconda-submit-upload auxlib boltons toolz smoketest
6 changes: 6 additions & 0 deletions conda/common/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@


def get_signal_name(signum):
"""
Examples:
>>> get_signal_name(9)
'SIGKILL'
"""
return next((k for k, v in iteritems(signal.__dict__)
if v == signum and k.startswith('SIG') and not k.startswith('SIG_')),
None)
8 changes: 8 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[tool:pytest]
minversion = 3.0
testpaths = tests conda
norecursedirs = .* *.egg* build dist conda/_vendor/* conda_env/*
addopts =
--ignore setup.py
Expand All @@ -7,6 +9,7 @@ addopts =
--tb native
--strict
--durations 8
--doctest-modules
doctest_optionflags =
NORMALIZE_WHITESPACE
IGNORE_EXCEPTION_DETAIL
Expand All @@ -30,6 +33,9 @@ exclude = build/*,.tox/*,tests/*,ve/*,*/_vendor/*,conda/compat.py,conda/common/c


[coverage:report]
show_missing = True
sort = Miss
skip_covered = True
omit =
*/site-packages/*
*\site-packages\*
Expand All @@ -42,6 +48,8 @@ omit =
tests/*
exclude_lines =
pragma: no cover
pragma: py$PYTHON_MAJOR_VERSION no cover
pragma: py$PYTHON_MAJOR_VERSION no cover
raise AssertionError
raise NotImplementedError
if __name__ == .__main__.:
Expand Down

0 comments on commit 92396a0

Please sign in to comment.