diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..96d0503 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-distro (1.4.0-ok1) yangtze; urgency=medium + + * Build for openKylin. + + -- openKylinBot Mon, 25 Apr 2022 22:03:04 +0800 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..5abcea8 --- /dev/null +++ b/debian/control @@ -0,0 +1,36 @@ +Source: python-distro +Section: python +Priority: optional +Maintainer: Debian Python Modules Team +Uploaders: + Barry Warsaw , +Build-Depends: + debhelper-compat (= 12), + dh-python, + python3-all, + python3-setuptools, +Build-Depends-Indep: + python3-pytest, +Standards-Version: 4.5.0 +Rules-Requires-Root: no +Homepage: https://github.com/nir0s/distro +Vcs-Git: https://salsa.debian.org/python-team/modules/python-distro.git +Vcs-Browser: https://salsa.debian.org/python-team/modules/python-distro + +Package: python3-distro +Architecture: all +Depends: + lsb-release, + ${misc:Depends}, + ${python3:Depends}, +Description: Linux OS platform information API + distro (for: Linux Distribution) provides information about the Linux + distribution it runs on, such as a reliable machine-readable ID, or version + information. + . + It is a renewed alternative implementation for Python's original + platform.linux_distribution function, but it also provides much more + functionality which isn't necessarily Python bound like a command-line + interface. + . + This is the Python 3 version of the library. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..e2dbd64 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,28 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: distro +Upstream-Contact: Nir Cohen +Source: + +Files: * +Copyright: 2015,2016 Nir Cohen +License: Apache-2.0 + +Files: debian/* +Copyright: 2016 Barry Warsaw +License: Apache-2.0 + +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the full text of the Apache License version 2.0 can be + found in the file `/usr/share/common-licenses/Apache-2.0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..d759c48 --- /dev/null +++ b/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +export PYBUILD_NAME=distro +#export PYBUILD_VERBOSE=1 +#export DH_VERBOSE=1 + +%: + dh $@ --with python3 --buildsystem=pybuild + +# For now, I do not want to distribute /usr/bin/distro + +override_dh_python3: + dh_python3 + rm -rf debian/python3-distro/usr/bin diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/api-3.py b/debian/tests/api-3.py new file mode 100644 index 0000000..6fae352 --- /dev/null +++ b/debian/tests/api-3.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 + +import distro + + +# Not the full API, but enough to flex the package. +print(distro.linux_distribution()) +print(distro.linux_distribution(full_distribution_name=False)) +print(distro.name()) +print(distro.name(pretty=True)) + +# Use lsb_release for enhanced information. +assert len(distro.LinuxDistribution().lsb_release_info()) > 0, ( + "Why isn't lsb_release(1) available?") diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..d915687 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,5 @@ +Test-Command: cd "$AUTOPKGTEST_TMP" ; python3 -c "import distro; print(distro)" +Depends: python3-distro + +Tests: api-3.py +Depends: python3-distro diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..c6f0f7b --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,4 @@ +Bug-Database: https://github.com/nir0s/distro/issues +Bug-Submit: https://github.com/nir0s/distro/issues/new +Repository: https://github.com/nir0s/distro.git +Repository-Browse: https://github.com/nir0s/distro diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..44ff3f0 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=uversionmangle=s/(rc|a|b|c)/~$1/ \ +https://pypi.debian.net/distro/distro-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))