Skip to content

Commit

Permalink
Incremental updates to packaging metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavella committed Aug 30, 2023
1 parent c01fd47 commit 77f3cd7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "codemodder-python"
version = "0.57.0"
requires-python = ">=3.9.0"
readme = "README.md"
license = {file = "LICENSE"}
dependencies = [
"semgrep~=1.36.0",
"PyYAML~=6.0.0",
"libcst~=1.0.0",
"dependency-manager @ git+https://github.com/pixee/python-dependency-manager#egg=dependency-manager",
]

[project.scripts]
codemodder = "codemodder.__main__:run"

[tool.setuptools]

[tool.setuptools.package-data]
"codemodder.codemods.semgrep" = ["**/codemodder/codemods/semgrep/**.yaml"]
8 changes: 0 additions & 8 deletions setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion src/codemodder/semgrep.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import subprocess
import itertools
import yaml
from importlib.resources import files
from tempfile import NamedTemporaryFile
from typing import List
from pathlib import Path
from codemodder import global_state
from codemodder.sarifs import results_by_path_and_rule_id
from codemodder.logging import logger

YAML_FILES_DIR = Path("codemodder") / "codemods" / "semgrep"
YAML_FILES_DIR = files("codemodder.codemods.semgrep")


def run_on_directory(yaml_files: List[Path], directory: Path):
Expand Down

0 comments on commit 77f3cd7

Please sign in to comment.