Skip to content

Commit

Permalink
add req lists
Browse files Browse the repository at this point in the history
  • Loading branch information
budzianowski committed Dec 9, 2024
1 parent bddfe13 commit 9909832
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions krec/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
black
isort
ruff
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9909832

Please sign in to comment.