Skip to content

Commit

Permalink
update project
Browse files Browse the repository at this point in the history
  • Loading branch information
hartym committed Jul 16, 2016
1 parent bc40c27 commit 4bcd135
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
28 changes: 16 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# This file has been auto-generated.
# All manual changes may be lost, see Projectfile.
# All changes will be lost, see Projectfile.
#
# Date: 2016-07-13 09:00:24.196912
# Updated at 2016-07-16 12:23:40.296950

PYTHON ?= $(shell which python)
PYTHON_BASENAME ?= $(shell basename $(PYTHON))
PYTHON_REQUIREMENTS_FILE ?= requirements.txt
PYTHON_REQUIREMENTS_DEV_FILE ?= requirements-dev.txt
QUICK ?=
VIRTUAL_ENV ?= .virtualenv-$(PYTHON_BASENAME)
PIP ?= $(VIRTUAL_ENV)/bin/pip
Expand All @@ -23,15 +24,23 @@ install: $(VIRTUAL_ENV)
$(PIP) install -Ur $(PYTHON_REQUIREMENTS_FILE) ; \
fi

# Setup the local virtualenv.
# Installs the local project dependencies, including development-only libraries.
install-dev: $(VIRTUAL_ENV)
if [ -z "$(QUICK)" ]; then \
$(PIP) install -Ur $(PYTHON_REQUIREMENTS_DEV_FILE) ; \
fi

# Cleans up the local mess.
clean:
rm -rf build
rm -rf dist

# Setup the local virtualenv, or use the one provided by the current environment.
$(VIRTUAL_ENV):
virtualenv -p $(PYTHON) $(VIRTUAL_ENV)
$(PIP) install -U pip\>=8.0,\<9.0 wheel\>=0.24,\<1.0
$(PIP) install -U pip\>=8.1.2,\<9 wheel\>=0.29,\<1.0
ln -fs $(VIRTUAL_ENV)/bin/activate activate-$(PYTHON_BASENAME)

clean:
rm -rf $(VIRTUAL_ENV)

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

Expand All @@ -40,8 +49,3 @@ test: install-dev

doc: install-dev
$(SPHINX_BUILD) -b html -D latex_paper_size=a4 $(SPHINX_OPTS) $(SPHINX_SOURCEDIR) $(SPHINX_BUILDDIR)/html

install-dev: $(VIRTUALENV_PATH) $(WHEELHOUSE)
if [ -z "$(QUICK)" ]; then \
$(PIP) install -Ur requirements.dev.txt; \
fi
15 changes: 2 additions & 13 deletions Projectfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ author_email = 'edgy@rdc.li'

# Features
enable_features = {
'python',
'git',
'make',
'pytest',
'python',
'sphinx',
}

Expand All @@ -31,15 +32,3 @@ extras_require = {
]
}


@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 -Ur requirements.dev.txt; \\
fi
'''.format(name=name), deps=('$(VIRTUALENV_PATH)', '$(WHEELHOUSE)'), phony=True)

event.makefile.set_deps('doc', deps=('install-dev',))
event.makefile.set_deps('lint', deps=('install-dev',))
event.makefile.set_deps('test', deps=('install-dev',))
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e .[dev]

0 comments on commit 4bcd135

Please sign in to comment.