mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
python3-debian: fix versioning in build
This commit is contained in:
parent
df76b8dec3
commit
b76952e023
2 changed files with 5 additions and 118 deletions
|
@ -30,117 +30,3 @@ index 46cf81a..158033f 100644
|
||||||
shared_storage=False, # type: bool
|
shared_storage=False, # type: bool
|
||||||
encoding="utf-8", # type: str
|
encoding="utf-8", # type: str
|
||||||
strict=None, # type: Optional[Dict[str, bool]]
|
strict=None, # type: Optional[Dict[str, bool]]
|
||||||
diff --git a/lib/debian/tests/test_deb822.py b/lib/debian/tests/test_deb822.py
|
|
||||||
index f386391..7fb11fa 100755
|
|
||||||
--- a/lib/debian/tests/test_deb822.py
|
|
||||||
+++ b/lib/debian/tests/test_deb822.py
|
|
||||||
@@ -42,8 +42,6 @@ else:
|
|
||||||
from StringIO import StringIO
|
|
||||||
BytesIO = StringIO
|
|
||||||
|
|
||||||
-import apt_pkg
|
|
||||||
-
|
|
||||||
from debian import deb822
|
|
||||||
from debian.debian_support import Version
|
|
||||||
|
|
||||||
@@ -541,11 +539,6 @@ with open("test_deb822.pickle", "wb") as fh:
|
|
||||||
for d in deb822.Deb822.iter_paragraphs(text, use_apt_pkg=False):
|
|
||||||
self.assertWellParsed(d, PARSED_PACKAGE)
|
|
||||||
|
|
||||||
- with self.assertWarns(UserWarning):
|
|
||||||
- # The StringIO is not a real file so this will raise a warning
|
|
||||||
- for d in deb822.Deb822.iter_paragraphs(text, use_apt_pkg=True):
|
|
||||||
- self.assertWellParsed(d, PARSED_PACKAGE)
|
|
||||||
-
|
|
||||||
def test_iter_paragraphs_file(self):
|
|
||||||
# type: () -> None
|
|
||||||
text = StringIO()
|
|
||||||
@@ -564,10 +557,6 @@ with open("test_deb822.pickle", "wb") as fh:
|
|
||||||
for d in deb822.Deb822.iter_paragraphs(fh, use_apt_pkg=False):
|
|
||||||
self.assertWellParsed(d, PARSED_PACKAGE)
|
|
||||||
|
|
||||||
- fh.seek(0)
|
|
||||||
- for d in deb822.Deb822.iter_paragraphs(fh, use_apt_pkg=True):
|
|
||||||
- self.assertWellParsed(d, PARSED_PACKAGE)
|
|
||||||
-
|
|
||||||
|
|
||||||
def test_iter_paragraphs_with_gpg(self):
|
|
||||||
# type: () -> None
|
|
||||||
@@ -640,12 +629,7 @@ with open("test_deb822.pickle", "wb") as fh:
|
|
||||||
test_count(deb822.Deb822.iter_paragraphs, 2)
|
|
||||||
test_count(deb822.Deb822.iter_paragraphs, 2, use_apt_pkg=False)
|
|
||||||
|
|
||||||
- # apt_pkg used, should not split
|
|
||||||
- test_count(deb822.Deb822.iter_paragraphs, 1, use_apt_pkg=True)
|
|
||||||
-
|
|
||||||
# Specialised iter_paragraphs force use of apt_pkg and don't split
|
|
||||||
- test_count(deb822.Packages.iter_paragraphs, 1, use_apt_pkg=True)
|
|
||||||
- test_count(deb822.Sources.iter_paragraphs, 1, use_apt_pkg=True)
|
|
||||||
test_count(deb822.Packages.iter_paragraphs, 1, use_apt_pkg=False)
|
|
||||||
test_count(deb822.Sources.iter_paragraphs, 1, use_apt_pkg=False)
|
|
||||||
|
|
||||||
@@ -692,32 +676,12 @@ with open("test_deb822.pickle", "wb") as fh:
|
|
||||||
s.write(b"\n")
|
|
||||||
self.assertEqual(s.getvalue(), packages_content)
|
|
||||||
|
|
||||||
- def test_iter_paragraphs_apt_shared_storage_packages(self):
|
|
||||||
- # type: () -> None
|
|
||||||
- self._test_iter_paragraphs(find_test_file("test_Packages"),
|
|
||||||
- deb822.Packages,
|
|
||||||
- use_apt_pkg=True, shared_storage=True)
|
|
||||||
- def test_iter_paragraphs_apt_no_shared_storage_packages(self):
|
|
||||||
- # type: () -> None
|
|
||||||
- self._test_iter_paragraphs(find_test_file("test_Packages"),
|
|
||||||
- deb822.Packages,
|
|
||||||
- use_apt_pkg=True, shared_storage=False)
|
|
||||||
def test_iter_paragraphs_no_apt_no_shared_storage_packages(self):
|
|
||||||
# type: () -> None
|
|
||||||
self._test_iter_paragraphs(find_test_file("test_Packages"),
|
|
||||||
deb822.Packages,
|
|
||||||
use_apt_pkg=False, shared_storage=False)
|
|
||||||
|
|
||||||
- def test_iter_paragraphs_apt_shared_storage_sources(self):
|
|
||||||
- # type: () -> None
|
|
||||||
- self._test_iter_paragraphs(find_test_file("test_Sources"),
|
|
||||||
- deb822.Sources,
|
|
||||||
- use_apt_pkg=True, shared_storage=True)
|
|
||||||
- def test_iter_paragraphs_apt_no_shared_storage_sources(self):
|
|
||||||
- # type: () -> None
|
|
||||||
- self._test_iter_paragraphs(find_test_file("test_Sources"),
|
|
||||||
- deb822.Sources,
|
|
||||||
- use_apt_pkg=True, shared_storage=False)
|
|
||||||
def test_iter_paragraphs_no_apt_no_shared_storage_sources(self):
|
|
||||||
# type: () -> None
|
|
||||||
self._test_iter_paragraphs(find_test_file("test_Sources"),
|
|
||||||
@@ -1091,28 +1055,6 @@ Description: python modules to work with Debian-related data formats
|
|
||||||
self.assertWellParsed(paragraphs[i],
|
|
||||||
PARSED_PARAGRAPHS_WITH_COMMENTS[i])
|
|
||||||
|
|
||||||
- def test_iter_paragraphs_comments_use_apt_pkg(self):
|
|
||||||
- # type: () -> None
|
|
||||||
- """ apt_pkg does not support comments within multiline fields
|
|
||||||
-
|
|
||||||
- This test checks that a file with comments inside multiline fields
|
|
||||||
- generates an error from the apt_pkg parser.
|
|
||||||
-
|
|
||||||
- See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750247#35
|
|
||||||
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807351
|
|
||||||
- """
|
|
||||||
- try:
|
|
||||||
- fd, filename = tempfile.mkstemp()
|
|
||||||
- fp = os.fdopen(fd, 'wb')
|
|
||||||
- fp.write(UNPARSED_PARAGRAPHS_WITH_COMMENTS.encode('utf-8'))
|
|
||||||
- fp.close()
|
|
||||||
-
|
|
||||||
- with open_utf8(filename) as fh:
|
|
||||||
- with self.assertRaises(apt_pkg.Error):
|
|
||||||
- list(deb822.Deb822.iter_paragraphs(fh, use_apt_pkg=True))
|
|
||||||
- finally:
|
|
||||||
- os.remove(filename)
|
|
||||||
-
|
|
||||||
def test_iter_paragraphs_comments_native(self):
|
|
||||||
# type: () -> None
|
|
||||||
paragraphs = list(deb822.Deb822.iter_paragraphs(
|
|
||||||
--
|
|
||||||
2.30.0
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'python3-debian'
|
# Template file for 'python3-debian'
|
||||||
pkgname=python3-debian
|
pkgname=python3-debian
|
||||||
version=0.1.40
|
version=0.1.40
|
||||||
revision=3
|
revision=4
|
||||||
build_style=python3-module
|
build_style=python3-module
|
||||||
hostmakedepends="python3-setuptools"
|
hostmakedepends="python3-setuptools"
|
||||||
depends="python3-chardet python3-six"
|
depends="python3-chardet python3-six"
|
||||||
|
@ -11,6 +11,7 @@ maintainer="k4leg <python.bogdan@gmail.com>"
|
||||||
license="GPL-2.0-or-later"
|
license="GPL-2.0-or-later"
|
||||||
homepage="https://pypi.org/project/python-debian"
|
homepage="https://pypi.org/project/python-debian"
|
||||||
changelog="https://salsa.debian.org/python-debian-team/python-debian/raw/master/debian/changelog"
|
changelog="https://salsa.debian.org/python-debian-team/python-debian/raw/master/debian/changelog"
|
||||||
# Don't use PyPI because it has no tests.
|
distfiles="${PYPI_SITE}/p/python-debian/python-debian-${version}.tar.gz"
|
||||||
distfiles="https://salsa.debian.org/python-debian-team/python-debian/-/archive/${version}/python-debian-${version}.tar.gz"
|
checksum=385dfb965eca75164d256486c7cf9bae772d24144249fd18b9d15d3cffb70eea
|
||||||
checksum=f7f726ffd678f9ce2e099b6b036f63c1793da4898d5de1fcec31cab2630f8096
|
# PyPI release has no tests, upstream origin has no version info
|
||||||
|
make_check=no
|
||||||
|
|
Loading…
Add table
Reference in a new issue