Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ jobs:
with:
user: __token__
password: ${{ env.B2_PYPI_PASSWORD }}

debian-release:
if: ${{ vars.B2_DEBIAN_BUCKET_UPLOAD }}
name: Build Debian Package

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this step should be skipped if B2_DEBIAN vars are missing - we won't be running this on our fork and will be running on the upstream

uses: ./.github/workflows/cd_debian.yml
secrets: inherit
with:
b2-upload-bucket: ${{ vars.B2_DEBIAN_BUCKET_UPLOAD }}
39 changes: 39 additions & 0 deletions .github/workflows/cd_debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Debian Continuous Delivery

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+999999999 for putting this in a separate file


on:
workflow_call:
inputs:
b2-upload-bucket:
required: true
type: string

env:
PYTHON_DEFAULT_VERSION: "3.11"

jobs:
build-deb:
env:
# dont run tests in Debian build, we ran them already
DEB_BUILD_OPTIONS: nocheck
B2_APPLICATION_KEY_ID: '${{ secrets.B2_DEBIAN_APPLICATION_KEY_ID }}'
B2_APPLICATION_KEY: '${{ secrets.B2_DEBIAN_APPLICATION_KEY }}'

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}

- uses: jtdor/build-deb-action@v1
with:
buildpackage-opts: --build=binary

- name: Upload to B2
working-directory: debian/artifacts
run: |
ls -1 *.deb | xargs -I {} sudo apt install ./{}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a test? why are these packages being installed here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it's kind of a test

pip install -U wheel b2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inception :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¯\_(ツ)_/¯

ls -1 *.deb | xargs -I {} b2 upload_file ${{ inputs.b2-upload-bucket }} {} {}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ dist
venv
.venv
.vscode
.pc
.pybuild
debian/python3-b2sdk*
debian/.debhelper
debian/debhelper-build-stamp
debian/files
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
* `version_utils` decorators now ignore `current_version` parameter to better fit `apiver` needs
* Unpin `setuptools-scm<6.0` as we don't support Python 3.5 (reason for pinning) anymore

### Fixed
* Circular symlinks no longer cause infinite loops when syncing a folder

### Infrastructure
* Replaced `pyflakes` with `ruff` for linting
* Add Debian package build to CD

## [1.21.0] - 2023-04-17

Expand Down
133 changes: 133 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
python-b2sdk (1.21.0-1) unstable; urgency=medium

* New upstream release.
* d/control: Add constraint X-Python3-Version to 3.7+

-- yed podtrzitko <[email protected]> Thu, 15 Jun 2023 13:29:34 +0800

python-b2sdk (1.17.3-2) unstable; urgency=medium

[ Debian Janitor ]
* Set upstream metadata fields: Repository.
* Remove obsolete field Name from debian/upstream/metadata (already present in
machine-readable debian/copyright).

-- Jelmer Vernooij <[email protected]> Mon, 17 Oct 2022 00:28:54 +0100

python-b2sdk (1.17.3-1) unstable; urgency=medium

* Team upload.
* New upstream release.
* Build depend on python3-pyfakefs and python3-pytest-lazy-fixture, now
required to run the tests.
* Update PYBUILD_TEST_ARGS to skip integration tests.
* Update autopkgtest to install -pyfakefs and -pytest-lazy-fixture and skip
integration tests.
* Update debian/patches/0001-Don-t-use-setuptools-scm.patch and
debian/patches/0002-Hardcoded-b2sdk-version.patch.
* Update Standards-Version, no changes needed.

-- Emanuele Rocca <[email protected]> Wed, 14 Sep 2022 21:43:39 +0200

python-b2sdk (1.3.0-4) unstable; urgency=medium

* debian/tests/control
- fix pytest -k syntax for pytest7 also for autopkgtests

-- Sandro Tosi <[email protected]> Sat, 09 Jul 2022 10:45:50 -0400

python-b2sdk (1.3.0-3) unstable; urgency=medium

* debian/rules
- fix pytest -k syntax for pytest7; Closes: #1013724

-- Sandro Tosi <[email protected]> Sun, 26 Jun 2022 13:09:52 -0400

python-b2sdk (1.3.0-2) unstable; urgency=medium

* Team upload.
* debian/control
- use proper team email address

-- Sandro Tosi <[email protected]> Wed, 25 Aug 2021 00:24:22 -0400

python-b2sdk (1.3.0-1) unstable; urgency=medium

* Team upload.

[ Ondřej Nový ]
* d/control: Update Vcs-* fields with new Debian Python Team Salsa
layout.

