merge python3.x version code to devel 34/298034/2
authorbiao716.wang <biao716.wang@samsung.com>
Wed, 30 Aug 2023 08:54:21 +0000 (17:54 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Wed, 30 Aug 2023 09:01:52 +0000 (18:01 +0900)
Change-Id: Iadc04876fc524c70383289e2b8b74529dc32d7da
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
1  2 
Makefile
bsr/setup.py
debian/control
debian/rules
packaging/gbs.spec
setup.py

diff --cc 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 bsr/setup.py
Simple merge
diff --cc debian/control
@@@ -2,7 -2,7 +2,7 @@@ Source: gb
  Section: devel
  Priority: extra
  Maintainer: Jian-feng Ding <jian-feng.ding@intel.com>
- 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
@@@ -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
@@@ -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
+++ 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'):