Hello community,
here is the log from the commit of package python-python-barcode for
openSUSE:Factory checked in at 2019-05-27 08:39:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-barcode (Old)
and /work/SRC/openSUSE:Factory/.python-python-barcode.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-barcode"
Mon May 27 08:39:14 2019 rev:3 rq:705390 version:0.10.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-python-barcode/python-python-barcode.changes
2019-05-06 13:21:16.808521536 +0200
+++
/work/SRC/openSUSE:Factory/.python-python-barcode.new.5148/python-python-barcode.changes
2019-05-27 08:39:29.819044974 +0200
@@ -1,0 +2,7 @@
+Sat May 25 09:01:04 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.10.0:
+ * Various minor fixes and tweaks
+ * CI integration fixes
+
+-------------------------------------------------------------------
Old:
----
python-barcode-0.9.0.tar.gz
New:
----
python-barcode-0.10.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-barcode.spec ++++++
--- /var/tmp/diff_new_pack.Ttx9hU/_old 2019-05-27 08:39:30.279044794 +0200
+++ /var/tmp/diff_new_pack.Ttx9hU/_new 2019-05-27 08:39:30.279044794 +0200
@@ -21,7 +21,7 @@
%define skip_python2 1
%define base_name python-barcode
Name: python-%{base_name}
-Version: 0.9.0
+Version: 0.10.0
Release: 0
Summary: Library to create Barcodes with Python
License: MIT
@@ -48,6 +48,8 @@
%setup -q -n %{base_name}-%{version}
# Fix rpmlint warning about too many +x perms when these files get installed
later.
find . -type f -exec chmod a-x {} +
+# doc buildscripts we don't wanna ship
+rm docs/{Makefile,make.bat}
%build
%python_build
++++++ python-barcode-0.9.0.tar.gz -> python-barcode-0.10.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/.travis.yml
new/python-barcode-0.10.0/.travis.yml
--- old/python-barcode-0.9.0/.travis.yml 2018-06-14 18:49:51.000000000
+0200
+++ new/python-barcode-0.10.0/.travis.yml 2019-05-24 10:41:57.000000000
+0200
@@ -4,7 +4,6 @@
python:
- 3.5
- 3.6
- - 3.7-dev
stages:
@@ -18,6 +17,10 @@
jobs:
include:
+ - stage: test
+ python: 3.7
+ dist: xenial
+ sudo: true
- stage: deploy
script:
- pip install wheel twine
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/PKG-INFO
new/python-barcode-0.10.0/PKG-INFO
--- old/python-barcode-0.9.0/PKG-INFO 2018-06-14 18:50:08.000000000 +0200
+++ new/python-barcode-0.10.0/PKG-INFO 2019-05-24 10:42:11.000000000 +0200
@@ -1,22 +1,33 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: python-barcode
-Version: 0.9.0
-Summary: Create standard barcodes with Python. No external modules needed
(optional PIL support included).
+Version: 0.10.0
+Summary: Create standard barcodes with Python. No external modules needed.
(optional Pillow support included).
Home-page: https://github.com/WhyNotHugo/python-barcode
Author: Thorsten Weimann et al
Author-email: [email protected]
License: MIT
-Description-Content-Type: UNKNOWN
Description: python-barcode
==============
- .. image:: example-ean13.png
- :target: https://github.com/WhyNotHugo/python-barcode
- :alt: python-barcode
+ .. image::
https://travis-ci.org/WhyNotHugo/python-barcode.svg?branch=master
+ :target: https://travis-ci.org/WhyNotHugo/python-barcode
+ :alt: build status
+
+ .. image:: https://img.shields.io/pypi/v/python-barcode.svg
+ :target: https://pypi.python.org/pypi/python-barcode
+ :alt: version on pypi
+
+ .. image:: https://img.shields.io/pypi/l/python-barcode.svg
+ :target:
https://github.com/WhyNotHugo/python-barcode/blob/master/LICENCE
+ :alt: licence
This library provides a simple way to create barcodes using only the
Python standard lib. The barcodes are created as SVG objects.
+ .. image:: example-ean13.png
+ :target: https://github.com/WhyNotHugo/python-barcode
+ :alt: python-barcode
+
Please report any bugs at
https://github.com/WhyNotHugo/python-barcode/issues
@@ -26,7 +37,7 @@
- Setuptools/distribute for installation.
- Python 3.5 or above
- Program to open SVG objects (your browser should do it)
- - Optional: PIL to render barcodes as images (PNG, JPG, ...)
+ - Optional: Pillow to render barcodes as images (PNG, JPG, ...)
Installation
@@ -67,37 +78,37 @@
>>> import barcode
>>> barcode.PROVIDED_BARCODES
- [u'code39', u'code128', u'ean', u'ean13', u'ean8', u'gs1', u'gtin',
- u'isbn', u'isbn10', u'isbn13', u'issn', u'jan', u'pzn', u'upc',
u'upca']
+ ['code39', 'code128', 'ean', 'ean13', 'ean8', 'gs1', 'gtin',
+ 'isbn', 'isbn10', 'isbn13', 'issn', 'jan', 'pzn', 'upc', 'upca']
>>> EAN = barcode.get_barcode_class('ean13')
>>> EAN
<class 'barcode.ean.EuropeanArticleNumber13'>
- >>> ean = EAN(u'5901234123457')
+ >>> ean = EAN('5901234123457')
>>> ean
<barcode.ean.EuropeanArticleNumber13 object at 0x00BE98F0>
>>> fullname = ean.save('ean13_barcode')
>>> fullname
- u'ean13_barcode.svg'
+ 'ean13_barcode.svg'
# Example with PNG
>>> from barcode.writer import ImageWriter
- >>> ean = EAN(u'5901234123457', writer=ImageWriter())
+ >>> ean = EAN('5901234123457', writer=ImageWriter())
>>> fullname = ean.save('ean13_barcode')
- u'ean13_barcode.png'
+ 'ean13_barcode.png'
# New in v0.4.2
>>> from StringIO import StringIO
>>> fp = StringIO()
>>> ean.write(fp)
# or
>>> f = open('/my/new/file', 'wb')
- >>> ean.write(f) # PIL (ImageWriter) produces RAW format here
+ >>> ean.write(f) # Pillow (ImageWriter) produces RAW format here
# New in v0.5.0
>>> from barcode import generate
- >>> name = generate('EAN13', u'5901234123457',
output='barcode_svg')
+ >>> name = generate('EAN13', '5901234123457', output='barcode_svg')
>>> name
- u'barcode_svg.svg'
+ 'barcode_svg.svg'
# with file like object
>>> fp = StringIO()
- >>> generate('EAN13', u'5901234123457', writer=ImageWriter(),
output=fp)
+ >>> generate('EAN13', '5901234123457', writer=ImageWriter(),
output=fp)
>>>
Now open ean13_barcode.[svg|png] in a graphic app or simply in your
browser
@@ -105,16 +116,29 @@
Commandline::
- $ pybarcode create "My Text" outfile
+ $ python-barcode create "My Text" outfile
New barcode saved as outfile.svg.
- $ pybarcode create -t png "My Text" outfile
+ $ python-barcode create -t png "My Text" outfile
New barcode saved as outfile.png.
- Try `pybarcode -h` for help.
+ Try `python-barcode -h` for help.
Changelog
---------
+ v0.9.1
+ ~~~~~~
+
+ * Officially support Python 3.7
+ * Refer to Pillow in the docs, rather than PIL.
+
+ v0.9.0
+ ~~~~~~
+
+ * Removed buggy ``Barcode.raw`` attribute.
+ * Various CLI errors ironed out.
+ * Make the default value for ``writer_options``` consistent across
writers.
+
v0.8.3
~~~~~~
@@ -228,5 +252,7 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Provides-Extra: images
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/README.rst
new/python-barcode-0.10.0/README.rst
--- old/python-barcode-0.9.0/README.rst 2018-06-14 18:49:51.000000000 +0200
+++ new/python-barcode-0.10.0/README.rst 2019-05-24 10:41:57.000000000
+0200
@@ -1,13 +1,25 @@
python-barcode
==============
-.. image:: example-ean13.png
- :target: https://github.com/WhyNotHugo/python-barcode
- :alt: python-barcode
+.. image:: https://travis-ci.org/WhyNotHugo/python-barcode.svg?branch=master
+ :target: https://travis-ci.org/WhyNotHugo/python-barcode
+ :alt: build status
+
+.. image:: https://img.shields.io/pypi/v/python-barcode.svg
+ :target: https://pypi.python.org/pypi/python-barcode
+ :alt: version on pypi
+
+.. image:: https://img.shields.io/pypi/l/python-barcode.svg
+ :target: https://github.com/WhyNotHugo/python-barcode/blob/master/LICENCE
+ :alt: licence
This library provides a simple way to create barcodes using only the
Python standard lib. The barcodes are created as SVG objects.
+.. image:: example-ean13.png
+ :target: https://github.com/WhyNotHugo/python-barcode
+ :alt: python-barcode
+
Please report any bugs at https://github.com/WhyNotHugo/python-barcode/issues
@@ -17,7 +29,7 @@
- Setuptools/distribute for installation.
- Python 3.5 or above
- Program to open SVG objects (your browser should do it)
-- Optional: PIL to render barcodes as images (PNG, JPG, ...)
+- Optional: Pillow to render barcodes as images (PNG, JPG, ...)
Installation
@@ -58,37 +70,37 @@
>>> import barcode
>>> barcode.PROVIDED_BARCODES
- [u'code39', u'code128', u'ean', u'ean13', u'ean8', u'gs1', u'gtin',
- u'isbn', u'isbn10', u'isbn13', u'issn', u'jan', u'pzn', u'upc', u'upca']
+ ['code39', 'code128', 'ean', 'ean13', 'ean8', 'gs1', 'gtin',
+ 'isbn', 'isbn10', 'isbn13', 'issn', 'jan', 'pzn', 'upc', 'upca']
>>> EAN = barcode.get_barcode_class('ean13')
>>> EAN
<class 'barcode.ean.EuropeanArticleNumber13'>
- >>> ean = EAN(u'5901234123457')
+ >>> ean = EAN('5901234123457')
>>> ean
<barcode.ean.EuropeanArticleNumber13 object at 0x00BE98F0>
>>> fullname = ean.save('ean13_barcode')
>>> fullname
- u'ean13_barcode.svg'
+ 'ean13_barcode.svg'
# Example with PNG
>>> from barcode.writer import ImageWriter
- >>> ean = EAN(u'5901234123457', writer=ImageWriter())
+ >>> ean = EAN('5901234123457', writer=ImageWriter())
>>> fullname = ean.save('ean13_barcode')
- u'ean13_barcode.png'
+ 'ean13_barcode.png'
# New in v0.4.2
>>> from StringIO import StringIO
>>> fp = StringIO()
>>> ean.write(fp)
# or
>>> f = open('/my/new/file', 'wb')
- >>> ean.write(f) # PIL (ImageWriter) produces RAW format here
+ >>> ean.write(f) # Pillow (ImageWriter) produces RAW format here
# New in v0.5.0
>>> from barcode import generate
- >>> name = generate('EAN13', u'5901234123457', output='barcode_svg')
+ >>> name = generate('EAN13', '5901234123457', output='barcode_svg')
>>> name
- u'barcode_svg.svg'
+ 'barcode_svg.svg'
# with file like object
>>> fp = StringIO()
- >>> generate('EAN13', u'5901234123457', writer=ImageWriter(), output=fp)
+ >>> generate('EAN13', '5901234123457', writer=ImageWriter(), output=fp)
>>>
Now open ean13_barcode.[svg|png] in a graphic app or simply in your browser
@@ -96,16 +108,29 @@
Commandline::
- $ pybarcode create "My Text" outfile
+ $ python-barcode create "My Text" outfile
New barcode saved as outfile.svg.
- $ pybarcode create -t png "My Text" outfile
+ $ python-barcode create -t png "My Text" outfile
New barcode saved as outfile.png.
- Try `pybarcode -h` for help.
+ Try `python-barcode -h` for help.
Changelog
---------
+v0.9.1
+~~~~~~
+
+* Officially support Python 3.7
+* Refer to Pillow in the docs, rather than PIL.
+
+v0.9.0
+~~~~~~
+
+* Removed buggy ``Barcode.raw`` attribute.
+* Various CLI errors ironed out.
+* Make the default value for ``writer_options``` consistent across writers.
+
v0.8.3
~~~~~~
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/barcode/__init__.py
new/python-barcode-0.10.0/barcode/__init__.py
--- old/python-barcode-0.9.0/barcode/__init__.py 2018-06-14
18:49:51.000000000 +0200
+++ new/python-barcode-0.10.0/barcode/__init__.py 2019-05-24
10:41:57.000000000 +0200
@@ -7,13 +7,12 @@
This package provides a simple way to create standard barcodes.
It needs no external packages to be installed, the barcodes are
-created as SVG objects. If PIL (Python Imaging Library) is
-installed, the barcodes can also be rendered as images (all
-formats supported by PIL).
+created as SVG objects. If Pillow is installed, the barcodes can also be
+rendered as images (all formats supported by Pillow).
"""
from barcode.errors import BarcodeNotFoundError
-from barcode.codex import Code39, PZN, Code128
+from barcode.codex import Code39, PZN, Code128, Gs1_128
from barcode.ean import EAN8, EAN13, EAN14, JAN
from barcode.isxn import ISBN10, ISBN13, ISSN
from barcode.upc import UPCA
@@ -44,20 +43,22 @@
pzn=PZN,
code128=Code128,
itf=ITF,
+ gs1_128=Gs1_128,
)
-PROVIDED_BARCODES = list(__BARCODE_MAP.keys())
+PROVIDED_BARCODES = list(__BARCODE_MAP)
PROVIDED_BARCODES.sort()
-def get(name, code=None, writer=None):
+def get(name, code=None, writer=None, options=None):
+ options = options or {}
try:
barcode = __BARCODE_MAP[name.lower()]
except KeyError:
raise BarcodeNotFoundError('The barcode {0!r} you requested is not '
'known.'.format(name))
if code is not None:
- return barcode(code, writer)
+ return barcode(code, writer, **options)
else:
return barcode
@@ -69,7 +70,7 @@
def generate(name, code, writer=None, output=None, writer_options=None,
text=None, pil=False):
options = writer_options or {}
- barcode = get(name, code, writer)
+ barcode = get(name, code, writer, options)
if pil:
return barcode.render(writer_options, text)
if isinstance(output, _strbase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/barcode/codex.py
new/python-barcode-0.10.0/barcode/codex.py
--- old/python-barcode-0.9.0/barcode/codex.py 2018-06-14 18:49:51.000000000
+0200
+++ new/python-barcode-0.10.0/barcode/codex.py 2019-05-24 10:41:57.000000000
+0200
@@ -258,5 +258,25 @@
return Barcode.render(self, options, text)
+class Gs1_128(Code128):
+ """
+ following the norm, a gs1-128 barcode is a subset of code 128 barcode,
+ it can be generated by prepending the code with the FNC1 character
+ https://en.wikipedia.org/wiki/GS1-128
+ https://www.gs1-128.info/
+ """
+
+ name = 'GS1-128'
+
+ FNC1_CHAR = '\xf1'
+
+ def __init__(self, code, writer=None):
+ code = self.FNC1_CHAR + code
+ super(Gs1_128, self).__init__(code, writer)
+
+ def get_fullcode(self):
+ return super(Gs1_128, self).get_fullcode()[1:]
+
+
# For pre 0.8 compatibility
PZN = PZN7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/barcode/isxn.py
new/python-barcode-0.10.0/barcode/isxn.py
--- old/python-barcode-0.9.0/barcode/isxn.py 2018-06-14 18:49:51.000000000
+0200
+++ new/python-barcode-0.10.0/barcode/isxn.py 2019-05-24 10:41:57.000000000
+0200
@@ -19,13 +19,13 @@
>>> ISBN = get_barcode('isbn10')
>>> isbn = ISBN('0132354187')
>>> unicode(isbn)
- u'0132354187'
+ '0132354187'
>>> isbn.get_fullcode()
- u'9780132354189'
+ '9780132354189'
>>> # Test with wrong checksum
>>> isbn = ISBN('0132354180')
>>> unicode(isbn)
- u'0132354187'
+ '0132354187'
"""
__docformat__ = 'restructuredtext en'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/barcode/pybarcode.py
new/python-barcode-0.10.0/barcode/pybarcode.py
--- old/python-barcode-0.9.0/barcode/pybarcode.py 2018-06-14
18:49:51.000000000 +0200
+++ new/python-barcode-0.10.0/barcode/pybarcode.py 2019-05-24
10:41:57.000000000 +0200
@@ -33,9 +33,9 @@
print('Available image formats')
print('Standard: svg')
if ImageWriter is not None:
- print('PIL:', ', '.join(IMG_FORMATS))
+ print('Pillow:', ', '.join(IMG_FORMATS))
else:
- print('PIL: disabled')
+ print('Pillow: disabled')
print('\n')
@@ -68,7 +68,7 @@
msg = []
if ImageWriter is None:
msg.append(
- 'Image output disabled (PIL not found), --type option disabled.'
+ 'Image output disabled (Pillow not found), --type option disabled.'
)
else:
msg.append(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/barcode/version.py
new/python-barcode-0.10.0/barcode/version.py
--- old/python-barcode-0.9.0/barcode/version.py 2018-06-14 18:50:08.000000000
+0200
+++ new/python-barcode-0.10.0/barcode/version.py 2019-05-24
10:42:11.000000000 +0200
@@ -1,4 +1,4 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '0.9.0'
+version = '0.10.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/barcode/writer.py
new/python-barcode-0.10.0/barcode/writer.py
--- old/python-barcode-0.9.0/barcode/writer.py 2018-06-14 18:49:51.000000000
+0200
+++ new/python-barcode-0.10.0/barcode/writer.py 2019-05-24 10:41:57.000000000
+0200
@@ -18,7 +18,7 @@
except ImportError:
import logging
log = logging.getLogger('pyBarcode')
- log.info('PIL not found. Image output disabled')
+ log.info('Pillow not found. Image output disabled')
Image = ImageDraw = ImageFont = None # lint:ok
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/docs/barcode.rst
new/python-barcode-0.10.0/docs/barcode.rst
--- old/python-barcode-0.9.0/docs/barcode.rst 2018-06-14 18:49:51.000000000
+0200
+++ new/python-barcode-0.10.0/docs/barcode.rst 2019-05-24 10:41:57.000000000
+0200
@@ -1,9 +1,9 @@
Introduction
============
-This package was created to have barcodes available without having
-PIL_ (Python Imaging Library) installed. As of version 0.4b1 PIL
-is also supported for creating barcodes.
+This package was created to have barcodes available with pure-python.
+Pillow_ is required for exporting for exporting images (png, jpg), although not
+for SVGs.
All you need to create a barcode is to know the system (EAN, UPC, ...)
and the code (e.g. for EAN-13: 123456789102). As you see, you do not
@@ -13,7 +13,7 @@
As of version 0.7beta3 Python 3 is supported, but not well tested.
-.. _PIL: http://www.pythonware.com/products/pil
+.. _Pillow: https://python-pillow.org/
Creating barcodes as SVG
------------------------
@@ -27,14 +27,14 @@
>>> ean = barcode.get('ean13', '123456789102')
# Now we look if the checksum was added
>>> ean.get_fullcode()
- u'1234567891026'
+ '1234567891026'
>>> filename = ean.save('ean13')
>>> filename
- u'ean13.svg'
+ 'ean13.svg'
>>> options = dict(compress=True)
>>> filename = ean.save('ean13', options)
>>> filename
- u'ean13.svgz'
+ 'ean13.svgz'
Now you have ean13.svg and the compressed ean13.svgz in your current
working directory. Open it and see the result.
@@ -55,4 +55,4 @@
>>> ean = barcode.get('ean13', '123456789102', writer=ImageWriter())
>>> filename = ean.save('ean13')
>>> filename
- u'ean13.png'
+ 'ean13.png'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/docs/conf.py
new/python-barcode-0.10.0/docs/conf.py
--- old/python-barcode-0.9.0/docs/conf.py 2018-06-14 18:49:51.000000000
+0200
+++ new/python-barcode-0.10.0/docs/conf.py 2019-05-24 10:41:57.000000000
+0200
@@ -176,8 +176,8 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
[howto/manual]).
latex_documents = [
- ('index', 'pyBarcode.tex', u'pyBarcode Documentation',
- u'Thorsten Weimann', 'manual'),
+ ('index', 'pyBarcode.tex', 'pyBarcode Documentation',
+ 'Thorsten Weimann', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/docs/writers/image.rst
new/python-barcode-0.10.0/docs/writers/image.rst
--- old/python-barcode-0.9.0/docs/writers/image.rst 2018-06-14
18:49:51.000000000 +0200
+++ new/python-barcode-0.10.0/docs/writers/image.rst 2019-05-24
10:41:57.000000000 +0200
@@ -3,7 +3,7 @@
.. versionadded:: 0.4b1
-Creates barcodes as image. All imagetypes supported by PIL are availble.
+Creates barcodes as image. All imagetypes supported by Pillow are availble.
Special Options
---------------
@@ -15,7 +15,7 @@
~~~~~~~~~~~~~~~~
:format:
- The image file format as *string*. All formats supported by PIL are
+ The image file format as *string*. All formats supported by Pillow are
valid (e.g. PNG, JPEG, BMP, ...).
Defaults to **PNG**.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-barcode-0.9.0/python_barcode.egg-info/PKG-INFO
new/python-barcode-0.10.0/python_barcode.egg-info/PKG-INFO
--- old/python-barcode-0.9.0/python_barcode.egg-info/PKG-INFO 2018-06-14
18:50:08.000000000 +0200
+++ new/python-barcode-0.10.0/python_barcode.egg-info/PKG-INFO 2019-05-24
10:42:11.000000000 +0200
@@ -1,22 +1,33 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: python-barcode
-Version: 0.9.0
-Summary: Create standard barcodes with Python. No external modules needed
(optional PIL support included).
+Version: 0.10.0
+Summary: Create standard barcodes with Python. No external modules needed.
(optional Pillow support included).
Home-page: https://github.com/WhyNotHugo/python-barcode
Author: Thorsten Weimann et al
Author-email: [email protected]
License: MIT
-Description-Content-Type: UNKNOWN
Description: python-barcode
==============
- .. image:: example-ean13.png
- :target: https://github.com/WhyNotHugo/python-barcode
- :alt: python-barcode
+ .. image::
https://travis-ci.org/WhyNotHugo/python-barcode.svg?branch=master
+ :target: https://travis-ci.org/WhyNotHugo/python-barcode
+ :alt: build status
+
+ .. image:: https://img.shields.io/pypi/v/python-barcode.svg
+ :target: https://pypi.python.org/pypi/python-barcode
+ :alt: version on pypi
+
+ .. image:: https://img.shields.io/pypi/l/python-barcode.svg
+ :target:
https://github.com/WhyNotHugo/python-barcode/blob/master/LICENCE
+ :alt: licence
This library provides a simple way to create barcodes using only the
Python standard lib. The barcodes are created as SVG objects.
+ .. image:: example-ean13.png
+ :target: https://github.com/WhyNotHugo/python-barcode
+ :alt: python-barcode
+
Please report any bugs at
https://github.com/WhyNotHugo/python-barcode/issues
@@ -26,7 +37,7 @@
- Setuptools/distribute for installation.
- Python 3.5 or above
- Program to open SVG objects (your browser should do it)
- - Optional: PIL to render barcodes as images (PNG, JPG, ...)
+ - Optional: Pillow to render barcodes as images (PNG, JPG, ...)
Installation
@@ -67,37 +78,37 @@
>>> import barcode
>>> barcode.PROVIDED_BARCODES
- [u'code39', u'code128', u'ean', u'ean13', u'ean8', u'gs1', u'gtin',
- u'isbn', u'isbn10', u'isbn13', u'issn', u'jan', u'pzn', u'upc',
u'upca']
+ ['code39', 'code128', 'ean', 'ean13', 'ean8', 'gs1', 'gtin',
+ 'isbn', 'isbn10', 'isbn13', 'issn', 'jan', 'pzn', 'upc', 'upca']
>>> EAN = barcode.get_barcode_class('ean13')
>>> EAN
<class 'barcode.ean.EuropeanArticleNumber13'>
- >>> ean = EAN(u'5901234123457')
+ >>> ean = EAN('5901234123457')
>>> ean
<barcode.ean.EuropeanArticleNumber13 object at 0x00BE98F0>
>>> fullname = ean.save('ean13_barcode')
>>> fullname
- u'ean13_barcode.svg'
+ 'ean13_barcode.svg'
# Example with PNG
>>> from barcode.writer import ImageWriter
- >>> ean = EAN(u'5901234123457', writer=ImageWriter())
+ >>> ean = EAN('5901234123457', writer=ImageWriter())
>>> fullname = ean.save('ean13_barcode')
- u'ean13_barcode.png'
+ 'ean13_barcode.png'
# New in v0.4.2
>>> from StringIO import StringIO
>>> fp = StringIO()
>>> ean.write(fp)
# or
>>> f = open('/my/new/file', 'wb')
- >>> ean.write(f) # PIL (ImageWriter) produces RAW format here
+ >>> ean.write(f) # Pillow (ImageWriter) produces RAW format here
# New in v0.5.0
>>> from barcode import generate
- >>> name = generate('EAN13', u'5901234123457',
output='barcode_svg')
+ >>> name = generate('EAN13', '5901234123457', output='barcode_svg')
>>> name
- u'barcode_svg.svg'
+ 'barcode_svg.svg'
# with file like object
>>> fp = StringIO()
- >>> generate('EAN13', u'5901234123457', writer=ImageWriter(),
output=fp)
+ >>> generate('EAN13', '5901234123457', writer=ImageWriter(),
output=fp)
>>>
Now open ean13_barcode.[svg|png] in a graphic app or simply in your
browser
@@ -105,16 +116,29 @@
Commandline::
- $ pybarcode create "My Text" outfile
+ $ python-barcode create "My Text" outfile
New barcode saved as outfile.svg.
- $ pybarcode create -t png "My Text" outfile
+ $ python-barcode create -t png "My Text" outfile
New barcode saved as outfile.png.
- Try `pybarcode -h` for help.
+ Try `python-barcode -h` for help.
Changelog
---------
+ v0.9.1
+ ~~~~~~
+
+ * Officially support Python 3.7
+ * Refer to Pillow in the docs, rather than PIL.
+
+ v0.9.0
+ ~~~~~~
+
+ * Removed buggy ``Barcode.raw`` attribute.
+ * Various CLI errors ironed out.
+ * Make the default value for ``writer_options``` consistent across
writers.
+
v0.8.3
~~~~~~
@@ -228,5 +252,7 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Provides-Extra: images
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/setup.py
new/python-barcode-0.10.0/setup.py
--- old/python-barcode-0.9.0/setup.py 2018-06-14 18:49:51.000000000 +0200
+++ new/python-barcode-0.10.0/setup.py 2019-05-24 10:41:57.000000000 +0200
@@ -12,8 +12,8 @@
author='Thorsten Weimann et al',
author_email='[email protected]',
description=(
- 'Create standard barcodes with Python. No external modules needed '
- '(optional PIL support included).'
+ 'Create standard barcodes with Python. No external modules needed. '
+ '(optional Pillow support included).'
),
long_description=Path('README.rst').read_text(),
classifiers=[
@@ -26,6 +26,7 @@
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
'Topic :: Multimedia :: Graphics',
'Topic :: Software Development :: Libraries :: Python Modules',
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-barcode-0.9.0/test.py
new/python-barcode-0.10.0/test.py
--- old/python-barcode-0.9.0/test.py 2018-06-14 18:49:51.000000000 +0200
+++ new/python-barcode-0.10.0/test.py 2019-05-24 10:41:57.000000000 +0200
@@ -45,7 +45,7 @@
IMAGES = ('<h3>As PNG-Image</h3><br>\n'
'<img src="{filename}" alt="PNG {name}"></p>\n')
-NO_PIL = '<h3>PIL was not found. No PNG-Image created.</h3></p>\n'
+NO_PIL = '<h3>Pillow was not found. No PNG-Image created.</h3></p>\n'
TESTCODES = (
('ean8', '40267708'),
@@ -149,6 +149,10 @@
isbn = get_barcode('isbn13', '978376926085')
self.assertEqual('9783769260854', isbn.get_fullcode())
+ def test_gs1_128(self):
+ gs1_128 = get_barcode('gs1_128', '00376401856400470087')
+ self.assertEqual('00376401856400470087', gs1_128.get_fullcode())
+
if __name__ == '__main__':
test()