Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip-compile loses VCS egg name from setup.py #902

Closed
bo5o opened this issue Sep 20, 2019 · 4 comments
Closed

pip-compile loses VCS egg name from setup.py #902

bo5o opened this issue Sep 20, 2019 · 4 comments
Labels
bug Something is not working setuptools Related to compiling requirements form setup.py

Comments

@bo5o
Copy link

bo5o commented Sep 20, 2019

When using a simple layered dependency workflow (production->development requirements) the egg name specified in setup.py is missing in requirements.txt. This causes duplicate entries of same vcs url in dev-requirements.txt if a vcs dependency itself depends on another vcs dependency.

Environment Versions

OS Type: Ubuntu GNU/Linux v18.04
Python version: 3.7.4
pip version: 19.2.3
pip-tools version: 4.1.0

Steps to replicate

  1. Create setup.py with vcs url in install_requires
from setuptools import setup
setup(
    ...,
    install_requires=['mypackage @ <vcs_url>'],
    ...,
)
  1. Compile requirements.txt.

Expected result

<vcs_url>#egg=mypackage

Actual result

<vcs_url>

Workaround

Specifying the egg name explicitly in vcs url in setup.py

from setuptools import setup
setup(
    ...,
    install_requires=['mypackage @ <vcs_url>#egg=mypackage'],
    ...,
)

will produce the expected result.

@atugushev atugushev added the bug Something is not working label Sep 22, 2019
@atugushev
Copy link
Member

Hello @cbows,

Thanks for bringing up this!

FTR and truly curious:

@atugushev atugushev added the setuptools Related to compiling requirements form setup.py label Nov 22, 2019
@atugushev
Copy link
Member

atugushev commented Jan 1, 2020

FTR, related discussion about PEP 508 on python packaging forum.

@sambarluc
Copy link

I guess the same question I posted in #1111 (comment) is relevant here too.

@atugushev
Copy link
Member

Can't reproduce anymore with pip-tools-6.11.0. I believe it was fixed in #1455.

# setup.py
from setuptools import setup
setup(
    name="bar",
    version="0.1",
    install_requires=['six @ git+https://github.com/atugushev/six'],
)
$ pip-compile --resolver=backtracking
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
#    pip-compile --resolver=backtracking
#
six @ git+https://github.com/atugushev/six
    # via bar (setup.py)

So I close this as completed. Feel free to reopen if you think that the issue is not resolved. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working setuptools Related to compiling requirements form setup.py
Projects
None yet
Development

No branches or pull requests

3 participants