4 # Install needed packages
5 sudo apt-get
install subversion fakeroot python-setuptools python-subversion
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>"; \
17 # FIXME(tansell): Check that the person has .dputrc for PPA
20 # Clean up any build files.
21 python setup.py
clean --all
23 # Clean up the debian stuff
24 fakeroot .
/debian
/rules
clean
26 # Clean up everything else
30 # Clean up the egg files
37 # Generate the tarball based on MANIFEST.in
40 # Build the debian packages
41 fakeroot .
/debian
/rules binary
42 mv ..
/python-gflags
*.deb .
/dist/
44 # Build the python Egg
45 python setup.py bdist_egg
48 @echo
"Files to upload:"
49 @echo
"--------------------------"
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/*
58 # Upload the package to PyPi
59 - python setup.py sdist upload
60 - python setup.py bdist_egg upload
62 # Upload the package to the ppa
63 # FIXME(tansell): dput should run here
67 for
test in tests
/*.py
; do PYTHONPATH
=. python
$$test || exit
1; done
69 .PHONY
: prep
dist clean push
check