스냅 애플리케이션 바이너리 타겟

스냅 애플리케이션 바이너리 타겟

짐을 싸려고 하는데첫 번째 Python 앱스냅 앱으로. 나는 많은 Github 저장소를 확인했지만 당신이 있는 부분을 이해할 수 없었습니다.바이너리를 설정하다snap 앱이 실행될 때 실행됩니다( apps:일부). 많은 것을 시도했지만 스냅을 제대로 구축할 수 없었습니다.
빌드에서 phockup바이너리를 찾을 수 없다고 표시되거나 실행 시 성공적으로 빌드했을 때 phockup잘못된 경로를 암시하는 Python 콘솔이 표시됩니다.phockup.py

여기 나의snapcraft.yaml파일

답변1

스냅하려는 프로젝트에는 setup.py어떤 종류의 빌드 시스템도 포함되어 있지 않으므로 Snapcraft는 사용자가 설치하려는 것이 무엇인지 알 수 없습니다. setuptools를 사용하여 프로젝트에 을 추가하거나 setup.py, 그대로 유지하고 다음과 같이 Snapcraft에 정확히 무엇을 설치하고 싶은지 알릴 수 있습니다(키워드 사용에 유의하세요 install).

name: phockup
version: '1.2.0'
summary: Photo and video sorting tool
description: |
  Media sorting and backup tool to organize photos and videos from your camera in folders by year, month and day.
  The software will collect all files from the input directory and transfer them to the output directory without
  changing the files content. It will only rename the files and place them in the proper directory for the year, month and day.
grade: devel
confinement: devmode

apps:
  phockup:
    command: phockup

parts:
  phockup:
    plugin: python
    source: https://github.com/ivandokov/phockup.git
    source-tag: v1.2.0
    install: |
      mkdir -p $SNAPCRAFT_PART_INSTALL/bin
      cp phockup.py $SNAPCRAFT_PART_INSTALL/bin/phockup

관련 정보