Skip to content
Snippets Groups Projects
Commit c9d97c9c authored by Piotr Ożarowski's avatar Piotr Ożarowski
Browse files

debian/debian_defaults config file is no longer read in debpython.version._config

DEBPYTHON_SUPPORTED and DEBPYTHON_DEFAULT is used in tests instead
parent dc5ead69
No related branches found
No related tags found
No related merge requests found
......@@ -41,8 +41,7 @@ _supported = environ.get('DEBPYTHON_SUPPORTED')
_default = environ.get('DEBPYTHON_DEFAULT')
if not _supported or not _default:
_config = SafeConfigParser()
_config.read(['/usr/share/python/debian_defaults',
join(dirname(__file__), '..', 'debian', 'debian_defaults')])
_config.read('/usr/share/python/debian_defaults')
if not _default:
_default = _config.get('DEFAULT', 'default-version')[6:]
if not _supported:
......
#!/usr/bin/make -f
export DEBPYTHON_DEFAULT ?= $(shell sed -rne 's,^default-version = python(.*),\1,p' ../../debian/debian_defaults)
export DEBPYTHON_SUPPORTED ?= $(shell sed -rne '/^supported-versions/{s/^supported-versions = (.*)/\1/g;s/python//g;s/,//g;p}' ../../debian/debian_defaults)
all: run check
run: clean
dpkg-buildpackage -b -us -uc
clean-common:
./debian/rules clean
#!/usr/bin/make -f
all: run check
DPY=$(shell PYTHONPATH=../../ python -c 'import debpython.version as v; print(v.vrepr(v.DEFAULT))')
run: clean
dpkg-buildpackage -b -us -uc
include ../common.mk
DPY=$(DEBPYTHON_DEFAULT)
check:
grep -q "Depends: .*python-mako" debian/python-foo/DEBIAN/control
......@@ -15,6 +11,5 @@ check:
[ `readlink debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo/absolute_link_to_tmp` = /tmp ]
[ `readlink debian/python-foo/usr/lib/python$(DPY)/dist-packages/foo/link_to_parent_dir` = .. ]
clean:
./debian/rules clean
clean: clean-common
rm -rf lib/Foo.egg-info
#!/usr/bin/make -f
all: run check
run: clean
dpkg-buildpackage -b -us -uc
include ../common.mk
clean: clean-common
check:
test -f debian/python-foo/usr/lib/python2.6/dist-packages/foo.py
test -f debian/python-foo/usr/lib/python2.6/dist-packages/bar/bar.py
grep -q pycompile debian/python-foo/DEBIAN/postinst
grep -q pyclean debian/python-foo/DEBIAN/prerm
clean:
./debian/rules clean
#!/usr/bin/make -f
all: run check
DPY=$(shell PYTHONPATH=../../ python -c 'import debpython.version as v; print(v.vrepr(v.DEFAULT))')
run: clean
dpkg-buildpackage -b -us -uc
include ../common.mk
DPY=$(DEBPYTHON_DEFAULT)
check:
grep -q "pycompile -p python-foo /usr/lib/python-foo -V $(DPY)"\
......@@ -22,6 +18,5 @@ check:
test ! -L debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0
test ! -f debian/python-foo/usr/lib/python${DPY}/dist-packages/foo/quux.so.0.0.0
clean:
./debian/rules clean
clean: clean-common
rm -rf lib/Foo.egg-info build
#!/usr/bin/make -f
all: run check
run: clean
dpkg-buildpackage -b -us -uc
include ../common.mk
clean: clean-common
check:
grep -q python2.6 debian/foo/usr/share/foo/foo.py
......@@ -14,6 +11,3 @@ check:
grep -q python2.4 debian/foo/usr/share/foo/baz.py
test ! -x debian/foo/usr/share/foo/baz.py
grep -q Depends:.*python2.4 debian/foo/DEBIAN/control && false || true
clean:
./debian/rules clean
#!/usr/bin/make -f
all: run check
run: clean
dpkg-buildpackage -b -us -uc
include ../common.mk
clean: clean-common
check:
# test dh_python2
......@@ -29,6 +26,3 @@ check:
do [ `ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.py 2>/dev/null || true | wc -l` = 0 ];\
[ `ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.pyc 2>/dev/null || true | wc -l` = 0 ];\
done
clean:
./debian/rules clean
#!/usr/bin/make -f
all: run check
run: clean
dpkg-buildpackage -b -us -uc
include ../common.mk
clean: clean-common
check:
# python2.4 hardcoded via `dh_python2 -V 2.4`
......@@ -19,6 +16,3 @@ check:
grep -q Depends:.*python2.6 debian/foo/DEBIAN/control
grep -q '\-V 2.6 /usr/share/foo' debian/foo/usr/share/python/runtime.d/foo.rtupdate
grep -q '/usr/share/foo \-V 2.6' debian/foo/DEBIAN/postinst
clean:
./debian/rules clean
#!/usr/bin/make -f
all: run check
run: clean
dpkg-buildpackage -b -us -uc
include ../common.mk
clean: clean-common
check:
# python2.4 hardcoded via `dh_python2 -shebang ...python2.4`
......@@ -19,6 +16,3 @@ check:
# /local removed from shebang
grep -q '#! /usr/bin/python' debian/foo/usr/share/foo/baz.py
grep -q '#! /usr/bin/python2.6' debian/foo/usr/share/foo/foo.py
clean:
./debian/rules clean
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment