1 2 prep: 3 @echo 4 # Install needed packages 5 sudo apt-get install subversion fakeroot python-setuptools python-subversion 6 # 7 @echo 8 # Check that the person has .pypirc 9 @if [ ! -e ~/.pypirc ]; then \ 10 echo "Please create a ~/.pypirc with the following contents:"; \ 11 echo "[server-login]"; \ 12 echo "username:google_opensource"; \ 13 echo "password:<see valentine>"; \ 14 fi 15 # 16 @echo 17 # FIXME(tansell): Check that the person has .dputrc for PPA 18 19 clean: 20 # Clean up any build files. 21 python setup.py clean --all 22 # 23 # Clean up the debian stuff 24 fakeroot ./debian/rules clean 25 # 26 # Clean up everything else 27 rm MANIFEST || true 28 rm -rf build-* 29 # 30 # Clean up the egg files 31 rm -rf *egg* 32 # 33 # Remove dist 34 rm -rf dist 35 36 dist: 37 # Generate the tarball based on MANIFEST.in 38 python setup.py sdist 39 # 40 # Build the debian packages 41 fakeroot ./debian/rules binary 42 mv ../python-gflags*.deb ./dist/ 43 # 44 # Build the python Egg 45 python setup.py bdist_egg 46 # 47 @echo 48 @echo "Files to upload:" 49 @echo "--------------------------" 50 @ls -l ./dist/ 51 52 push: 53 # Send the updates to svn 54 # Upload the source package to code.google.com 55 - /home/build/opensource/tools/googlecode_upload.py \ 56 -p python-gflags ./dist/* 57 # 58 # Upload the package to PyPi 59 - python setup.py sdist upload 60 - python setup.py bdist_egg upload 61 # 62 # Upload the package to the ppa 63 # FIXME(tansell): dput should run here 64 65 check: 66 # Run all the tests. 67 for test in tests/*.py; do PYTHONPATH=. python $$test || exit 1; done 68 69 .PHONY: prep dist clean push check 70