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

Ignore literal duplicates (includes and/or individual requirements) #993

Closed
rfleschenberg opened this issue Jun 13, 2013 · 8 comments
Closed
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@rfleschenberg
Copy link

pip's handling of requirements files does not support a scenario like this one:

# common.txt
somepackage==1.0

# testing.txt
- r common.txt
test-tool==1.0

# development.txt
-r common.txt
-r testing.txt
developer-tool==1.0

Here, pip install -r development.txt will complain about a double requirement somepackage==1.0 and quit.

Because of that, I have to duplicate my testing requirements in my development.txt. Not a big deal, but it would be nice if pip could handle this. For this scenario, it seems that it would be sufficient to just ignore the duplicate -r line, so this would probably be easier to implement than #56.

@robertfw
Copy link

robertfw commented Aug 9, 2013

Just ran into the exact same issue, same use case.

@carlosviol
Copy link

+1

@qwcode
Copy link
Contributor

qwcode commented Mar 27, 2014

closing as dupe of #56

@qwcode qwcode closed this as completed Mar 27, 2014
@qwcode
Copy link
Contributor

qwcode commented Apr 6, 2014

reopening, this is not a duplicate of #56. this issue is about literal duplicate includes, whereas #56 is about resolving non-conflicting (but not necessarily duplicate) top-level requirements.

@qwcode qwcode reopened this Apr 6, 2014
@qwcode qwcode changed the title Ignore duplicate includes of requirements files. Ignore literal duplicates (includes and/or individual requirments) Apr 6, 2014
@qwcode qwcode changed the title Ignore literal duplicates (includes and/or individual requirments) Ignore literal duplicates (includes and/or individual requirements) Apr 6, 2014
@jgumbley
Copy link

jgumbley commented Apr 6, 2014

+1

@qwcode
Copy link
Contributor

qwcode commented Apr 9, 2014

I looked at this from the angle of attempting to allow/ignore literal duplicate requirements.

One snag was with non-editable url requirements, e.g. pkg urls or vcs urls without -e.
currently, that code path does't store the full url in the url property of InstallRequirement, but rather just the url without the fragment.

e.g. so there could be 2 lines like this

git+https://project.git@branch#egg=project'
git+https://project.git@branch#egg=anotherproject'

I don't think these 2 should pass thru as literal duplicates, but we don't have enough information stored to distinguish them. we should look into storing the full url I think, and understand why we're not. I'm not sure atm

related issue: #1658

@dtheodor
Copy link

dtheodor commented Oct 7, 2015

👍

Pip is more disappointing the more you try to do anything outside of tutorial material.

@kaustavha
Copy link
Contributor

+1 same error similiar usecase.
Related issue: rackerlabs/mimic#502

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

7 participants