|
Revision 642, 3.1 kB
(checked in by schwa, 2 years ago)
|
Adapted stylesheet path.
|
- Property svn:mime-type set to
text/x-makefile
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 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 |
SHELL=/bin/sh |
|---|
| 36 |
PROJECT_DIR=/home/schwa/sd/python/ftputil |
|---|
| 37 |
DOC_FILES=README.html ftputil.html ftputil_ru.html |
|---|
| 38 |
STYLESHEET_PATH=default.css |
|---|
| 39 |
WWW_DIR=${HOME}/www |
|---|
| 40 |
SED=sed -i'' -r -e |
|---|
| 41 |
|
|---|
| 42 |
.PHONY: dist extdist test docs clean register patch |
|---|
| 43 |
.SUFFIXES: .txt .html |
|---|
| 44 |
|
|---|
| 45 |
test: |
|---|
| 46 |
for file in `ls _test_*.py`; \ |
|---|
| 47 |
do \ |
|---|
| 48 |
python $$file ; \ |
|---|
| 49 |
done |
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
ftputil_ru.html: ftputil_ru_utf8.txt |
|---|
| 53 |
rst2html.py --stylesheet-path=${STYLESHEET_PATH} --embed-stylesheet \ |
|---|
| 54 |
--input-encoding=utf-8 $< $@ |
|---|
| 55 |
|
|---|
| 56 |
.txt.html: |
|---|
| 57 |
rst2html.py --stylesheet-path=${STYLESHEET_PATH} --embed-stylesheet $< $@ |
|---|
| 58 |
|
|---|
| 59 |
patch: |
|---|
| 60 |
@echo "Patching files" |
|---|
| 61 |
${SED} "s/^__version__ = '.*'/__version__ = \'`cat VERSION`\'/" \ |
|---|
| 62 |
ftputil_version.py |
|---|
| 63 |
${SED} "s/^:Version: .*/:Version: `cat VERSION`/" ftputil.txt |
|---|
| 64 |
${SED} "s/^:Date: .*/:Date: `date +"%Y-%m-%d"`/" ftputil.txt |
|---|
| 65 |
|
|---|
| 66 |
${SED} "s/^Version: .*/Version: `cat VERSION`/" PKG-INFO |
|---|
| 67 |
${SED} "s/(\/wiki\/Download\/ftputil-).*(\.tar\.gz)/\1`cat VERSION`\2/" \ |
|---|
| 68 |
PKG-INFO |
|---|
| 69 |
|
|---|
| 70 |
docs: ${DOC_FILES} README.txt ftputil.txt ftputil_ru_utf8.txt |
|---|
| 71 |
|
|---|
| 72 |
dist: clean patch docs |
|---|
| 73 |
python setup.py sdist |
|---|
| 74 |
|
|---|
| 75 |
localcopy: |
|---|
| 76 |
@echo "Copying archive and documentation to local webspace" |
|---|
| 77 |
cp -p dist/ftputil-`cat VERSION`.tar.gz ${WWW_DIR}/download |
|---|
| 78 |
cp -p ftputil.html ${WWW_DIR}/python |
|---|
| 79 |
touch ${WWW_DIR}/python/python_software.tmpl |
|---|
| 80 |
|
|---|
| 81 |
register: |
|---|
| 82 |
@echo "Registering new version with PyPI" |
|---|
| 83 |
python setup.py register |
|---|
| 84 |
|
|---|
| 85 |
extdist: test dist localcopy register |
|---|
| 86 |
|
|---|
| 87 |
clean: |
|---|
| 88 |
rm -f ${DOC_FILES} |
|---|
| 89 |
|
|---|
| 90 |
rm -rf ${PROJECT_DIR}/build |
|---|
| 91 |
|
|---|