From 99098321a9a1bc7e676da17ed02f6e2b5de78ddf Mon Sep 17 00:00:00 2001 From: budzianowski Date: Mon, 9 Dec 2024 00:49:37 -0800 Subject: [PATCH] add req lists --- krec/requirements-dev.txt | 3 +++ setup.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 krec/requirements-dev.txt diff --git a/krec/requirements-dev.txt b/krec/requirements-dev.txt new file mode 100644 index 0000000..7c04991 --- /dev/null +++ b/krec/requirements-dev.txt @@ -0,0 +1,3 @@ +black +isort +ruff diff --git a/setup.py b/setup.py index 1f81654..8ba3846 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,7 @@ import re import shutil import subprocess +from typing import List from setuptools import find_packages, setup from setuptools.command.build_ext import build_ext @@ -15,12 +16,14 @@ with open("README.md", "r", encoding="utf-8") as f: long_description: str = f.read() - with open("Cargo.toml", "r", encoding="utf-8") as fh: version_re = re.search(r"^version = \"([^\"]*)\"", fh.read(), re.MULTILINE) assert version_re is not None, "Could not find version in Cargo.toml" version: str = version_re.group(1) +with open("krec/requirements-dev.txt", "r", encoding="utf-8") as f: + requirements_dev: List[str] = f.read().splitlines() + class RustBuildExt(build_ext): def run(self) -> None: @@ -66,6 +69,7 @@ def run(self) -> None: python_requires=">=3.8", include_package_data=True, packages=find_packages(include=["krec"]), + tests_require=requirements_dev, cmdclass={ "build_ext": RustBuildExt, "build_py": CustomBuild,