diff --git a/.gitignore b/.gitignore index df4d06b..34f3844 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,6 @@ tcl /.tox/ /.ruff_cache/ .env + +# Lock files from uv, pixi, pipenv, etc. +*.lock diff --git a/MANIFEST.in b/MANIFEST.in index 0f19707..524b815 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,7 +9,6 @@ include *.toml include *.yml include *.rst include *.png -include setup.* include configure* include requirements* include .dockerignore diff --git a/configure b/configure index 6d317d4..f815b0e 100755 --- a/configure +++ b/configure @@ -29,7 +29,7 @@ CLI_ARGS=$1 # Requirement arguments passed to pip and used by default or with --dev. REQUIREMENTS="--editable . --constraint requirements.txt" -DEV_REQUIREMENTS="--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt" +DEV_REQUIREMENTS="--editable . --group dev --constraint requirements.txt --constraint requirements-dev.txt" # where we create a virtualenv VIRTUALENV_DIR=venv diff --git a/configure.bat b/configure.bat index 15ab701..9a7ac64 100755 --- a/configure.bat +++ b/configure.bat @@ -27,7 +27,7 @@ @rem # Requirement arguments passed to pip and used by default or with --dev. set "REQUIREMENTS=--editable . --constraint requirements.txt" -set "DEV_REQUIREMENTS=--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt" +set "DEV_REQUIREMENTS=--editable . --group dev --constraint requirements.txt --constraint requirements-dev.txt" @rem # where we create a virtualenv set "VIRTUALENV_DIR=venv" diff --git a/etc/scripts/README.rst b/etc/scripts/README.rst index 5e54a2c..e2eb491 100755 --- a/etc/scripts/README.rst +++ b/etc/scripts/README.rst @@ -72,8 +72,7 @@ gen_requirements_dev.py** --help for details. Note: this does NOT hash requirements for now. Note: Be aware that if you are using "conditional" requirements (e.g. only for -OS or Python versions) in setup.py/setp.cfg/requirements.txt as these are NOT -yet supported. +OS or Python versions) in pyproject.toml as these are NOT yet supported. Populate a thirdparty directory with wheels, sources, .ABOUT and license files diff --git a/pyproject.toml b/pyproject.toml index f106e69..2dfd19a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,84 @@ [build-system] -requires = ["setuptools >= 50", "wheel"] +requires = [ + "setuptools >= 77", +] build-backend = "setuptools.build_meta" +[project] +name = "license-expression" +authors = [ + {name = "nexB. Inc. and others", email = "info@aboutcode.org"}, +] +description = "comprehensive utility library to parse, compare, simplify and normalize license expressions (such as SPDX license expressions) using boolean logic" +readme = "README.rst" +keywords = [ + "open source", + "license expression", + "license", + "spdx", + "boolean", + "parse expression", + "normalize expression", + "compare expression", + "licence", +] +license = "Apache-2.0" +license-files = [ + "apache-2.0.LICENSE", + "NOTICE", + "AUTHORS.rst", + "CHANGELOG.rst", + "CODE_OF_CONDUCT.rst", + "README.rst", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development", + "Topic :: Utilities", +] +requires-python = ">=3.10" +dependencies = [ + "boolean.py >= 4.0", +] +version = "30.4.4" + +[project.urls] +Homepage = "https://github.com/aboutcode-org/license-expression" + +[dependency-groups] +tests = [ + "pytest >= 7.0.1", + "pytest-xdist >= 2", +] +lint = [ + "twine", + "ruff", +] +docs = [ + # do not use this as this triggers a bug + # in setuptools_scm:aboutcode-toolkit >= 6.0.0 + "doc8>=0.11.2", + "Sphinx>=5.0.2", + "sphinx-rtd-theme>=1.0.0", + "sphinxcontrib-apidoc >= 0.4.0", + "sphinx-reredirects >= 0.1.2", + "sphinx-autobuild", + "sphinx-rtd-dark-mode>=1.3.0", + "sphinx-copybutton", +] + +dev = [ + {include-group = "tests"}, + {include-group = "lint"}, + {include-group = "docs"}, +] + +[tool.setuptools.packages.find] +where = ["src"] + [tool.setuptools_scm] # this is used populated when creating a git archive # and when there is .git dir and/or there is no git installed diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3989bc2..0000000 --- a/setup.cfg +++ /dev/null @@ -1,74 +0,0 @@ -[metadata] -name = license-expression -version = 30.4.4 -license = Apache-2.0 - -# description must be on ONE line https://github.com/pypa/setuptools/issues/1390 -description = license-expression is a comprehensive utility library to parse, compare, simplify and normalize license expressions (such as SPDX license expressions) using boolean logic. -long_description = file:README.rst -long_description_content_type = text/x-rst -url = https://github.com/aboutcode-org/license-expression - -author = nexB. Inc. and others -author_email = info@aboutcode.org - -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Topic :: Software Development - Topic :: Utilities - -keywords = - open source - license expression - license - spdx - boolean - parse expression - normalize expression - compare expression - licence - -license_files = - apache-2.0.LICENSE - NOTICE - AUTHORS.rst - CHANGELOG.rst - CODE_OF_CONDUCT.rst - README.rst - -[options] -python_requires = >=3.10 - -package_dir = - =src -packages = find: -include_package_data = true -zip_safe = false - -install_requires = - boolean.py >= 4.0 - - -[options.packages.find] -where = src - - -[options.extras_require] -dev = - pytest >= 7.0.1 - pytest-xdist >= 2 - # do not use this as this triggers a bug - # in setuptools_scm:aboutcode-toolkit >= 6.0.0 - twine - ruff - Sphinx>=5.0.2 - sphinx-rtd-theme>=1.0.0 - sphinxcontrib-apidoc >= 0.4.0 - sphinx-reredirects >= 0.1.2 - doc8>=0.11.2 - sphinx-autobuild - sphinx-rtd-dark-mode>=1.3.0 - sphinx-copybutton diff --git a/setup.py b/setup.py deleted file mode 100644 index bac24a4..0000000 --- a/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python - -import setuptools - -if __name__ == "__main__": - setuptools.setup()