Clean up supporting files (#771)

This commit is contained in:
Manu 2021-01-20 12:59:37 +08:00 committed by GitHub
parent 031a5f64ce
commit 6493e1798c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 111 deletions

View File

@ -1,4 +0,0 @@
[run]
omit = tests/*
source=vorta
relative_files=true

View File

@ -41,7 +41,6 @@ jobs:
- name: Install Vorta
run: |
pip install .
pip install coverage
pip install borgbackup
pip install -r requirements.d/dev.txt
# - name: Setup tmate session
@ -63,7 +62,7 @@ jobs:
coverage run -m pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
env:
env:
OS: ${{ runner.os }}
python: ${{ matrix.python-version }}
with:

View File

@ -8,23 +8,12 @@ VERSION := $(shell python -c "from src.vorta._version import __version__; print(
clean:
rm -rf dist/*
dist/Vorta.app:
dist/Vorta.app: ## Build macOS app locally (without Borg)
pyinstaller --clean --noconfirm package/vorta.spec
cp -R bin/darwin/Sparkle.framework dist/Vorta.app/Contents/Frameworks/
cp -R ${BORG_SRC}/dist/borg-dir dist/Vorta.app/Contents/Resources/
rm -rf build/vorta
rm -rf dist/vorta
borg: ## Build Borg single-dir release for bundling in macOS
rm -rf ${BORG_SRC}/dist/*
cd ${BORG_SRC} && python setup.py clean && pip install -U -e .
cd ${BORG_SRC} && pyinstaller --clean --noconfirm ../vorta/package/borg.spec .
find ${BORG_SRC}/dist/borg-dir -type f \( -name \*.so -or -name \*.dylib -or -name borg.exe \) \
-exec codesign --verbose --force --sign "${CERTIFICATE_NAME}" \
--entitlements package/entitlements.plist --timestamp --deep --options runtime {} \;
cp -R /usr/local/Caskroom/sparkle/*/Sparkle.framework dist/Vorta.app/Contents/Frameworks/
rm -rf build/vorta dist/vorta
dist/Vorta.dmg: dist/Vorta.app ## Create notarized macOS DMG for distribution.
# Workaround for dots in filenames. See https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signing-Qt
python3 package/fix_app_qt_folder_names_for_codesign.py dist/Vorta.app
cd dist && sh ../package/macos-package-app.sh

View File

@ -1,17 +0,0 @@
{
"title": "Vorta Backups",
"contents": [
{ "x": 448, "y": 144, "type": "link", "path": "/Applications" },
{ "x": 162, "y": 144, "type": "file", "path": "../dist/Vorta.app" }
],
"format": "ULFO",
"code-sign": {
"signing-identity": "Developer ID Application: Manuel Riel (CNMSCAXT48)"
},
"window": {
"size": {
"height": 300,
"width": 600
}
}
}

View File

@ -1,53 +0,0 @@
# -*- mode: python -*-
# this pyinstaller spec file is used to build borg binaries on posix platforms
# adapted from Borg project to package noatrized folder-style app
import os, sys
## Pass borg source dir as last argument
basepath = os.path.abspath(os.path.join(sys.argv[-1]))
block_cipher = None
a = Analysis([os.path.join(basepath, 'src', 'borg', '__main__.py'), ],
pathex=[basepath, ],
binaries=[],
datas=[
(os.path.join(basepath, 'src', 'borg', 'paperkey.html'), 'borg'),
],
hiddenimports=[
'borg.platform.posix',
'borg.platform.darwin',
],
hookspath=[],
runtime_hooks=[],
excludes=[
'_ssl', 'ssl',
],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
if sys.platform == 'darwin':
# do not bundle the osxfuse libraries, so we do not get a version
# mismatch to the installed kernel driver of osxfuse.
a.binaries = [b for b in a.binaries if 'libosxfuse' not in b[0]]
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='borg.exe',
debug=False,
strip=False,
upx=False,
console=True)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name='borg-dir')

View File

@ -1,4 +1,11 @@
# -*- coding: utf-8 -*-
"""
Remove dots in filenames of libraries after PyInstaller.
See https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OSX-Code-Signing-Qt
"""
import os
import shutil
import sys

View File

@ -1,20 +0,0 @@
name: vorta
channels:
- conda-forge
- defaults
dependencies:
- python=3.6.7
- appdirs
- paramiko
- pyqt
- peewee
- python-dateutil
- keyring
- apscheduler
- sentry-sdk
- psutil
- pyobjc-core
- pyobjc-framework-Cocoa
- pyinstaller

View File

@ -1,3 +1,4 @@
coverage
flake8
pyinstaller
pylint

View File

@ -18,12 +18,17 @@ classifiers =
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: System :: Archiving :: Backup
Topic :: System :: Systems Administration
Topic :: Utilities
long_description = file: README.md
long_description_content_type = text/markdown
license_file = LICENSE.txt
project_urls =
Bug Tracker = https://github.com/borgbase/vorta/issues
Documentation = https://docs.borgbase.com
Source Code = https://github.com/borgbase/vorta
[options]
python_requires = >= 3.6
@ -61,7 +66,9 @@ filterwarnings =
ignore::DeprecationWarning
[coverage:run]
source = src
source = vorta
omit = tests/*
relative_files = true
[flake8]
ignore =