Skip to content

Specifying src_files for pip-sync in pyproject.toml is ignored. #2187

Open
@takuminakaso

Description

@takuminakaso

Environment Versions

  1. OS Type: Ubuntu 24.04.2 LTS
  2. Python version: Python 3.13.3
  3. pip version: pip 25.1.1
  4. pip-tools version: pip-compile, version 7.4.1

Steps to replicate

Specifying src_files for pip-sync in pyproject.toml as follows is ignored and always synchronizes with requirements.txt.

[tool.pip-tools.sync]
src_files = ['requirements_lock.txt']

And the following error occurs.

 $ pip-sync
No requirement files given and no requirements.txt found in the current directory

Expected result

Expect the same behavior as the following command.

pip-sync requirements_lock.txt

Actual result

The behavior is actually equivalent to the following command.

pip-sync requirements.txt

My suggetion

The following fix will result in the expected behavior.

e4ed0c1...takuminakaso:pip-tools:ba97901e4b31731259f9da1d2a8bddcd527adcae

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions