From c53aa8c5347d6366eff40ce4c17129666cc30bb3 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 14 Dec 2012 09:29:39 -0800 Subject: [PATCH 01/28] initial rattail v0.4 port (savepoint) --- rattail/hw/cognitive/labels.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rattail/hw/cognitive/labels.py b/rattail/hw/cognitive/labels.py index 1356e58..cc05e03 100644 --- a/rattail/hw/cognitive/labels.py +++ b/rattail/hw/cognitive/labels.py @@ -28,8 +28,7 @@ from cStringIO import StringIO -import edbob - +import rattail from rattail import labels @@ -55,7 +54,7 @@ class BlasterFormatter(labels.CommandFormatter): ] def label_footer_commands(self): - noindex = edbob.config.getboolean( + noindex = rattail.config.getboolean( 'rattail.hw.cognitive', 'blaster.hack_noindex', default=False) if noindex: return [ From 15cc17b577bec28a0a76413988adcd5fa50a37b2 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 15 Dec 2012 09:57:41 -0800 Subject: [PATCH 02/28] bump version --- rattail/hw/cognitive/_version.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rattail/hw/cognitive/_version.py b/rattail/hw/cognitive/_version.py index d9bd062..c83de13 100644 --- a/rattail/hw/cognitive/_version.py +++ b/rattail/hw/cognitive/_version.py @@ -1 +1 @@ -__version__ = '0.3a3' +__version__ = '0.4a1' diff --git a/setup.py b/setup.py index e7a95b7..ec08585 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ requires = [ # # package # low high - 'rattail>=0.3a6', # 0.3a7.dev + 'rattail>=0.4a1.dev', # 0.4a1.dev ] From cb06a405d1e3c5b0d629d4ed5b2cb5fcf5a6c863 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 9 May 2013 22:00:05 -0700 Subject: [PATCH 03/28] Removed `setup.cfg` file. The `tag_build` setting was not doing us any favors. --- rattail/hw/cognitive/_version.py | 2 +- setup.cfg | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 setup.cfg diff --git a/rattail/hw/cognitive/_version.py b/rattail/hw/cognitive/_version.py index d9bd062..bce943f 100644 --- a/rattail/hw/cognitive/_version.py +++ b/rattail/hw/cognitive/_version.py @@ -1 +1 @@ -__version__ = '0.3a3' +__version__ = '0.3a2' diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 018c3b4..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[egg_info] -tag_build = .dev From c4b042c9bef1dfba6190c053eea1296aa5b9efed Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 12 May 2013 08:28:03 -0700 Subject: [PATCH 04/28] Added initial Fabric script. --- fabfile.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 fabfile.py diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..cd8e41d --- /dev/null +++ b/fabfile.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +################################################################################ +# +# Rattail -- Retail Software Framework +# Copyright © 2010-2012 Lance Edgar +# +# This file is part of Rattail. +# +# Rattail is free software: you can redistribute it and/or modify it under the +# terms of the GNU Affero General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for +# more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Rattail. If not, see . +# +################################################################################ + +import os.path + +from fabric.api import * + + +execfile(os.path.join(os.path.dirname(__file__), 'rattail', 'hw', 'cognitive', '_version.py')) + + +@task +def release(): + """ + Release a new version of 'rattail.hw.cognitive'. + """ + + local("python setup.py egg_info --tag-build='' sdist --formats=gztar register upload") + + filename = 'rattail.hw.cognitive-{0}.tar.gz'.format(__version__) + + put(os.path.join('dist', filename), '/srv/pypi/{0}'.format(filename)) + with cd('/srv/pypi'): + run('rm --recursive --force simple') + run('compoze index') From b2fdbbc60d4a3c07548579481c6720feae09b478 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 12 May 2013 08:31:17 -0700 Subject: [PATCH 05/28] update changelog --- CHANGES.rst | 18 ++++++++++++++++++ CHANGES.txt | 10 ---------- MANIFEST.in | 1 + rattail/hw/cognitive/_version.py | 2 +- setup.py | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 CHANGES.rst delete mode 100644 CHANGES.txt diff --git a/CHANGES.rst b/CHANGES.rst new file mode 100644 index 0000000..bed2b3b --- /dev/null +++ b/CHANGES.rst @@ -0,0 +1,18 @@ + +0.3a3 +----- + +- [general] Fixed namespace package declaration. + +- [general] Added initial Fabric script. + + +0.3a2 +----- + +- Tweaked default label format. + +0.3a1 +----- + +- Initial port to Rattail v0.3. diff --git a/CHANGES.txt b/CHANGES.txt deleted file mode 100644 index 67cccaa..0000000 --- a/CHANGES.txt +++ /dev/null @@ -1,10 +0,0 @@ - -0.3a2 ------ - -- Tweaked default label format. - -0.3a1 ------ - -- Initial port to Rattail v0.3. diff --git a/MANIFEST.in b/MANIFEST.in index ab30e9a..3a6a904 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ include *.txt +include *.rst diff --git a/rattail/hw/cognitive/_version.py b/rattail/hw/cognitive/_version.py index bce943f..d9bd062 100644 --- a/rattail/hw/cognitive/_version.py +++ b/rattail/hw/cognitive/_version.py @@ -1 +1 @@ -__version__ = '0.3a2' +__version__ = '0.3a3' diff --git a/setup.py b/setup.py index e7a95b7..a00d5e4 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) execfile(os.path.join(here, 'rattail', 'hw', 'cognitive', '_version.py')) README = open(os.path.join(here, 'README.txt')).read() -CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() +CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ From 3d9292ef4cd3a9808ed7e1ed27550267e367da6d Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 22 May 2013 18:11:14 -0700 Subject: [PATCH 06/28] Tweaked Fabric `release` command. --- fabfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fabfile.py b/fabfile.py index cd8e41d..21ef7bc 100644 --- a/fabfile.py +++ b/fabfile.py @@ -23,6 +23,7 @@ ################################################################################ import os.path +import shutil from fabric.api import * @@ -36,7 +37,8 @@ def release(): Release a new version of 'rattail.hw.cognitive'. """ - local("python setup.py egg_info --tag-build='' sdist --formats=gztar register upload") + shutil.rmtree('rattail.egg-info') + local('python setup.py sdist --formats=gztar register upload') filename = 'rattail.hw.cognitive-{0}.tar.gz'.format(__version__) From 20e178336ae002fa433692d99abdc5442d0476cd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 16 Dec 2013 18:39:58 -0800 Subject: [PATCH 07/28] Tweaked Fabric `release` task. --- fabfile.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/fabfile.py b/fabfile.py index 21ef7bc..ba03912 100644 --- a/fabfile.py +++ b/fabfile.py @@ -22,27 +22,15 @@ # ################################################################################ -import os.path import shutil from fabric.api import * -execfile(os.path.join(os.path.dirname(__file__), 'rattail', 'hw', 'cognitive', '_version.py')) - - @task def release(): """ Release a new version of 'rattail.hw.cognitive'. """ - shutil.rmtree('rattail.egg-info') local('python setup.py sdist --formats=gztar register upload') - - filename = 'rattail.hw.cognitive-{0}.tar.gz'.format(__version__) - - put(os.path.join('dist', filename), '/srv/pypi/{0}'.format(filename)) - with cd('/srv/pypi'): - run('rm --recursive --force simple') - run('compoze index') From 416ee45304b18eb3219f56271d77add7feaf7ca5 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 29 Apr 2014 20:57:40 -0700 Subject: [PATCH 08/28] Refactor `rattail.hw.cognitive` -> `rattail_cognitive`. --- .gitignore | 2 +- README.txt | 4 ++-- fabfile.py | 4 ++-- rattail/__init__.py | 1 - rattail/hw/__init__.py | 1 - {rattail/hw/cognitive => rattail_cognitive}/__init__.py | 4 ++-- {rattail/hw/cognitive => rattail_cognitive}/_version.py | 0 {rattail/hw/cognitive => rattail_cognitive}/labels.py | 2 +- setup.py | 5 ++--- 9 files changed, 10 insertions(+), 13 deletions(-) delete mode 100644 rattail/__init__.py delete mode 100644 rattail/hw/__init__.py rename {rattail/hw/cognitive => rattail_cognitive}/__init__.py (89%) rename {rattail/hw/cognitive => rattail_cognitive}/_version.py (100%) rename {rattail/hw/cognitive => rattail_cognitive}/labels.py (98%) diff --git a/.gitignore b/.gitignore index 6335027..2a099f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -rattail.hw.cognitive.egg-info +rattail_cognitive.egg-info diff --git a/README.txt b/README.txt index 49bc6cf..e32a41b 100644 --- a/README.txt +++ b/README.txt @@ -1,6 +1,6 @@ -rattail.hw.cognitive -==================== +rattail_cognitive +================= Rattail is a retail software framework based on `edbob `_, and released under the GNU Affero General Public License. diff --git a/fabfile.py b/fabfile.py index ba03912..3ba9b37 100644 --- a/fabfile.py +++ b/fabfile.py @@ -30,7 +30,7 @@ from fabric.api import * @task def release(): """ - Release a new version of 'rattail.hw.cognitive'. + Release a new version of 'rattail_cognitive'. """ - shutil.rmtree('rattail.egg-info') + shutil.rmtree('rattail_cognitive.egg-info') local('python setup.py sdist --formats=gztar register upload') diff --git a/rattail/__init__.py b/rattail/__init__.py deleted file mode 100644 index de40ea7..0000000 --- a/rattail/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/rattail/hw/__init__.py b/rattail/hw/__init__.py deleted file mode 100644 index de40ea7..0000000 --- a/rattail/hw/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/rattail/hw/cognitive/__init__.py b/rattail_cognitive/__init__.py similarity index 89% rename from rattail/hw/cognitive/__init__.py rename to rattail_cognitive/__init__.py index 61e63c5..c0c6321 100644 --- a/rattail/hw/cognitive/__init__.py +++ b/rattail_cognitive/__init__.py @@ -23,7 +23,7 @@ ################################################################################ """ -``rattail.hw.cognitive`` -- Cognitive Hardware Interfaces +Cognitive Hardware Interfaces """ -from rattail.hw.cognitive._version import __version__ +from rattail_cognitive._version import __version__ diff --git a/rattail/hw/cognitive/_version.py b/rattail_cognitive/_version.py similarity index 100% rename from rattail/hw/cognitive/_version.py rename to rattail_cognitive/_version.py diff --git a/rattail/hw/cognitive/labels.py b/rattail_cognitive/labels.py similarity index 98% rename from rattail/hw/cognitive/labels.py rename to rattail_cognitive/labels.py index 1356e58..34e3abb 100644 --- a/rattail/hw/cognitive/labels.py +++ b/rattail_cognitive/labels.py @@ -23,7 +23,7 @@ ################################################################################ """ -``rattail.hw.cognitive.labels`` -- Label Printing +Label Printing """ from cStringIO import StringIO diff --git a/setup.py b/setup.py index a00d5e4..6aa2da6 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) -execfile(os.path.join(here, 'rattail', 'hw', 'cognitive', '_version.py')) +execfile(os.path.join(here, 'rattail_cognitive', '_version.py')) README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() @@ -67,7 +67,7 @@ requires = [ setup( - name = "rattail.hw.cognitive", + name = "rattail_cognitive", version = __version__, author = "Lance Edgar", author_email = "lance@edbob.org", @@ -96,7 +96,6 @@ setup( install_requires = requires, - namespace_packages = ['rattail', 'rattail.hw'], packages = find_packages(), include_package_data = True, zip_safe = False, From a37c0565ee67f585b79564be57e3dfec7fd3b4f5 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 29 Apr 2014 21:07:52 -0700 Subject: [PATCH 09/28] update changelog --- CHANGES.rst | 6 ++++++ rattail_cognitive/_version.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index bed2b3b..41f2949 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,10 @@ +0.3.1 +----- + +* Refactor ``rattail.hw.cognitive`` -> ``rattail_cognitive``. + + 0.3a3 ----- diff --git a/rattail_cognitive/_version.py b/rattail_cognitive/_version.py index d9bd062..e1424ed 100644 --- a/rattail_cognitive/_version.py +++ b/rattail_cognitive/_version.py @@ -1 +1 @@ -__version__ = '0.3a3' +__version__ = '0.3.1' From 8e74be71f91e5955daad472bed998294ee79062e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 11 May 2014 13:57:42 -0700 Subject: [PATCH 10/28] Fix broken barcode commands. UPC wasn't working, and EAN wasn't even being attempted... --- rattail_cognitive/labels.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/rattail_cognitive/labels.py b/rattail_cognitive/labels.py index 34e3abb..230cb94 100644 --- a/rattail_cognitive/labels.py +++ b/rattail_cognitive/labels.py @@ -78,9 +78,25 @@ class BlasterTwoUpFormatter(labels.TwoUpCommandFormatter, BlasterFormatter): half_offset = 120 def label_body_commands(self, product, x=0): - description = '%s %s' % (product.description, product.size) + + # Always remove check digit from UPC. + upc = unicode(product.upc)[:-1] + if len(upc) != 13: + raise ValueError(u"UPC format is unexpected: {0}".format(repr(product.upc))) + + # Create barcode command based on type of UPC. + if upc.startswith(u'00'): # UPC-A + barcode_type = u'UPCA+' + barcode = upc[2:] + elif upc.startswith(u'0'): # EAN-13 + barcode_type = u'EAN13+' + barcode = upc[1:] + else: + raise ValueError(u"UPC format is invalid: {0}".format(repr(product.upc))) + + description = u'{0} {1}'.format(product.description, product.size) return [ - 'STRING 5X7(1,1,1,1) %u 5 %s' % (x + 5, description[:17]), - 'STRING 5X7(1,1,1,1) %u 15 %s' % (x + 5, description[17:]), - 'BARCODE UPCA+ %u 75 25 %011u' % (x + 9, product.upc), + u'STRING 5X7(1,1,1,1) {0} 5 {1}'.format(x + 5, description[:17]), + u'STRING 5X7(1,1,1,1) {0} 15 {1}'.format(x + 5, description[17:]), + u'BARCODE {0} {1} 75 25 {2}'.format(barcode_type, x + 9, barcode), ] From 4c334049b4ec27112a366d13fb73e207514b352b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 11 May 2014 13:59:02 -0700 Subject: [PATCH 11/28] update changelog --- CHANGES.rst | 8 ++++++++ rattail_cognitive/_version.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 41f2949..c937e7f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,12 @@ +0.3.2 +----- + +* Fix broken barcode commands. + + UPC wasn't working, and EAN wasn't even being attempted... + + 0.3.1 ----- diff --git a/rattail_cognitive/_version.py b/rattail_cognitive/_version.py index e1424ed..73e3bb4 100644 --- a/rattail_cognitive/_version.py +++ b/rattail_cognitive/_version.py @@ -1 +1 @@ -__version__ = '0.3.1' +__version__ = '0.3.2' From 9bb5bf813cd90c6a5fef96277a4112da826a12f6 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 12 Jun 2014 22:09:36 -0700 Subject: [PATCH 12/28] Update project URL. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6aa2da6..9058336 100644 --- a/setup.py +++ b/setup.py @@ -71,7 +71,7 @@ setup( version = __version__, author = "Lance Edgar", author_email = "lance@edbob.org", - url = "http://rattail.edbob.org/", + url = "http://rattailproject.org/", license = "GNU Affero GPL v3", description = "Hardware Interfaces for Cognitive Devices", long_description = README + '\n\n' + CHANGES, From b178ac7c6e2d7fa24c1b8896e74361bce650258c Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 17 Aug 2015 12:37:53 -0500 Subject: [PATCH 13/28] Refactor some config usage per rattail changes. --- rattail_cognitive/labels.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/rattail_cognitive/labels.py b/rattail_cognitive/labels.py index 230cb94..87170f8 100644 --- a/rattail_cognitive/labels.py +++ b/rattail_cognitive/labels.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2012 Lance Edgar +# Copyright © 2010-2015 Lance Edgar # # This file is part of Rattail. # @@ -21,14 +20,13 @@ # along with Rattail. If not, see . # ################################################################################ - """ Label Printing """ -from cStringIO import StringIO +from __future__ import unicode_literals -import edbob +from cStringIO import StringIO from rattail import labels @@ -55,7 +53,7 @@ class BlasterFormatter(labels.CommandFormatter): ] def label_footer_commands(self): - noindex = edbob.config.getboolean( + noindex = self.config.getbool( 'rattail.hw.cognitive', 'blaster.hack_noindex', default=False) if noindex: return [ From 2baac60919a689392f2f28606a9483aedd479864 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 24 Aug 2015 19:26:21 -0500 Subject: [PATCH 14/28] Update changelog. --- CHANGES.rst | 7 +++++++ rattail_cognitive/_version.py | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index c937e7f..9b1ae8f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +.. -*- coding: utf-8 -*- + +0.3.3 +----- + +* Refactor some config usage per rattail changes. + 0.3.2 ----- diff --git a/rattail_cognitive/_version.py b/rattail_cognitive/_version.py index 73e3bb4..87c0828 100644 --- a/rattail_cognitive/_version.py +++ b/rattail_cognitive/_version.py @@ -1 +1,3 @@ -__version__ = '0.3.2' +# -*- coding: utf-8 -*- + +__version__ = u'0.3.3' From 4258d023a1b9db5259ed7f2a7ced1b0c7d9858f8 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 9 Oct 2016 19:53:19 -0500 Subject: [PATCH 15/28] Remove reference to 'edbob' package in README --- README.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index e32a41b..6168d36 100644 --- a/README.txt +++ b/README.txt @@ -1,12 +1,13 @@ -rattail_cognitive +rattail-cognitive ================= -Rattail is a retail software framework based on `edbob `_, -and released under the GNU Affero General Public License. +Rattail is a retail software framework, released under the GNU Affero General +Public License. -This package contains hardware interfaces for `Cognitive -`_ devices. +This package contains hardware interfaces for `Cognitive`_ devices. -Please see Rattail's `home page `_ for more -information. +Please see Rattail's `home page`_ for more information. + +.. _Cognitive: http://www.cognitive.com/ +.. _home page: https://rattailproject.org/ From 05de7710490b5a2d5e28290163e6f65d0e3d48b6 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 6 Jul 2017 16:28:07 -0500 Subject: [PATCH 16/28] Replace occurrence of `execfile()` --- setup.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 9058336..aa489c1 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +# -*- coding: utf-8; -*- ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2012 Lance Edgar +# Copyright © 2010-2017 Lance Edgar # # This file is part of Rattail. # @@ -28,7 +27,7 @@ from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) -execfile(os.path.join(here, 'rattail_cognitive', '_version.py')) +exec(open(os.path.join(here, 'rattail_cognitive', '_version.py')).read()) README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() From 32143a7e142de33be7240d53800d10b55eb18999 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 7 Jul 2017 10:19:56 -0500 Subject: [PATCH 17/28] Switch license to GPL v3 (no longer Affero) refs #2 --- COPYING.txt | 141 +++++++++++++++++++--------------- README.txt | 4 +- fabfile.py | 19 +++-- rattail_cognitive/__init__.py | 19 +++-- rattail_cognitive/labels.py | 18 ++--- setup.py | 18 ++--- 6 files changed, 115 insertions(+), 104 deletions(-) diff --git a/COPYING.txt b/COPYING.txt index dba13ed..94a9ed0 100644 --- a/COPYING.txt +++ b/COPYING.txt @@ -1,5 +1,5 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies @@ -7,15 +7,17 @@ Preamble - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. + The GNU General Public License is a free, copyleft license for +software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to +the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free -software for all its users. +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you @@ -24,34 +26,44 @@ them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. @@ -60,7 +72,7 @@ modification follow. 0. Definitions. - "This License" refers to version 3 of the GNU Affero General Public License. + "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. @@ -537,45 +549,35 @@ to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. + 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single +under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General +Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published +GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's +versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. @@ -633,29 +635,40 @@ the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by + it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. + GNU General Public License for more details. - You should have received a copy of the GNU Affero General Public License + You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see +For more information on this, and how to apply and follow the GNU GPL, see . + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.txt b/README.txt index 6168d36..f675812 100644 --- a/README.txt +++ b/README.txt @@ -2,8 +2,8 @@ rattail-cognitive ================= -Rattail is a retail software framework, released under the GNU Affero General -Public License. +Rattail is a retail software framework, released under the GNU General Public +License. This package contains hardware interfaces for `Cognitive`_ devices. diff --git a/fabfile.py b/fabfile.py index 3ba9b37..74ba601 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,24 +1,23 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +# -*- coding: utf-8; -*- ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2012 Lance Edgar +# Copyright © 2010-2017 Lance Edgar # # This file is part of Rattail. # # Rattail is free software: you can redistribute it and/or modify it under the -# terms of the GNU Affero General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. # # Rattail is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for -# more details. +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# You should have received a copy of the GNU Affero General Public License -# along with Rattail. If not, see . +# You should have received a copy of the GNU General Public License along with +# Rattail. If not, see . # ################################################################################ diff --git a/rattail_cognitive/__init__.py b/rattail_cognitive/__init__.py index c0c6321..bbf5b1e 100644 --- a/rattail_cognitive/__init__.py +++ b/rattail_cognitive/__init__.py @@ -1,24 +1,23 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +# -*- coding: utf-8;-*- ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2012 Lance Edgar +# Copyright © 2010-2017 Lance Edgar # # This file is part of Rattail. # # Rattail is free software: you can redistribute it and/or modify it under the -# terms of the GNU Affero General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. # # Rattail is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for -# more details. +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# You should have received a copy of the GNU Affero General Public License -# along with Rattail. If not, see . +# You should have received a copy of the GNU General Public License along with +# Rattail. If not, see . # ################################################################################ diff --git a/rattail_cognitive/labels.py b/rattail_cognitive/labels.py index 87170f8..942cfa3 100644 --- a/rattail_cognitive/labels.py +++ b/rattail_cognitive/labels.py @@ -1,23 +1,23 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8;-*- ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2015 Lance Edgar +# Copyright © 2010-2017 Lance Edgar # # This file is part of Rattail. # # Rattail is free software: you can redistribute it and/or modify it under the -# terms of the GNU Affero General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. # # Rattail is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for -# more details. +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# You should have received a copy of the GNU Affero General Public License -# along with Rattail. If not, see . +# You should have received a copy of the GNU General Public License along with +# Rattail. If not, see . # ################################################################################ """ diff --git a/setup.py b/setup.py index aa489c1..dc7ca42 100644 --- a/setup.py +++ b/setup.py @@ -7,17 +7,17 @@ # This file is part of Rattail. # # Rattail is free software: you can redistribute it and/or modify it under the -# terms of the GNU Affero General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. # # Rattail is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for -# more details. +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# You should have received a copy of the GNU Affero General Public License -# along with Rattail. If not, see . +# You should have received a copy of the GNU General Public License along with +# Rattail. If not, see . # ################################################################################ @@ -71,7 +71,7 @@ setup( author = "Lance Edgar", author_email = "lance@edbob.org", url = "http://rattailproject.org/", - license = "GNU Affero GPL v3", + license = "GNU GPL v3", description = "Hardware Interfaces for Cognitive Devices", long_description = README + '\n\n' + CHANGES, @@ -83,7 +83,7 @@ setup( 'Environment :: X11 Applications', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: GNU Affero General Public License v3', + 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', From 6a8ccbbceb65ea3d99c26a1121e7e158be28af7f Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 7 Jul 2017 10:21:32 -0500 Subject: [PATCH 18/28] Update changelog --- CHANGES.rst | 10 +++++++++- rattail_cognitive/_version.py | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9b1ae8f..960c748 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,4 +1,12 @@ -.. -*- coding: utf-8 -*- + +CHANGELOG +========= + +0.3.4 (2017-07-07) +------------------ + +* Switch license to GPL v3 (no longer Affero) + 0.3.3 ----- diff --git a/rattail_cognitive/_version.py b/rattail_cognitive/_version.py index 87c0828..70d2ced 100644 --- a/rattail_cognitive/_version.py +++ b/rattail_cognitive/_version.py @@ -1,3 +1,3 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8; -*- -__version__ = u'0.3.3' +__version__ = '0.3.4' From e089e9454b168411baaa49891c20bae9ec2b0dcd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 7 Jul 2017 10:26:40 -0500 Subject: [PATCH 19/28] Tweak release task per newer conventions --- fabfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fabfile.py b/fabfile.py index 74ba601..9693f81 100644 --- a/fabfile.py +++ b/fabfile.py @@ -32,4 +32,4 @@ def release(): Release a new version of 'rattail_cognitive'. """ shutil.rmtree('rattail_cognitive.egg-info') - local('python setup.py sdist --formats=gztar register upload') + local('python setup.py sdist --formats=gztar upload') From d2039ea05741d70130a52e9f2f3aafb146d56cf9 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 4 Dec 2018 18:53:47 -0600 Subject: [PATCH 20/28] Remove unused reference to `cStringIO` per python 3 effort --- rattail_cognitive/labels.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rattail_cognitive/labels.py b/rattail_cognitive/labels.py index 942cfa3..6fe992d 100644 --- a/rattail_cognitive/labels.py +++ b/rattail_cognitive/labels.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2018 Lance Edgar # # This file is part of Rattail. # @@ -24,9 +24,7 @@ Label Printing """ -from __future__ import unicode_literals - -from cStringIO import StringIO +from __future__ import unicode_literals, absolute_import from rattail import labels From 59ee5fa02a7ccb015690f8b3ca521524e44e2470 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 21 Jan 2019 17:28:35 -0600 Subject: [PATCH 21/28] Update changelog --- CHANGES.rst | 6 ++++++ rattail_cognitive/_version.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 960c748..f3f9aaf 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGELOG ========= +0.3.5 (2019-01-21) +------------------ + +* Remove unused reference to ``cStringIO``. + + 0.3.4 (2017-07-07) ------------------ diff --git a/rattail_cognitive/_version.py b/rattail_cognitive/_version.py index 70d2ced..6afd4d9 100644 --- a/rattail_cognitive/_version.py +++ b/rattail_cognitive/_version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8; -*- -__version__ = '0.3.4' +__version__ = '0.3.5' From 34c5762b5505343174c46e48b840b47e041c31d5 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 21 Jan 2019 17:29:34 -0600 Subject: [PATCH 22/28] Convert fabfile to tasks.py for invoke --- fabfile.py => tasks.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) rename fabfile.py => tasks.py (67%) diff --git a/fabfile.py b/tasks.py similarity index 67% rename from fabfile.py rename to tasks.py index 9693f81..b7945f5 100644 --- a/fabfile.py +++ b/tasks.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2019 Lance Edgar # # This file is part of Rattail. # @@ -20,16 +20,27 @@ # Rattail. If not, see . # ################################################################################ +""" +Tasks for rattail-cognitive +""" +from __future__ import unicode_literals, absolute_import + +import os import shutil -from fabric.api import * +from invoke import task + + +here = os.path.abspath(os.path.dirname(__file__)) +exec(open(os.path.join(here, 'rattail_cognitive', '_version.py')).read()) @task -def release(): +def release(ctx): """ - Release a new version of 'rattail_cognitive'. + Release a new version of `rattail`. """ shutil.rmtree('rattail_cognitive.egg-info') - local('python setup.py sdist --formats=gztar upload') + ctx.run('python setup.py sdist --formats=gztar') + ctx.run('twine upload dist/rattail_cognitive-{}.tar.gz'.format(__version__)) From c3b8c6379402ae1ef9f2f3dba9884409a3dd04c7 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 16 May 2023 14:20:02 -0500 Subject: [PATCH 23/28] Replace `setup.py` contents with `setup.cfg` --- setup.cfg | 36 +++++++++++++++++++++++++ setup.py | 80 +++---------------------------------------------------- 2 files changed, 39 insertions(+), 77 deletions(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..f6b62d3 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,36 @@ +# -*- coding: utf-8; -*- + +[metadata] +name = rattail_cognitive +version = attr: rattail_cognitive.__version__ +author = Lance Edgar +author_email = lance@edbob.org +url = http://rattailproject.org/ +license = GNU GPL v3 +description = Hardware Interfaces for Cognitive Devices +long_description = file: README.txt +classifiers = + Development Status :: 3 - Alpha + Environment :: Console + Environment :: Web Environment + Environment :: Win32 (MS Windows) + Environment :: X11 Applications + Intended Audience :: Developers + Intended Audience :: System Administrators + License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) + Natural Language :: English + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 2.6 + Programming Language :: Python :: 2.7 + Topic :: Office/Business + Topic :: Software Development :: Libraries :: Python Modules + + +[options] +install_requires = + rattail>=0.3a6 + +packages = find: +include_package_data = True +zip_safe = False diff --git a/setup.py b/setup.py index dc7ca42..9588a53 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2017 Lance Edgar +# Copyright © 2010-2023 Lance Edgar # # This file is part of Rattail. # @@ -22,80 +22,6 @@ ################################################################################ -import os.path -from setuptools import setup, find_packages +from setuptools import setup - -here = os.path.abspath(os.path.dirname(__file__)) -exec(open(os.path.join(here, 'rattail_cognitive', '_version.py')).read()) -README = open(os.path.join(here, 'README.txt')).read() -CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() - - -requires = [ - # - # Version numbers within comments below have specific meanings. - # Basically the 'low' value is a "soft low," and 'high' a "soft high." - # In other words: - # - # If either a 'low' or 'high' value exists, the primary point to be - # made about the value is that it represents the most current (stable) - # version available for the package (assuming typical public access - # methods) whenever this project was started and/or documented. - # Therefore: - # - # If a 'low' version is present, you should know that attempts to use - # versions of the package significantly older than the 'low' version - # may not yield happy results. (A "hard" high limit may or may not be - # indicated by a true version requirement.) - # - # Similarly, if a 'high' version is present, and especially if this - # project has laid dormant for a while, you may need to refactor a bit - # when attempting to support a more recent version of the package. (A - # "hard" low limit should be indicated by a true version requirement - # when a 'high' version is present.) - # - # In any case, developers and other users are encouraged to play - # outside the lines with regard to these soft limits. If bugs are - # encountered then they should be filed as such. - # - # package # low high - - 'rattail>=0.3a6', # 0.3a7.dev - ] - - -setup( - name = "rattail_cognitive", - version = __version__, - author = "Lance Edgar", - author_email = "lance@edbob.org", - url = "http://rattailproject.org/", - license = "GNU GPL v3", - description = "Hardware Interfaces for Cognitive Devices", - long_description = README + '\n\n' + CHANGES, - - classifiers = [ - 'Development Status :: 3 - Alpha', - 'Environment :: Console', - 'Environment :: Web Environment', - 'Environment :: Win32 (MS Windows)', - 'Environment :: X11 Applications', - 'Intended Audience :: Developers', - 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', - 'Topic :: Office/Business', - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - - install_requires = requires, - - packages = find_packages(), - include_package_data = True, - zip_safe = False, - ) +setup() From 871b037586a345e05568ef41d0353bab661df591 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 1 Jun 2023 14:19:58 -0500 Subject: [PATCH 24/28] Update changelog --- CHANGES.rst | 6 ++++++ rattail_cognitive/_version.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index f3f9aaf..ffa7858 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,12 @@ CHANGELOG ========= +0.3.6 (2023-06-01) +------------------ + +* Replace ``setup.py`` contents with ``setup.cfg``. + + 0.3.5 (2019-01-21) ------------------ diff --git a/rattail_cognitive/_version.py b/rattail_cognitive/_version.py index 6afd4d9..b3c1f94 100644 --- a/rattail_cognitive/_version.py +++ b/rattail_cognitive/_version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8; -*- -__version__ = '0.3.5' +__version__ = '0.3.6' From 38e9191a5a2579050873dd402f1da8db58e654ce Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 9 Jul 2024 15:39:26 -0500 Subject: [PATCH 25/28] feat: switch from setup.cfg to pyproject.toml + hatchling --- .gitignore | 3 +++ CHANGES.rst => CHANGELOG.md | 35 ++++++++++++---------------- pyproject.toml | 44 +++++++++++++++++++++++++++++++++++ rattail_cognitive/_version.py | 5 +++- setup.cfg | 36 ---------------------------- setup.py | 27 --------------------- 6 files changed, 66 insertions(+), 84 deletions(-) rename CHANGES.rst => CHANGELOG.md (58%) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 2a099f4..76a84da 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ +*~ +*.pyc +dist/ rattail_cognitive.egg-info diff --git a/CHANGES.rst b/CHANGELOG.md similarity index 58% rename from CHANGES.rst rename to CHANGELOG.md index ffa7858..bf305fd 100644 --- a/CHANGES.rst +++ b/CHANGELOG.md @@ -1,59 +1,54 @@ -CHANGELOG -========= +# Changelog +All notable changes to rattail_cognitive will be documented in this file. -0.3.6 (2023-06-01) ------------------- +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + + +## 0.3.6 (2023-06-01) * Replace ``setup.py`` contents with ``setup.cfg``. -0.3.5 (2019-01-21) ------------------- +## 0.3.5 (2019-01-21) * Remove unused reference to ``cStringIO``. -0.3.4 (2017-07-07) ------------------- +## 0.3.4 (2017-07-07) * Switch license to GPL v3 (no longer Affero) -0.3.3 ------ +## 0.3.3 * Refactor some config usage per rattail changes. -0.3.2 ------ +## 0.3.2 * Fix broken barcode commands. UPC wasn't working, and EAN wasn't even being attempted... -0.3.1 ------ +## 0.3.1 * Refactor ``rattail.hw.cognitive`` -> ``rattail_cognitive``. -0.3a3 ------ +## 0.3a3 - [general] Fixed namespace package declaration. - [general] Added initial Fabric script. -0.3a2 ------ +## 0.3a2 - Tweaked default label format. -0.3a1 ------ +## 0.3a1 - Initial port to Rattail v0.3. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..44140cb --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,44 @@ + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + + +[project] +name = "rattail_cognitive" +version = "0.3.6" +description = "Hardware Interfaces for Cognitive Devices" +readme = "README.txt" +authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] +license = {text = "GNU GPL v3+"} +classifiers = [ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Environment :: Web Environment", + "Environment :: Win32 (MS Windows)", + "Environment :: X11 Applications", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Office/Business", + "Topic :: Software Development :: Libraries :: Python Modules", +] +dependencies = [ + "rattail", +] + + +[project.urls] +Homepage = "https://rattailproject.org" +Repository = "https://kallithea.rattailproject.org/rattail-project-contrib/rattail-cognitive" +Changelog = "https://kallithea.rattailproject.org/rattail-project-contrib/rattail-cognitive/files/master/CHANGELOG.md" + + +[tool.commitizen] +version_provider = "pep621" +tag_format = "v$version" +update_changelog_on_bump = true diff --git a/rattail_cognitive/_version.py b/rattail_cognitive/_version.py index b3c1f94..3336373 100644 --- a/rattail_cognitive/_version.py +++ b/rattail_cognitive/_version.py @@ -1,3 +1,6 @@ # -*- coding: utf-8; -*- -__version__ = '0.3.6' +from importlib.metadata import version + + +__version__ = version('rattail_cognitive') diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index f6b62d3..0000000 --- a/setup.cfg +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8; -*- - -[metadata] -name = rattail_cognitive -version = attr: rattail_cognitive.__version__ -author = Lance Edgar -author_email = lance@edbob.org -url = http://rattailproject.org/ -license = GNU GPL v3 -description = Hardware Interfaces for Cognitive Devices -long_description = file: README.txt -classifiers = - Development Status :: 3 - Alpha - Environment :: Console - Environment :: Web Environment - Environment :: Win32 (MS Windows) - Environment :: X11 Applications - Intended Audience :: Developers - Intended Audience :: System Administrators - License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) - Natural Language :: English - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 2.6 - Programming Language :: Python :: 2.7 - Topic :: Office/Business - Topic :: Software Development :: Libraries :: Python Modules - - -[options] -install_requires = - rattail>=0.3a6 - -packages = find: -include_package_data = True -zip_safe = False diff --git a/setup.py b/setup.py deleted file mode 100644 index 9588a53..0000000 --- a/setup.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8; -*- -################################################################################ -# -# Rattail -- Retail Software Framework -# Copyright © 2010-2023 Lance Edgar -# -# This file is part of Rattail. -# -# Rattail is free software: you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation, either version 3 of the License, or (at your option) any later -# version. -# -# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# Rattail. If not, see . -# -################################################################################ - - -from setuptools import setup - -setup() From 3c3eb4b44205c6973ed537823a8848fc5f1c6b74 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 9 Jul 2024 15:39:36 -0500 Subject: [PATCH 26/28] =?UTF-8?q?bump:=20version=200.3.6=20=E2=86=92=200.4?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf305fd..928960f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v0.4.0 (2024-07-09) + +### Feat + +- switch from setup.cfg to pyproject.toml + hatchling + ## 0.3.6 (2023-06-01) * Replace ``setup.py`` contents with ``setup.cfg``. diff --git a/pyproject.toml b/pyproject.toml index 44140cb..cec10d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "rattail_cognitive" -version = "0.3.6" +version = "0.4.0" description = "Hardware Interfaces for Cognitive Devices" readme = "README.txt" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] From 8b4341a9f3dd6f15f38895ff634cbb41e4526f21 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 9 Jul 2024 15:41:59 -0500 Subject: [PATCH 27/28] build: update release task per latest conventions --- tasks.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tasks.py b/tasks.py index b7945f5..977854b 100644 --- a/tasks.py +++ b/tasks.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2019 Lance Edgar +# Copyright © 2010-2024 Lance Edgar # # This file is part of Rattail. # @@ -24,23 +24,22 @@ Tasks for rattail-cognitive """ -from __future__ import unicode_literals, absolute_import - import os import shutil from invoke import task -here = os.path.abspath(os.path.dirname(__file__)) -exec(open(os.path.join(here, 'rattail_cognitive', '_version.py')).read()) - - @task -def release(ctx): +def release(c): """ Release a new version of `rattail`. """ - shutil.rmtree('rattail_cognitive.egg-info') - ctx.run('python setup.py sdist --formats=gztar') - ctx.run('twine upload dist/rattail_cognitive-{}.tar.gz'.format(__version__)) + if os.path.exists('rattail_cognitive.egg-info'): + shutil.rmtree('rattail_cognitive.egg-info') + if os.path.exists('dist'): + shutil.rmtree('dist') + + c.run('python -m build --sdist') + + c.run('twine upload dist/*') From 4356d20652cc388f5f85e57b5e49034ef73f9bdf Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 13 Sep 2024 19:31:09 -0500 Subject: [PATCH 28/28] docs: use markdown for readme file --- README.md | 11 +++++++++++ README.txt | 13 ------------- pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 README.md delete mode 100644 README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..5648c9d --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ + +# rattail-cognitive + +Rattail is a retail software framework, released under the GNU General Public +License. + +This package contains hardware interfaces for +[Cognitive](http://www.cognitive.com/) devices. + +Please see Rattail's [home page](https://rattailproject.org/) for more +information. diff --git a/README.txt b/README.txt deleted file mode 100644 index f675812..0000000 --- a/README.txt +++ /dev/null @@ -1,13 +0,0 @@ - -rattail-cognitive -================= - -Rattail is a retail software framework, released under the GNU General Public -License. - -This package contains hardware interfaces for `Cognitive`_ devices. - -Please see Rattail's `home page`_ for more information. - -.. _Cognitive: http://www.cognitive.com/ -.. _home page: https://rattailproject.org/ diff --git a/pyproject.toml b/pyproject.toml index cec10d3..0742c23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "hatchling.build" name = "rattail_cognitive" version = "0.4.0" description = "Hardware Interfaces for Cognitive Devices" -readme = "README.txt" +readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] license = {text = "GNU GPL v3+"} classifiers = [