1
0
forked from pool/python-qrcode

16 Commits

Author SHA256 Message Date
d40f19da2f Accepting request 1256191 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1256191
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=15
2025-03-26 20:22:26 +00:00
819d260e2a - Fix build and runtime dependencies
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-qrcode?expand=0&rev=34
2025-03-26 12:23:04 +00:00
4937bb4667 Accepting request 1204843 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1204843
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=14
2024-10-01 15:19:24 +00:00
28f2c67d91 - Update to 8.0.0
* Added support for Python 3.11 and 3.12.
  * Drop support for Python <=3.8.
  * Change local development setup to use Poetry_.
  * Testsuite and code quality checks are done
    through Github Actions.
  * Code quality and formatting utilises ruff_.
  * Removed ``typing_extensions`` as a dependency,
    as it's no longer required with
    having Python 3.9+ as a requirement.
  * Only allow high error correction rate (`qrcode.ERROR_CORRECT_H`)
    when generating QR codes with embedded images to ensure content
    is readable
- Install manpage manually in %install section
- Drop 364.patch, merged upstream
- Switch package source from PyPi to Github

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-qrcode?expand=0&rev=32
2024-09-30 23:17:11 +00:00
414cc6e0ff Accepting request 1182940 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1182940
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=13
2024-06-24 18:56:15 +00:00
c4231f7720 Accepting request 1180322 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1180322
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=12
2024-06-13 13:40:14 +00:00
df243dbc51 Accepting request 1144106 from devel:languages:python
- Add missing Requires on pypng.
- Switch to pyproject macros.
- Stop using greedy globs in %files.

OBS-URL: https://build.opensuse.org/request/show/1144106
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=11
2024-02-05 21:01:26 +00:00
55425d86e7 Accepting request 1143969 from devel:languages:python
- update to 7.4.1:
  * Restructure the factory drawers, allowing different shapes in
    SVG image factories as well.
  * Add a --factory-drawer option to the qr console script.
  * Optimize the output for the SVGPathImage factory (more than 30%
    reduction in file sizes).
  * Add a pypng image factory as a pure Python PNG solution.
    If pillow is not installed, then this becomes the default
    factory.
  * The pymaging image factory has been removed, but its
    factory shortcut and the actual PymagingImage factory class
    now just link to the PyPNGImage factory.

- Fix console_script.py missing +x

OBS-URL: https://build.opensuse.org/request/show/1143969
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=10
2024-02-04 18:09:39 +00:00
8e1127197f Accepting request 1122209 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1122209
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=9
2023-11-02 19:22:24 +00:00
9f1d97aa0e Accepting request 967910 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/967910
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=8
2022-04-08 20:46:30 +00:00
bcc943afc0 Accepting request 927547 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/927547
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=7
2021-10-26 18:14:17 +00:00
ae15f93cb9 Accepting request 807267 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/807267
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=6
2020-05-19 12:57:28 +00:00
72162e8d89 Accepting request 689261 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/689261
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=5
2019-03-29 19:42:37 +00:00
47e803361a Accepting request 506507 from devel:languages:python
- pass -s to pytest, to work around bad interaction with older pytest

