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/.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) diff --git a/pyproject.toml b/pyproject.toml index f3c35ae..f0d30e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +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"], -)