From: biao716.wang Date: Wed, 30 Aug 2023 08:54:21 +0000 (+0900) Subject: merge python3.x version code to devel X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fdb9324bc3a8ae6475812851189335608a633a1;p=tools%2Fgbs.git merge python3.x version code to devel Change-Id: Iadc04876fc524c70383289e2b8b74529dc32d7da Signed-off-by: biao716.wang --- 6fdb9324bc3a8ae6475812851189335608a633a1 diff --cc Makefile index 28f9600,8114ce1..9b9a02d --- a/Makefile +++ b/Makefile @@@ -13,8 -13,8 +13,8 @@@ ifndef PREFI endif all: -- python setup.py build -- cd bsr && python setup.py build && cd .. ++ python3 setup.py build ++ cd bsr && python3 setup.py build && cd .. tag: git tag $(VERSION) @@@ -44,8 -44,8 +44,8 @@@ pdf docs: man html pdf install: all -- python setup.py install --prefix=${PREFIX} - cd bsr && python setup.py install --prefix=${PREFIX} && cd .. - cd bsr && python setup.py install --install-scripts=/usr/local/bin --prefix=/usr/local && cd .. ++ python3 setup.py install --prefix=${PREFIX} ++ cd bsr && python3 setup.py install --prefix=${PREFIX} && cd .. clean: rm -rf {build/,dist/,*.egg-info/} diff --cc debian/control index c98ce83,1e5fb20..fb09d1a --- a/debian/control +++ b/debian/control @@@ -2,7 -2,7 +2,7 @@@ Source: gb Section: devel Priority: extra Maintainer: Jian-feng Ding - Build-Depends: debhelper, python (>= 2.6), python-docutils, python-setuptools -Build-Depends: debhelper, dh-python, python3, python3-docutils, python3-setuptools ++Build-Depends: debhelper, dh-python, python3, python3-docutils, python3-setuptools, python3-distro Standards-Version: 3.8.0 X-Python-Version: >= 2.6 Homepage: http://www.tizen.org @@@ -78,8 -78,7 +78,8 @@@ Description: Jenkins scripts used by gb Package: gbs-bsr Architecture: all - Depends: ${misc:Depends}, ${python:Depends}, - python-psutil, - python-yaml + Depends: ${misc:Depends}, ${python3:Depends}, - python3-psutil ++ python3-psutil, ++ python3-yaml Description: GBS build monitirong scripts This package monitors the build status and generates report using the relevant data. diff --cc debian/rules index 7f3cef3,2e96989..262f1b4 --- a/debian/rules +++ b/debian/rules @@@ -1,12 -1,12 +1,12 @@@ #!/usr/bin/make -f %: - dh $@ + dh $@ --with python3 --buildsystem=pybuild override_dh_auto_install: - python setup.py install --root=debian/tmp --prefix=/usr + python3 setup.py install --root=debian/tmp --prefix=/usr make man - cd bsr && python setup.py install --root=../debian/tmp --prefix=/usr && cd .. - cd bsr && python3 setup.py install --install-scripts=/usr/local/bin --root=../debian/tmp --prefix=/usr/local && cd .. ++ cd bsr && python3 setup.py install --root=../debian/tmp --prefix=/usr && cd .. mkdir -p debian/tmp/usr/share/man/man1 mkdir -p debian/tmp/usr/share/gbs install -m644 docs/gbs.1 debian/tmp/usr/share/man/man1 diff --cc packaging/gbs.spec index 6093309,1395cd1..68556ee --- a/packaging/gbs.spec +++ b/packaging/gbs.spec @@@ -24,11 -23,8 +23,8 @@@ Requires: python3-lxm Requires: sudo Requires: osc >= 0.132.6 Requires: tizen-gbp-rpm >= 20210514 -Requires: depanneur >= 0.16.20 +Requires: depanneur >= 0.16.22 - %if "%{?python_version}" < "2.7" - Requires: python-argparse - %endif %if ! 0%{?tizen_version:1} Requires: rpm-tizen >= 4.11.0.1.tizen20130618-tizen20131001 %endif @@@ -36,8 -32,8 +32,9 @@@ Requires: %{name}-api = %{version}-%{ Requires: %{name}-export = %{version}-%{release} Requires: %{name}-remotebuild = %{version}-%{release} - BuildRequires: python-docutils - BuildRequires: python-setuptools + BuildRequires: python3-docutils + BuildRequires: python3-setuptools ++BuildRequires: python3-distro BuildRoot: %{_tmppath}/%{name}-%{version}-build %description diff --cc setup.py index 42519df,d101c7a..03dbff8 --- a/setup.py +++ b/setup.py @@@ -14,8 -14,8 +14,8 @@@ def check_debian() if sys.version_info[:2] > (2, 5): if len(sys.argv) > 1 and 'install' in sys.argv: try: -- import platform -- (dist, _, _) = platform.linux_distribution() ++ import distro ++ dist = distro.name() # for debian-like distros, mods will be installed to # ${PYTHONLIB}/dist-packages if dist in ('debian', 'Ubuntu'):