OBS-URL: https://build.opensuse.org/request/show/506507
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=4
2017-06-28 08:37:26 +00:00
a9050be43d Accepting request 501164 from devel:languages:python
- convert to singlespec
- make binary python3-only
- enable tests
- add proper requirements (fixes boo#1040540)
- update to 5.3
  * better support for tty output in python3
  * --error-correction option
  * fix incomplete block table for QR version 15
  * fix BaseImage.get_image

OBS-URL: https://build.opensuse.org/request/show/501164
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=3
2017-06-05 16:51:03 +00:00
e6f85ff47d Accepting request 325451 from devel:languages:python
1

OBS-URL: https://build.opensuse.org/request/show/325451
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-qrcode?expand=0&rev=2
2015-09-01 22:35:42 +00:00
5 changed files with 37 additions and 49 deletions

View File

@@ -1,33 +0,0 @@
From 0fd5649d6f971e5c19ac7f6953e9d6737d3fbb0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
Date: Mon, 10 Jun 2024 13:22:24 +0200
Subject: [PATCH] Add buffer and fileno for mocked sys.stdout
This change fixes the issue of two failing tests because the sys.stdout
seems not to be properly mocked. Both tests need a buffer and test_piped
additionally needs fileno method.
---
qrcode/tests/test_script.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/qrcode/tests/test_script.py b/qrcode/tests/test_script.py
index 4ae4ccbc..96458e4c 100644
--- a/qrcode/tests/test_script.py
+++ b/qrcode/tests/test_script.py
@@ -30,6 +30,8 @@ def test_isatty(self, mock_print_ascii):
@mock.patch("sys.stdout")
@unittest.skipIf(not Image, "Requires PIL")
def test_piped(self, mock_stdout):
+ mock_stdout.buffer = io.BytesIO()
+ mock_stdout.fileno = lambda: 999
main(["testtext"])
@mock.patch("os.isatty", lambda *args: True)
@@ -61,6 +63,7 @@ def test_optimize(self, mock_print_ascii):
@mock.patch("sys.stdout")
def test_factory(self, mock_stdout):
+ mock_stdout.buffer = io.BytesIO()
main("testtext --factory svg".split())
@mock.patch("sys.stderr")

View File

@@ -1,3 +1,28 @@
-------------------------------------------------------------------
Wed Mar 26 10:05:29 UTC 2025 - Ben Greiner <code@bnavigator.de>
- Fix build and runtime dependencies
-------------------------------------------------------------------
Mon Sep 30 09:47:24 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 8.0.0
* Added support for Python 3.11 and 3.12.
* Drop support for Python <=3.8.
* Change local development setup to use Poetry_.
* Testsuite and code quality checks are done
through Github Actions.
* Code quality and formatting utilises ruff_.
* Removed ``typing_extensions`` as a dependency,
as it's no longer required with
having Python 3.9+ as a requirement.
* Only allow high error correction rate (`qrcode.ERROR_CORRECT_H`)
when generating QR codes with embedded images to ensure content
is readable
- Install manpage manually in %install section
- Drop 364.patch, merged upstream
- Switch package source from PyPi to Github
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Jun 23 08:43:04 UTC 2024 - Andreas Schneider <asn@cryptomilk.org> Sun Jun 23 08:43:04 UTC 2024 - Andreas Schneider <asn@cryptomilk.org>

View File

@@ -18,27 +18,23 @@
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-qrcode Name: python-qrcode
Version: 7.4.2 Version: 8.0
Release: 0 Release: 0
Summary: QR Code image generator Summary: QR Code image generator
License: BSD-3-Clause License: BSD-3-Clause
URL: https://github.com/lincolnloop/python-qrcode URL: https://github.com/lincolnloop/python-qrcode
Source: https://files.pythonhosted.org/packages/source/q/qrcode/qrcode-%{version}.tar.gz Source: %{url}/archive/v%{version}.tar.gz#/qrcode-%{version}.tar.gz
# PATCH-FIX-UPSTREAM - Add buffer and fileno for mocked sys.stdout BuildRequires: %{python_module Pillow >= 9.1.0}
Patch0: https://github.com/lincolnloop/python-qrcode/pull/364.patch BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: %{python_module pypng} BuildRequires: %{python_module pypng}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module typing-extensions} BuildRequires: %{python_module typing-extensions}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-Pillow Recommends: python-Pillow >= 9.1.0
Requires: python-pypng Recommends: python-pypng
Requires: python-setuptools
Requires: python-typing-extensions
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun): update-alternatives
BuildArch: noarch BuildArch: noarch
@@ -49,8 +45,7 @@ This module uses the Python Imaging Library (PIL) to allow for the generation
of QR Codes. of QR Codes.
%prep %prep
%setup -q -n qrcode-%{version} %setup -q -n python-qrcode-%{version}
%patch -P0 -p1
# drop shebang from console_scripts # drop shebang from console_scripts
sed -i '1s@^#!.*@@' qrcode/console_scripts.py sed -i '1s@^#!.*@@' qrcode/console_scripts.py
@@ -59,6 +54,7 @@ sed -i '1s@^#!.*@@' qrcode/console_scripts.py
%install %install
%pyproject_install %pyproject_install
install -Dm 644 doc/qr.1 %{buildroot}%{_mandir}/man1/qr.1
%python_clone -a %{buildroot}%{_mandir}/man1/qr.1 %python_clone -a %{buildroot}%{_mandir}/man1/qr.1
%python_clone -a %{buildroot}%{_bindir}/qr %python_clone -a %{buildroot}%{_bindir}/qr
%fdupes %{buildroot}%{_prefix} %fdupes %{buildroot}%{_prefix}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9dd969454827e127dbd93696b20747239e6d540e082937c90f14ac95b30f5845
size 535974

3
qrcode-8.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e2977d4ede15447734957a5fb535849cbb898086b4bb7045a6be4b07d70299a
size 528966