/usr/local/Hypy
view Makefile @ 139:d0a738aea316
Added tag 0.8.4.1 for changeset bbc3e3a3c4fb
| author | Cory Dodt <corymercurial@spam.goonmill.org> |
|---|---|
| date | Fri Oct 09 10:32:45 2009 -0700 (2009-10-09) |
| parents | 536ddc87fce3 |
| children |
line source
1 all:
2 @echo "** Try make tests (to run tests) or make release (to do a release) or make start (to run hg serve)"
3 @false
5 start:
6 hg serve --daemon --port 28090 --pid-file hgserve.pid
8 stop:
9 kill `cat hgserve.pid`
11 website:
12 rst2html --stylesheet-path=doc/docutils.css README.txt \
13 /var/www/goonmill.org/hypy/index.tsw
14 rst2html --stylesheet-path=doc/docutils.css doc/examples.txt \
15 /var/www/goonmill.org/hypy/examples.tsw
16 pydoctor --add-package hypy --project-name="Hypy" \
17 --project-url="http://goonmill.org/hypy/" \
18 --make-html \
19 --html-output=/var/www/goonmill.org/hypy/apidocs
20 bash -c 'cd /var/www/goonmill.org/hypy/apidocs; for f in *.html; do mv $$f $${f/\.html/\.tsw}; done'
21 cd /var/www/goonmill.org/hypy/apidocs; for f in *.tsw; do \
22 sed -r -i 's/href="([.a-zA-Z_-]*?)\.html/href="\1.tsw/g' $$f; done
23 cp doc/apidocs.css /var/www/goonmill.org/hypy/apidocs/
25 tests:
26 python -m hypy.test_lib
28 release: msg = "** Use: make tag=xx.xx.xx release"
29 release:
30 @bash -c '([ -n "$(tag)" ] && true) || (echo $(msg); false)'
31 -mkdir -p RELEASE
32 $(MAKE) RELEASE/dch-done.txt RELEASE/release-tag-done.txt RELEASE/debuild-done.txt RELEASE/dput-done.txt RELEASE/pypi-upload-done.txt
34 RELEASE/dch-done.txt: msg = "This will update your changelog - type in new changes and update version $(tag).txt. ^C to cancel"
35 RELEASE/dch-done.txt:
36 @read -p $(msg) x
37 -@./build-tools/commit-popup
38 dch -i
39 touch $@
41 RELEASE/release-tag-done.txt: msg = "This will COMMIT hypy/copyright.py and doc/release-notes/$(tag).txt and tag the release, and push changes. ^C to cancel"
42 RELEASE/release-tag-done.txt: doc/release-notes/$(tag).txt
43 @read -p $(msg) x
44 ./build-tools/update-copyright $(tag)
45 hg add doc/release-notes/$(tag).txt
46 hg ci -m "releasing $(tag)" hypy/copyright.py doc/release-notes/$(tag).txt debian/changelog
47 @echo '!! This fetch might require a merge resolution. Cancelling the merge will stop the release, but you probably wanted to anyway.'
48 hg fetch
49 hg tag $(tag)
50 hg push
51 touch $@
53 doc/release-notes/$(tag).txt: msg = "This will update your release notes - type in new release notes and update version $(tag). ^C to cancel"
54 doc/release-notes/$(tag).txt:
55 @read -p $(msg) x
56 cp doc/release-notes/template.txt doc/release-notes/$(tag).txt
57 vim doc/release-notes/$(tag).txt
59 # remove old versions of hypy to setup for release compliance testing
60 define purge-build-system
61 @read -p "This will REMOVE all system copies of Hypy. ^C to cancel" x
62 sudo apt-get remove python-hypy
63 sudo rm -rf /usr/lib/python*/[hH]ypy
64 sudo rm -rvf /usr/lib/python*/[hH]ypy.pth
65 endef
67 RELEASE/debuild-done.txt: PNAME := python-hypy-"$(tag)"
68 RELEASE/debuild-done.txt:
69 $(purge-build-system)
70 -rm -rf RELEASE/$(PNAME) RELEASE/python-hypy*
71 hg archive -t files RELEASE/$(PNAME)
72 cp -v Makefile RELEASE/
73 $(MAKE) -C RELEASE PNAME=$(PNAME) debuild
74 touch $@
76 define dver
77 export dver=`dpkg-parsechangelog | sed -n 's/Version: \(.*\)/\1/p'`
78 endef
81 debuild: msg = "This will build a debian package and then INSTALL it. ^C to cancel"
82 debuild:
83 @read -p $(msg) x
84 tar cvfz $(PNAME).tar.gz $(PNAME)/
85 cd $(PNAME) && debuild -sa
86 sudo dpkg -i python-hypy*.deb
87 $(MAKE) tests
88 cd $(PNAME) && debuild -S -sa
90 RELEASE/dput-done.txt: msg = "This will DPUT the package, wait for build, then COPY sources. ^C to cancel"
91 RELEASE/dput-done.txt:
92 $(dver); cd RELEASE; dput launchpad 'python-hypy_'$$dver'_source.changes'
93 # wait for packages to build
94 $(dver); ./build-tools/lptool -u launchpad@spam.goonmill.org w --timeout 35 $$dver
95 $(dver); ./build-tools/lptool -u launchpad@spam.goonmill.org c --to jaunty $$dver
96 touch $@
98 RELEASE/pypi-upload-done.txt: msg = "This will UPLOAD your sdist to pypi. ^C to cancel"
99 RELEASE/pypi-upload-done.txt:
100 $(purge-build-system)
101 @read -p $(msg) x
102 python setup.py sdist upload
103 # change directories so easy_install doesn't pick up the local 'hypy'
104 # directory
105 cd RELEASE && sudo easy_install hypy
106 python -c 'from hypy import __version__ as v; assert v=="'$(tag)'"'
107 $(MAKE) tests
108 touch $@
110 clean:
111 rm -rf build dist Hypy.egg-info RELEASE _temp_db
