0

Python version: 3.12 pip-tools: 7.4.1

Project structure

/projectdir
------requirements/
------------requirements.in
------------requirements.txt
------------requirements-dev.in
------------requirements-dev.txt
------Makefile

Contents of requirements-dev.in

-r requirements.in
localstack
*******
*******

Makefile command:

pip-compile --no-emit-index-url requirements/requirements-dev.in --upgrade --resolver=backtracking --no-strip-extras

generated content of requirements-dev.txt

#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
#    pip-compile --no-emit-index-url requirements/requirements-dev.in
#
annotated-types==0.7.0
    # via pydantic
attrs==25.3.0
    # via
    #   jsonschema
    #   referencing
aws-lambda-powertools==3.16.0
    # via
    #   -r /Users/abhkumar/repo/pegasus-fulfill-ingest/requirements/requirements.in
    #   ewflib

As you can see, under aws-lambda-powertools,

-r /Users/abhkumar/repo/pegasus-fulfill-ingest/requirements/requirements.in

I was expecting that it will print only

-r requirements.in

I have tried all possible options, but cant get it working, please help

3
  • 1
    try pip-compile --no-emit-index-url -c requirements/requirements-dev.in --upgrade --resolver=backtracking --no-strip-extras Commented Jul 7 at 5:55
  • 4
    This doesn't look like it has anything to do with make or makefiles. Please check whether you can reproduce the issue by executing the troublesome command directly from a shell prompt. If so, then remove the [makefile] tag. If not, then add a minimal but complete makefile with which the issue can be reproduced. Commented Jul 7 at 13:42
  • Additionally, the line you are talking about appears to be a comment. It should be safe to remove. Or, based on the docs, I think you could avoid the comment being generated at all by passing the --no-annotate option to pip-compile. That's not quite what you asked for, but perhaps it would serve the same purpose. Commented Jul 8 at 13:32

1 Answer 1

1

The annotations are normalized in the latest releases. Use pip-tools >= 7.5.0. The paths are now relative if you use relative CLI arguments, and absolute if you don't. https://pip-tools.rtfd.io/en/stable/changelog/#v7-5-0

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.