From 83930339ca23aa6ee44cee57e2b9700410624dbd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:24:55 +0000 Subject: [PATCH 1/5] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1) - [github.com/pycqa/pylint: v2.17.1 → v3.0.0](https://github.com/pycqa/pylint/compare/v2.17.1...v3.0.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f8e6226..d11db8c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.17.1 + rev: v3.0.0 hooks: - id: pylint name: lint (examples) From 0457a674fbb1369636ce88ae99e858056185d072 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Oct 2023 09:40:19 -0500 Subject: [PATCH 2/5] add empty tool.setuptools block for check_lib_packaging --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f3c35ae..59ee981 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,3 +4,4 @@ [tool.black] target-version = ['py35'] +[tool.setuptools] From ad4b93e430bf2aa1925fbce884560490a9a065a8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Oct 2023 09:44:05 -0500 Subject: [PATCH 3/5] try listing the package name here --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 59ee981..64763d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,3 +5,4 @@ [tool.black] target-version = ['py35'] [tool.setuptools] +packages=jepler_udecimal From 85a0e594f6efb1b86e54428c5d29c905374ff917 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Oct 2023 09:47:45 -0500 Subject: [PATCH 4/5] fix toml syntax --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64763d2..cddef0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,4 +5,4 @@ [tool.black] target-version = ['py35'] [tool.setuptools] -packages=jepler_udecimal +packages=['jepler_udecimal'] From 58389b892c403f2c3a26c26a09285ff8aea8ed9b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Oct 2023 10:38:59 -0500 Subject: [PATCH 5/5] switch to pyproject.toml packaging, thank you --- .gitignore | 1 + pyproject.toml | 45 ++++++++++++++++++++++++++++++++-- setup.py | 65 -------------------------------------------------- 3 files changed, 44 insertions(+), 67 deletions(-) delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index b6dc5d2..cb1ae01 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ docs/api circuitpython /*.exp /*.out +*/__version__.py diff --git a/pyproject.toml b/pyproject.toml index cddef0b..f0d30e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,48 @@ # # SPDX-License-Identifier: Unlicense -[tool.black] -target-version = ['py35'] +[build-system] +requires = [ + "setuptools", + "wheel", + "setuptools-scm", +] + +[project] +name = "circuitpython-jepler-udecimal" +description = "Reduced version of the decimal library for CircuitPython" +version = "0.0.0+auto.0" +readme = "README.rst" +authors = [ + {name = "Jeff Epler", email = "jepler@gmail.com"} +] +urls = { Source = "https://github.com/jepler/Jepler_CircuitPython_udecimal", Documentation = "https://jepler-udecimal.readthedocs.io/en/latest/api/jepler_udecimal/index.html", Tracker = "https://github.com/jepler/Jepler_CircuitPython_udecimal/issues" } +# "Pull Requests" = "https://github.com/jepler/Jepler_CircuitPython_udecimal/pulls", +keywords = [ + "adafruit", + "blinka", + "circuitpython", + "micropython", + "udecimal", + "numeric", + "helper", + "arbitraryprecision", + "math", +] +license = {text = "MIT"} +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Embedded Systems", + "Topic :: System :: Hardware", + "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Python Software Foundation License", + "Programming Language :: Python :: 3", +] +dynamic = ["dependencies", "optional-dependencies"] + + [tool.setuptools] packages=['jepler_udecimal'] +[tool.setuptools_scm] +write_to = "jepler_udecimal/__version__.py" diff --git a/setup.py b/setup.py deleted file mode 100644 index a8fbd90..0000000 --- a/setup.py +++ /dev/null @@ -1,65 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# SPDX-FileCopyrightText: Copyright (c) 2020 jepler for Unpythonic Networks -# -# SPDX-License-Identifier: MIT - -"""A setuptools based setup module. - -See: -https://packaging.python.org/en/latest/distributing.html -https://github.com/pypa/sampleproject -""" - -from setuptools import setup, find_packages - -# To use a consistent encoding -from codecs import open -from os import path - -here = path.abspath(path.dirname(__file__)) - -# Get the long description from the README file -with open(path.join(here, "README.rst"), encoding="utf-8") as f: - long_description = f.read() - -setup( - name="jepler-circuitpython-udecimal", - use_scm_version=True, - setup_requires=["setuptools_scm"], - description="Reduced version of the decimal library for CircuitPython", - long_description=long_description, - long_description_content_type="text/x-rst", - # The project's main homepage. - url="https://github.com/jepler/Jepler_CircuitPython_udecimal", - project_urls={ - "Source": "https://github.com/jepler/Jepler_CircuitPython_udecimal", - "Documentation": "https://jepler-udecimal.readthedocs.io/en/latest/api/jepler_udecimal/index.html", - "Tracker": "https://github.com/jepler/Jepler_CircuitPython_udecimal/issues", - "Pull Requests": "https://github.com/jepler/Jepler_CircuitPython_udecimal/pulls", - }, - # Author details - author="Jeff Epler", - author_email="jepler@gmail.com", - install_requires=[], - # Choose your license - license="MIT", - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries", - "License :: OSI Approved :: MIT License", - "License :: OSI Approved :: Python Software Foundation License ", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - ], - # What does your project relate to? - keywords="adafruit blinka circuitpython micropython udecimal numeric helper " - "arbitraryprecision math", - # You can just specify the packages manually here if your project is - # simple. Or you can use find_packages(). - packages=["jepler_udecimal"], -)