39 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Makefile
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Makefile
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/make -f
 | |
| 
 | |
| UPSTREAM_GIT = https://github.com/openstack/python-openstackclient.git
 | |
| include /usr/share/openstack-pkg-tools/pkgos.make
 | |
| 
 | |
| export OSLO_PACKAGE_VERSION=$(VERSION)
 | |
| 
 | |
| %:
 | |
| 	dh $@ --with python2,sphinxdoc
 | |
| 
 | |
| override_dh_auto_clean:
 | |
| 	rm -rf doc/build build python_openstackclient.egg-info .testrepository
 | |
| 
 | |
| override_dh_auto_build:
 | |
| 	dh_auto_build
 | |
| 
 | |
| override_dh_auto_test:
 | |
| ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
 | |
| 	@echo "===> Running tests"
 | |
| 	set -e ; set -x ; for i in 2.7 ; do \
 | |
| 		PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
 | |
| 		echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
 | |
| 		rm -rf .testrepository ; \
 | |
| 		testr-python$$PYMAJOR init ; \
 | |
| 		TEMP_REZ=`mktemp -t` ; \
 | |
| 		PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit | tee $$TEMP_REZ | subunit2pyunit ; \
 | |
| 		cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
 | |
| 		rm -f $$TEMP_REZ ; \
 | |
| 		testr-python$$PYMAJOR slowest ; \
 | |
| 	done
 | |
| endif
 | |
| 
 | |
| override_dh_sphinxdoc:
 | |
| ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
 | |
| 	sphinx-build -b man doc/source doc/build/man
 | |
| 	PYTHONPATH=. sphinx-build -b html doc/source $(CURDIR)/debian/python-openstackclient/usr/share/doc/python-openstackclient/html
 | |
| 	dh_sphinxdoc -O--buildsystem=python2
 | |
| endif
 | 
