stdeb를 사용하여 데비안 패키지 빌드

stdeb를 사용하여 데비안 패키지 빌드

저는 Python 모듈에서 Debian용 .deb 패키지를 빌드하려고 했습니다. 합격 후데비안용 Python LibraryStyleGuide,파이빌드그리고Python 패키징 개요, 저는 프로세스를 단순화할 수 있는 것을 선택하는 것이 최선이라고 결정했습니다. 내가 찾은스팁대중적인 선택이 되십시오. 나는 그 자체를 기반으로 stdeb를 만들려고 노력합니다.이것. 그것은 나에게 다음과 같은 오류를 제공합니다 :

python3 setup.py --command-packages=stdeb.command bdist_deb

running bdist_deb
running sdist_dsc
running sdist
running check
reading manifest template 'MANIFEST.in'
writing manifest file 'MANIFEST'
creating stdeb-0.10.0
creating stdeb-0.10.0/scripts
creating stdeb-0.10.0/stdeb
creating stdeb-0.10.0/stdeb/command
creating stdeb-0.10.0/test_data
creating stdeb-0.10.0/test_data/py2_only_pkg
creating stdeb-0.10.0/test_data/py2_only_pkg/py2_only_pkg
creating stdeb-0.10.0/test_data/py3_only_pkg
creating stdeb-0.10.0/test_data/py3_only_pkg/py3_only_pkg
creating stdeb-0.10.0/test_data/simple_pkg
creating stdeb-0.10.0/test_data/simple_pkg/simple_pkg
making hard links in stdeb-0.10.0...
hard linking .gitignore -> stdeb-0.10.0
hard linking .travis.yml -> stdeb-0.10.0
hard linking CHANGELOG.txt -> stdeb-0.10.0
hard linking LICENSE.txt -> stdeb-0.10.0
hard linking MANIFEST.in -> stdeb-0.10.0
hard linking README.rst -> stdeb-0.10.0
hard linking RELEASE_NOTES.txt -> stdeb-0.10.0
hard linking Vagrantfile.debian-7-wheezy.rb -> stdeb-0.10.0
hard linking Vagrantfile.debian-8-jessie.rb -> stdeb-0.10.0
hard linking Vagrantfile.ubuntu-12.04-precise.rb -> stdeb-0.10.0
hard linking Vagrantfile.ubuntu-14.04-trusty.rb -> stdeb-0.10.0
hard linking error.txt -> stdeb-0.10.0
hard linking setup.py -> stdeb-0.10.0
hard linking stdeb.cfg -> stdeb-0.10.0
hard linking test-pypi-install.sh -> stdeb-0.10.0
hard linking test.sh -> stdeb-0.10.0
hard linking test2and3.sh -> stdeb-0.10.0
hard linking scripts/py2dsc -> stdeb-0.10.0/scripts
hard linking scripts/py2dsc-deb -> stdeb-0.10.0/scripts
hard linking scripts/pypi-download -> stdeb-0.10.0/scripts
hard linking scripts/pypi-install -> stdeb-0.10.0/scripts
hard linking stdeb/__init__.py -> stdeb-0.10.0/stdeb
hard linking stdeb/cli_runner.py -> stdeb-0.10.0/stdeb
hard linking stdeb/downloader.py -> stdeb-0.10.0/stdeb
hard linking stdeb/transport.py -> stdeb-0.10.0/stdeb
hard linking stdeb/util.py -> stdeb-0.10.0/stdeb
hard linking stdeb/command/__init__.py -> stdeb-0.10.0/stdeb/command
hard linking stdeb/command/bdist_deb.py -> stdeb-0.10.0/stdeb/command
hard linking stdeb/command/common.py -> stdeb-0.10.0/stdeb/command
hard linking stdeb/command/debianize.py -> stdeb-0.10.0/stdeb/command
hard linking stdeb/command/install_deb.py -> stdeb-0.10.0/stdeb/command
hard linking stdeb/command/sdist_dsc.py -> stdeb-0.10.0/stdeb/command
hard linking test_data/py2_only_pkg/setup.py -> stdeb-0.10.0/test_data/py2_only_pkg
hard linking test_data/py2_only_pkg/py2_only_pkg/__init__.py -> stdeb-0.10.0/test_data/py2_only_pkg/py2_only_pkg
hard linking test_data/py2_only_pkg/py2_only_pkg/py2_module.py -> stdeb-0.10.0/test_data/py2_only_pkg/py2_only_pkg
hard linking test_data/py3_only_pkg/setup.py -> stdeb-0.10.0/test_data/py3_only_pkg
hard linking test_data/py3_only_pkg/py3_only_pkg/py3_module.py -> stdeb-0.10.0/test_data/py3_only_pkg/py3_only_pkg
hard linking test_data/simple_pkg/setup.py -> stdeb-0.10.0/test_data/simple_pkg
hard linking test_data/simple_pkg/simple_pkg/__init__.py -> stdeb-0.10.0/test_data/simple_pkg/simple_pkg
Creating tar archive
removing 'stdeb-0.10.0' (and everything under it)
dpkg-buildpackage: info: source package stdeb
dpkg-buildpackage: info: source version 0.10.0-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Andrew Straw <[email protected]>
 dpkg-source --before-build .