[ Emmanuel Arias ]
* New upstream version 1.3.0 (Closes: #975721)
* d/rules: Skip test_raw_api test.
- This test use network access.
* d/control: Use python3-pytest and python3-pytest-mock (Closes: #981766).
- Remove python3-mock.
* d/tests/control: Use py3versions -s instead of py3versions -i.
* wrap-and-sort.
* d/salsa-ci.yml: enable salsa-ci.
* d/patch: Add patch to remove setuptools-scm dependency.
- Add patch to hardcoded version to 1.3.0.

-- Emmanuel Arias <[email protected]> Wed, 10 Feb 2021 19:13:13 -0300

python-b2sdk (1.1.4-1) unstable; urgency=medium

* New upstream release.

-- Ondřej Kobližek <[email protected]> Wed, 26 Aug 2020 10:18:22 +0200

python-b2sdk (1.0.2-3) unstable; urgency=medium

* d/control:
- Bump debhelper compat levet to 13
- Bump standards version to 4.5.0 (no changes)
- Update mailing-list address in Maintainer
- Remove upper version limit for python3-arrow as dependency

-- Ondřej Kobližek <[email protected]> Mon, 25 May 2020 07:13:34 +0200

python-b2sdk (1.0.2-2) unstable; urgency=medium

* Add python3-arrow as dependency (Closes: #955565).

-- Ondřej Nový <[email protected]> Fri, 22 May 2020 10:29:25 +0200

python-b2sdk (1.0.2-1) unstable; urgency=medium

* Change my email address.
* New upstream release.
* d/tests/control: Add dependency python3-arrow.

-- Ondřej Kobližek <[email protected]> Wed, 23 Oct 2019 08:15:57 +0200

python-b2sdk (1.0.0-2) unstable; urgency=medium

* d/control: remove upper version constraint for python3-arrow (no needed
for Python version greater than 3.4)
https://github.com/Backblaze/b2-sdk-python/pull/64

-- Ondřej Kobližek <[email protected]> Fri, 11 Oct 2019 13:10:37 +0200

python-b2sdk (1.0.0-1) unstable; urgency=medium

* New upstream release
* d/control:
- Add Rules-Requires-Root
- Bump standards version to 4.4.1 (no changes)

-- Ondřej Kobližek <[email protected]> Fri, 04 Oct 2019 12:30:44 +0200

python-b2sdk (1.0.0~rc1-2) unstable; urgency=medium

* Rebuild for source upload

-- Ondřej Kobližek <[email protected]> Mon, 05 Aug 2019 06:45:31 +0200

python-b2sdk (1.0.0~rc1-1) unstable; urgency=medium

* Initial release (Closes: #931755)

-- Ondřej Kobližek <[email protected]> Fri, 19 Jul 2019 00:20:08 +0200
45 changes: 45 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Source: python-b2sdk
Section: python
Priority: optional
Maintainer: Debian Python Modules Team <[email protected]>
Uploaders:
Ondřej Kobližek <[email protected]>,
Build-Depends:
debhelper-compat (= 13),
dh-python,
python3-all,
python3-arrow,
python3-pyfakefs,
python3-logfury,
python3-pyflakes,
python3-pytest,
python3-pytest-lazy-fixture,
python3-pytest-mock,
python3-requests,
python3-setuptools,
python3-setuptools-scm,
python3-six,
python3-tqdm,
yapf3,
Standards-Version: 4.6.1
Homepage: https://github.com/Backblaze/b2-sdk-python
Vcs-Git: https://salsa.debian.org/python-team/packages/python-b2sdk.git
Vcs-Browser: https://salsa.debian.org/python-team/packages/python-b2sdk
Testsuite: autopkgtest-pkg-python
Rules-Requires-Root: no

Package: python3-b2sdk
X-Python3-Version: >= 3.7
Architecture: all
Depends:
python3-arrow,
${misc:Depends},
${python3:Depends},
Description: Python library to access B2 cloud storage
Client library and a few handy utilities for easy access to all of
the capabilities of B2 Cloud Storage.
.
B2 command-line tool (backblaze-b2 package) is an example of how it
can be used to provide command-line access to the B2 service, but
there are many possible applications (including FUSE filesystems,
storage backend drivers for backup applications etc).
33 changes: 33 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: b2-sdk-python
Upstream-Contact: Backblaze, Inc. <[email protected]>
Source: https://github.com/Backblaze/b2-sdk-python

Files: *
Copyright:
2015-2019, Backblaze, Inc. <[email protected]>
License: Expat

Files: debian/*
Copyright:
2019, Ondřej Kobližek <[email protected]>
License: Expat

License: Expat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions debian/debhelper-build-stamp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3-b2sdk
2 changes: 2 additions & 0 deletions debian/gbp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[DEFAULT]
debian-branch=debian/master
11 changes: 11 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /usr/bin/make -f

export PYBUILD_NAME=b2sdk
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=test/static/ test/unit/ -k "not test_requests_notice_file"

%:
dh $@ --buildsystem=pybuild --with python3

override_dh_installchangelogs:
dh_installchangelogs $(CURDIR)/README.md
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
1 change: 1 addition & 0 deletions debian/source/options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extend-diff-ignore = "^[^/]*[.]egg-info/"
12 changes: 12 additions & 0 deletions debian/tests/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Depends:
python3-all,
python3-arrow,
python3-b2sdk,
python3-pyfakefs,
python3-pyflakes,
python3-pytest,
python3-pytest-lazy-fixture,
python3-pytest-mock,
python3-setuptools,
yapf3,
Test-Command: set -e; for py in $(py3versions -s); do echo "[*] testing on $py:"; $py -m pytest test/unit/ -k "not test_requests_notice_file" 2>&1; done
4 changes: 4 additions & 0 deletions debian/upstream/metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bug-Database: https://github.com/Backblaze/b2-sdk-python/issues
Bug-Submit: https://github.com/Backblaze/b2-sdk-python/issues/new
Repository: https://github.com/Backblaze/b2-sdk-python.git
Repository-Browse: https://github.com/Backblaze/b2-sdk-python.git
5 changes: 5 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version=4
opts=\
uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/,\
filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/python-b2sdk-$1\.tar\.gz/ \
https://github.com/Backblaze/b2-sdk-python/tags .*/v?(\d\S*)\.tar\.gz
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def read_requirements(extra=None):
# for example:
# $ pip install -e .[dev,test]
extras_require={'doc': read_requirements('doc')},
setup_requires=['setuptools_scm<6.0'],
setup_requires=['setuptools_scm'],
use_scm_version=True,

# If there are data files included in your packages that need to be
Expand All @@ -131,3 +131,4 @@ def read_requirements(extra=None):
'pyinstaller40': ['hook-dirs=b2sdk._pyinstaller:get_hook_dirs'],
},
)