-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
74 lines (59 loc) · 2.48 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -*- coding: utf-8 -*-
#
# Makefile for Python WiFi
#
# Copyright 2015 Sean Robinson <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# `GNU General Public License <LICENSE.GPL.html>`_ for more details.
#
# Binaries needed in this file...
PEP8=pep8-py2.7
PYFLAKES=pyflakes-py2.7
PYTHON2=python2
PYTHON3=python3
SHELL=/bin/sh
package = python-wifi
TOPDIR := $(CURDIR)
VERSION = $(shell cat $(TOPDIR)/docs/VERSION)
TESTCASES = pymnl.tests.nlsocket,pymnl.tests.attributes,pymnl.tests.message,pymnl.tests.genl
.PHONY: targets clean pep8 pep-verbose pyflakes sdist
targets:
@echo "Available make targets:"
@echo " clean - remove caches and reports (e.g. coverage)"
@echo " pep8 - check entire project for PEP8 compliance"
@echo " pep8-verbose - include many details about PEP8 check"
@echo " pyflakes - statically analyze entire project for common errors"
@echo " sdist - make a source distribution with checksum and PGP signature"
@echo ""
clean:
rm -fr tmp/ dist/ build/ MANIFEST
rm -fr `find $(TOPDIR) -type f -a -name "*.pyc"`
rm -fr `find $(TOPDIR) -type d -a -name "__pycache__"`
pep8:
$(PEP8) --statistics pythonwifi/ examples/ tests/
pep8-verbose:
$(PEP8) --show-source --show-pep8 --statistics pythonwifi/ examples/ tests/
pyflakes:
$(PYFLAKES) pythonwifi/ examples/ tests/
sdist: clean $(TOPDIR)/dist/${package}-$(VERSION).tar.bz2.sha256 $(TOPDIR)/dist/${package}-$(VERSION).tar.bz2.sign
chmod 644 $(TOPDIR)/dist/${package}-$(VERSION).*
$(TOPDIR)/dist/${package}-$(VERSION).tar.bz2.sha256: $(TOPDIR)/dist/${package}-$(VERSION).tar.bz2
cd $(TOPDIR)/dist && \
sha256sum ${package}-$(VERSION).tar.bz2 \
> ${package}-$(VERSION).tar.bz2.sha256
$(TOPDIR)/dist/${package}-$(VERSION).tar.bz2.sign: $(TOPDIR)/dist/${package}-$(VERSION).tar.bz2
cd $(TOPDIR)/dist && \
gpg --detach-sign -a --output \
${package}-$(VERSION).tar.bz2.asc \
${package}-$(VERSION).tar.bz2
cd $(TOPDIR)/dist && \
gpg --verify $(TOPDIR)/dist/${package}-$(VERSION).tar.bz2.asc
$(TOPDIR)/dist/${package}-$(VERSION).tar.bz2:
PYTHONPATH=$(TOPDIR) $(PYTHON2) ./setup.py sdist --force-manifest --formats=bztar