dpkg-source: info: using options from stdeb-0.10.0/debian/source/options: --extend-diff-ignore=\.egg-info$
 fakeroot debian/rules clean
dh clean --with python3 --buildsystem=python_distutils
dh: warning: Compatibility levels before 10 are deprecated (level 9 in use)
dh: error: unable to load addon python3: Cant locate Debian/Debhelper/Sequence/python3.pm in @INC (you may need to install the Debian::Debhelper::Sequence::python3 module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at (eval 16) line 1.
BEGIN failed--compilation aborted at (eval 16) line 1.

make: *** [debian/rules:7: clean] Error 25
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
Traceback (most recent call last):
  File "/home/user0/Documents/temp/pac/stdeb-release-0.10.0/setup.py", line 8, in <module>
    setup(
  File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/user0/Documents/temp/pac/stdeb-release-0.10.0/stdeb/command/bdist_deb.py", line 34, in run
    self.run_command('sdist_dsc')
  File "/usr/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/user0/Documents/temp/pac/stdeb-release-0.10.0/stdeb/command/sdist_dsc.py", line 137, in run
    build_dsc(debinfo,
  File "/home/user0/Documents/temp/pac/stdeb-release-0.10.0/stdeb/util.py", line 1569, in build_dsc
    dpkg_buildpackage(*args, cwd=fullpath_repackaged_dirname)
  File "/home/user0/Documents/temp/pac/stdeb-release-0.10.0/stdeb/util.py", line 585, in dpkg_buildpackage
    process_command(args, cwd=cwd)
  File "/home/user0/Documents/temp/pac/stdeb-release-0.10.0/stdeb/util.py", line 226, in process_command
    check_call(args, cwd=cwd)
  File "/home/user0/Documents/temp/pac/stdeb-release-0.10.0/stdeb/util.py", line 59, in check_call
    raise CalledProcessError(retcode)
stdeb.util.CalledProcessError: 2

유사한 버그 보고서를 찾았습니다.여기그리고여기하지만 문제가 해결된 것 같고 시스템이 최신 상태입니다.

이것은 내 /proc/version입니다. 도움이 됩니다.

Linux version 5.8.0-1parrot1-amd64 ([email protected]) (gcc-10 (Debian 10.2.0-5) 10.2.0, GNU ld (GNU Binutils for Debian) 2.35) #1 SMP Debian 5.8.7-1parrot1 (2020-09-14)

문제가 정확히 무엇인지 알려주고 프레임을 구성하는 데 도움을 줄 수 있는 사람이 있습니까?

답변1

오류는 다음과 같습니다

Debian/Debhelper/Sequence/python3.pm을 @INC에서 찾을 수 없습니다.

이 문제를 해결하려면 다음을 설치해야 합니다 dh-python.

sudo apt install dh-python

관련 정보