File: Makefile

package info (click to toggle)
python-netaddr 0.7.18-1~bpo8+1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 5,732 kB
  • sloc: python: 9,050; xml: 6,348; makefile: 84
file content (72 lines) | stat: -rw-r--r-- 2,346 bytes parent folder | download | duplicates (2)
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
#-----------------------------------------------------------------------------
#   Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
#
#   Released under the BSD license. See the LICENSE file for details.
#-----------------------------------------------------------------------------
#
# Unified build script for the netaddr library
#
SHELL = /bin/bash

.PHONY = all clean dist doc download test

all:
	@echo 'default target does nothing. try clean'

clean:
	@echo 'cleaning up temporary files'
	rm -rf dist/
	rm -rf build/
	rm -rf docs/build/
	rm -rf netaddr.egg-info/
	find . -name '*.pyc' -exec rm -f {} ';'
	find . -name '*.pyo' -exec rm -f {} ';'

dist: clean doc
	@echo 'building netaddr release'
	python setup_egg.py develop
	@echo 'building source distributions'
	python setup.py sdist --formats=gztar,zip
	@echo 'building egg package'
	python setup_egg.py bdist_egg
	@echo 'building wheel package'
	pip install --upgrade pip
	pip install wheel
	python setup_egg.py bdist_wheel --universal

doc:
	@echo 'building documentation'
	pip install sphinx
	python setup_egg.py develop
	cd docs/ && $(MAKE) -f Makefile clean html
	cd docs/build/html && zip -r ../netaddr.zip *

download:
	@echo 'downloading latest IEEE data'
	cd netaddr/eui/ && wget -N http://standards.ieee.org/develop/regauth/oui/oui.txt
	cd netaddr/eui/ && wget -N http://standards.ieee.org/develop/regauth/iab/iab.txt
	@echo 'rebuilding IEEE data file indices'
	python netaddr/eui/ieee.py
	@echo 'downloading latest IANA data'
	cd netaddr/ip/ && wget -N http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xml
	cd netaddr/ip/ && wget -N http://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xml
	cd netaddr/ip/ && wget -N http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xml
	cd netaddr/ip/ && wget -N http://www.iana.org/assignments/ipv6-unicast-address-assignments/ipv6-unicast-address-assignments.xml

register:
	@echo 'releasing netaddr'
	python setup_egg.py register

push_tags:
	@echo 'syncing tags'
	git push --tags

test: clean
	@echo 'running test suite'
	python setup.py test
	@echo 'running doc tests (tutorials)'
	python tutorials/run_doctests.py

test_with_junitxml: clean
	@echo 'running test suite with JUnit XML output'
	py.test -vv --junitxml=$$CI_REPORTS/junit.xml $(PWD)/netaddr/tests