Skip to content

Commit

Permalink
fix: update requirements with doc/test stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
hartym committed Feb 14, 2016
1 parent c67d41c commit a5ccf74
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file has been auto-generated.
# All manual changes may be lost, see Projectfile.
#
# Date: 2016-02-14 15:05:30.336039
# Date: 2016-02-14 15:33:41.701627

PYTHON ?= $(shell which python)
PYTHON_BASENAME ?= $(shell basename $(PYTHON))
Expand All @@ -19,11 +19,10 @@ SPHINX_BUILDDIR ?= $(SPHINX_SOURCEDIR)/_build

.PHONY: clean doc install install-dev lint test

# Installs the local project dependencies, using the environment given requirement file.
# Installs the local project dependencies.
install: $(VIRTUALENV_PATH)
if [ -z "$(QUICK)" ]; then \
$(PIP) wheel -w $(WHEELHOUSE_PATH) -f $(WHEELHOUSE_PATH) -r $(PYTHON_REQUIREMENTS_FILE); \
$(PIP) install -f $(WHEELHOUSE_PATH) -U -r $(PYTHON_REQUIREMENTS_FILE); \
$(PIP) install -Ue "file://`pwd`#egg=edgy.event[dev]"; \
fi

# Setup the local virtualenv.
Expand All @@ -35,15 +34,15 @@ $(VIRTUALENV_PATH):
clean:
rm -rf $(VIRTUALENV_PATH) $(WHEELHOUSE_PATH) $(PIPCACHE_PATH)

test: install-dev
$(VIRTUALENV_PATH)/bin/py.test $(PYTEST_OPTIONS) tests

lint: install-dev
$(VIRTUALENV_PATH)/bin/pylint --py3k edgy.event -f html > pylint.html

test: install-dev
$(VIRTUALENV_PATH)/bin/py.test $(PYTEST_OPTIONS) tests

install-dev: $(VIRTUALENV_PATH)
if [ -z "$(QUICK)" ]; then \
$(PIP) install -f $(WHEELHOUSE_PATH) -U "file://`pwd`#egg=edgy.event[dev]"; \
$(PIP) install -Ue "file://`pwd`#egg=edgy.event[dev]"; \
fi

doc: install
Expand Down
15 changes: 14 additions & 1 deletion Projectfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,24 @@ enable_features = {
'virtualenv',
}

extras_require = {
'dev': [
'coverage >=4.0,<4.2',
'nose >=1.3,<1.4',
'pylint >=1.4,<1.5',
'pytest >=2.8,<2.9',
'pytest-cov >=2.2,<2.3',
'mock >=1.3,<1.4',
'sphinx',
'sphinx_rtd_theme',
]
}

@listen('edgy.project.feature.make.on_generate')
def on_make_generate_add_development(event):
event.makefile.add_target('install-dev', '''
if [ -z "$(QUICK)" ]; then \\
$(PIP) install -f $(WHEELHOUSE_PATH) -U "file://`pwd`#egg={name}[dev]"; \\
$(PIP) install -Ue "file://`pwd`#egg={name}[dev]"; \\
fi
'''.format(name=name), deps=('$(VIRTUALENV_PATH)', ), phony=True)

Expand Down
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ def requirements_filter(c):
packages = find_packages(exclude=['ez_setup', 'example', 'test']),
include_package_data = True,
install_requires = read('requirements.txt', requirements_filter),
extras_require = {'dev': ['coverage >=4.0,<4.2',
'nose >=1.3,<1.4',
'pylint >=1.4,<1.5',
'pytest >=2.8,<2.9',
'pytest-cov >=2.2,<2.3',
'mock >=1.3,<1.4',
'sphinx',
'sphinx_rtd_theme']},
url = 'https://github.com/python-edgy/event',
download_url = 'https://github.com/python-edgy/event/tarball/{version}'.format(version=version),
)

0 comments on commit a5ccf74

Please sign in to comment.