-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
41 lines (30 loc) · 1.2 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
devenv:
virtualenv -p python2.7 `pwd`/.venv
. .venv/bin/activate && pip install -r requirements/development.txt
clean:
@(rm -rvf .venv .tox .coverage build django-safety* *.egg-info)
pep8:
@(flake8 safety --ignore=E501,E127,E128,E124)
test:
@(py.test -s --cov-report term --cov-config .coveragerc --cov=safety --color=yes safety/tests)
geoip:
@(wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz)
@(wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz)
@(wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz)
@(gunzip -d GeoIP.dat.gz && mv GeoIP.dat data/geoip/)
@(gunzip -d GeoLite2-City.mmdb.gz && mv GeoLite2-City.mmdb data/geoip2/)
@(gunzip -d GeoLiteCity.dat.gz && mv GeoLiteCity.dat data/geoip/)
migrate:
@(ENV=example python manage.py makemigrations safety)
example-clean:
@(rm -rf example.db)
example-migrate:
@(ENV=example python manage.py migrate)
example-user:
@(ENV=example python manage.py createsuperuser --username='johndoe' --email='[email protected]')
example-serve:
@(ENV=example python manage.py runserver)
delpyc:
@(find . -name '*.pyc' -delete)
release:
@(python setup.py sdist register upload -s)