Drop requirements.txt

Move the project's dependencies into pyproject.toml so we can stop
declaring them as dynamic. This way, consumers can infer the list
from sdist package metadata rather than having to resolve it at
build-time when PBR injects the requirements.txt contents into the
package's install_requires.

Change-Id: Idcb73b589db50034a6c7608cbd3f8011070a81cb
This commit is contained in:
Jeremy Stanley 2025-01-07 15:47:22 +00:00
parent 5e3bf9940d
commit b8eb765c27
5 changed files with 10 additions and 18 deletions

View File

@ -32,10 +32,11 @@ testr arguments that are needed to nox. For example, you can run:
It is also possible to run the tests inside of a virtual environment
you have created, or it is possible that you have all of the dependencies
installed locally already. If you'd like to go this route, the requirements
are listed in requirements.txt and the requirements for testing are in
are listed in pyproject.toml and the requirements for testing are in
test-requirements.txt. Installing them via pip, for instance, is simply::
pip install -r requirements.txt -r test-requirements.txt
pip install -r test-requirements.txt
pip install -e .
In you go this route, you can interact with the testr command directly.
Running `testr run` will run the entire test suite. `testr run --parallel`

View File

@ -17,7 +17,6 @@ def linters(session):
@nox.session(python="3")
def docs(session):
session.install("-r", "requirements.txt")
session.install("-r", "doc/requirements.txt")
session.install(".")
session.run(
@ -30,7 +29,6 @@ def docs(session):
@nox.session(python="3")
def venv(session):
session.install("-r", "requirements.txt")
session.install("-r", "test-requirements.txt")
session.install("-e", ".")
session.run(*session.posargs)
@ -39,7 +37,6 @@ def venv(session):
# This will attempt to run python3 tests by default.
@nox.session(python=["3"])
def tests(session):
session.install("-r", "requirements.txt")
session.install("-r", "test-requirements.txt")
session.install("-e", ".")
session.run("stestr", "run", *session.posargs)
@ -48,7 +45,6 @@ def tests(session):
@nox.session(python="3")
def cover(session):
session.install("-r", "requirements.txt")
session.install("-r", "test-requirements.txt")
session.install("-e", ".")
session.env["PYTHON"] = "coverage run --source bindep --parallel-mode"

View File

@ -4,13 +4,6 @@
vars:
bindep_profile: test
tasks:
- name: Install requirements
pip:
chdir: "{{ zuul_work_dir }}"
virtualenv: "{{ zuul_work_virtualenv }}"
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
requirements: requirements.txt
- name: Install the project from source
pip:
chdir: "{{ zuul_work_dir }}"

View File

@ -29,8 +29,14 @@ classifiers = [
"Topic :: System :: Archiving :: Packaging",
"Topic :: Utilities",
]
dependencies = [
"distro>=1.7",
"packaging",
"Parsley",
"pbr>=2",
]
description = "Binary dependency utility"
dynamic = ["dependencies", "version"]
dynamic = ["version"]
keywords = [
"binary",
"commandline",

View File

@ -1,4 +0,0 @@
distro>=1.7.0
pbr>=2.0.0 # Apache-2.0
Parsley
packaging