From e089e9454b168411baaa49891c20bae9ec2b0dcd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 7 Jul 2017 10:26:40 -0500 Subject: [PATCH 01/10] 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 02/10] 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 03/10] 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 04/10] 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 05/10] 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 06/10] 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 07/10] 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 08/10] =?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 09/10] 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 10/10] 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 = [