Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 include /usr/share/dpkg/pkg-info.mk
4 export PYBUILD_NAME=alembic
5 export PYBUILD_BEFORE_TEST=cp {dir}/setup.cfg {build_dir}
6 export PYBUILD_AFTER_TEST=rm {build_dir}/setup.cfg ; rm -rf {build_dir}/scratch ; rm -f {build_dir}/test_schema.db
7
8 %:
9 dh $@ --with python3,sphinxdoc --buildsystem=pybuild
10
11 override_dh_sphinxdoc:
12 ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
13 python3 -m sphinx -b html docs/build $(CURDIR)/debian/alembic/usr/share/doc/alembic/html
14 dh_sphinxdoc
15 rm $(CURDIR)/debian/alembic/usr/share/doc/alembic/html/_static/site_custom_css.css
16 endif
17
18 override_dh_auto_install:
19 dh_auto_install
20
21 mkdir -p debian/alembic/usr
22 mv $(CURDIR)/debian/python3-alembic/usr/bin $(CURDIR)/debian/alembic/usr/
23
24 override_dh_fixperms:
25 dh_fixperms
26 rm -f $(CURDIR)/debian/python3-alembic/usr/lib/python3/dist-packages/alembic.ini
27
28 help2man:
29 help2man --version-string=$(DEB_VERSION_UPSTREAM) -n "lightweight database migration tool for usage with the SQLAlchemy" -N alembic > debian/alembic.1
30 sed -i "s/,\(\w\)/, \1/g" debian/alembic.1