diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d7d62da..f3cd342 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ on: branches: - main pull_request: - branches: + branches: - main jobs: diff --git a/README.md b/README.md index 7802a82..93d83f9 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit] [![Ruff codestyle][ruff badge]][ruff project] - [pypi status]: https://pypi.org/project/pybuild-deps/ [tests]: https://github.com/bruno-fs/pybuild-deps/actions?workflow=Tests [codecov]: https://app.codecov.io/gh/bruno-fs/pybuild-deps @@ -20,6 +19,7 @@ [black]: https://github.com/psf/black [ruff badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json [ruff project]: https://github.com/charliermarsh/ruff + tools that can pin dependencies like `pip-tools` and `poetry`. For users relying exclusively on python wheels, those tools are more than enough. However, for users building applications from source, finding and pinning build dependencies diff --git a/noxfile.py b/noxfile.py index ef48782..067d80c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -11,8 +11,7 @@ try: - from nox_poetry import Session - from nox_poetry import session + from nox_poetry import Session, session except ImportError: message = f"""\ Nox failed to import the 'nox-poetry' package. diff --git a/src/pybuild_deps/constants.py b/src/pybuild_deps/constants.py index d9a1e35..d1f8bcd 100644 --- a/src/pybuild_deps/constants.py +++ b/src/pybuild_deps/constants.py @@ -2,5 +2,6 @@ from xdg import xdg_cache_home + CACHE_PATH = xdg_cache_home() / "pybuild-deps" PIP_CACHE_DIR = CACHE_PATH / "pip" diff --git a/src/pybuild_deps/logger.py b/src/pybuild_deps/logger.py index 5b99ac3..b3e5d9d 100644 --- a/src/pybuild_deps/logger.py +++ b/src/pybuild_deps/logger.py @@ -10,6 +10,7 @@ import click from piptools.logging import log as piptools_logger + logging.basicConfig() _logger = logging.getLogger("pybuild-deps") diff --git a/src/pybuild_deps/parsers/__init__.py b/src/pybuild_deps/parsers/__init__.py index 88b8b00..6cba068 100644 --- a/src/pybuild_deps/parsers/__init__.py +++ b/src/pybuild_deps/parsers/__init__.py @@ -2,6 +2,7 @@ from configparser import ConfigParser + try: import tomllib as toml except ImportError: diff --git a/src/pybuild_deps/scripts/compile.py b/src/pybuild_deps/scripts/compile.py index 2cd7041..b526962 100644 --- a/src/pybuild_deps/scripts/compile.py +++ b/src/pybuild_deps/scripts/compile.py @@ -26,6 +26,7 @@ from pybuild_deps.logger import log from pybuild_deps.parsers import parse_requirements + REQUIREMENTS_TXT = "requirements.txt" diff --git a/tests/test_parsers/test_pyproject_toml.py b/tests/test_parsers/test_pyproject_toml.py index 7770392..249a8ad 100644 --- a/tests/test_parsers/test_pyproject_toml.py +++ b/tests/test_parsers/test_pyproject_toml.py @@ -6,6 +6,7 @@ from pybuild_deps.parsers import parse_pyproject_toml + EXAMPLE_TOML = """ [build-system] requires = [ diff --git a/tests/test_parsers/test_setup_cfg.py b/tests/test_parsers/test_setup_cfg.py index d690833..2c5263e 100644 --- a/tests/test_parsers/test_setup_cfg.py +++ b/tests/test_parsers/test_setup_cfg.py @@ -4,6 +4,7 @@ from pybuild_deps.parsers import parse_setup_cfg + EXAMPLE_CFG = """ [metadata] name = foo diff --git a/tests/test_parsers/test_setup_py.py b/tests/test_parsers/test_setup_py.py index 88de40b..0150183 100644 --- a/tests/test_parsers/test_setup_py.py +++ b/tests/test_parsers/test_setup_py.py @@ -4,6 +4,7 @@ from pybuild_deps.parsers import parse_setup_py + SIMPLE = """ from setuptools import setup