#2187·pip-tools

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

Author: takuminakasoCreated Jun 13, 2025Updated Jul 30, 2026
Labelsenhancement

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.

bash
pip-sync requirements_lock.txt

Actual result

The behavior is actually equivalent to the following command.

bash
pip-sync requirements.txt

My suggetion

The following fix will result in the expected behavior.

https://github.com/jazzband/pip-tools/compare/e4ed0c1e028d1ca73673a51722ba153f0c02b0c6...takuminakaso:pip-tools:ba97901e4b31731259f9da1d2a8bddcd527adcae