Merge pull request #3536 from davidhewitt/maturin-build-args

examples: remove requirements-dev.txt files
This commit is contained in:
David Hewitt 2023-10-29 13:27:15 +00:00 committed by GitHub
commit 7a2c63da76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 56 additions and 54 deletions

View File

@ -5,3 +5,6 @@ build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -2,8 +2,7 @@ import nox
@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
def python(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")

View File

@ -14,3 +14,6 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
]
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -1,3 +0,0 @@
pytest>=3.5.0
pip>=21.3
maturin>=0.12,<0.13

View File

@ -5,3 +5,6 @@ build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -2,8 +2,7 @@ import nox
@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
def python(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")

View File

@ -14,3 +14,6 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
]
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -1,3 +0,0 @@
pytest>=3.5.0
pip>=21.3
maturin>=1,<2

View File

@ -5,3 +5,6 @@ build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -3,7 +3,6 @@ import nox
@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")

View File

@ -14,3 +14,6 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
]
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -1,3 +0,0 @@
pytest>=3.5.0
pip>=21.3
maturin>=0.12,<0.13

View File

@ -3,7 +3,6 @@ import nox
@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop", "--features", "extension-module")
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")

View File

@ -10,3 +10,6 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -1,3 +0,0 @@
pytest>=3.5.0
pip>=21.3
maturin>=0.14

View File

@ -2,7 +2,7 @@ import nox
@nox.session
def python(session):
def python(session: nox.Session):
session.install("-rrequirements-dev.txt")
session.run_always(
"pip", "install", "-e", ".", "--no-build-isolation", env={"BUILD_DEBUG": "1"}

View File

@ -5,3 +5,6 @@ build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -2,8 +2,7 @@ import nox
@nox.session
def python(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
def python(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")

View File

@ -3,7 +3,7 @@ requires = ["maturin>=1,<2"]
build-backend = "maturin"
[project]
name = "string sum"
name = "string_sum"
version = "0.1.0"
classifiers = [
"License :: OSI Approved :: MIT License",
@ -14,3 +14,6 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
]
[project.optional-dependencies]
dev = ["pytest"]

View File

@ -1,3 +0,0 @@
pytest>=3.5.0
pip>=21.3
maturin>=0.12,<0.13

View File

@ -1,3 +1,4 @@
variable::set("PYO3_VERSION", "0.20.0");
file::rename(".template/Cargo.toml", "Cargo.toml");
file::rename(".template/pyproject.toml", "pyproject.toml");
file::delete(".template");

View File

@ -1,9 +1,13 @@
[build-system]
requires = ["setuptools>=41.0.0", "wheel", "setuptools_rust>=1.0.0"]
requires = ["maturin>=1,<2"]
build-backend = "maturin"
[project]
name = "{{project-name}}"
version = "0.1.0"
[project.optional-dependencies]
dev = ["pytest"]
[tool.pytest.ini_options]
addopts = "--benchmark-disable"

View File

@ -1,9 +0,0 @@
[metadata]
name = {{project-name}}
version = 0.1.0
packages =
word_count
[options]
include_package_data = True
zip_safe = False

View File

@ -4,15 +4,14 @@ nox.options.sessions = ["test"]
@nox.session
def test(session):
session.install("-rrequirements-dev.txt")
session.install("maturin")
session.run_always("maturin", "develop")
def test(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest")
@nox.session
def bench(session):
session.install("-rrequirements-dev.txt")
session.install(".")
def bench(session: nox.Session):
session.env["MATURIN_PEP517_ARGS"] = "--profile=dev"
session.install(".[dev]")
session.run("pytest", "--benchmark-enable")

View File

@ -15,6 +15,8 @@ classifiers = [
"Operating System :: MacOS :: MacOS X",
]
[project.optional-dependencies]
dev = ["pytest", "pytest-benchmark"]
[tool.pytest.ini_options]
addopts = "--benchmark-disable"

View File

@ -1,2 +0,0 @@
pytest>=3.5.0
pytest-benchmark>=3.1.1