Skip to content

Instantly share code, notes, and snippets.

@simnalamburt
Last active November 19, 2018 02:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simnalamburt/4eba5ba8a881e473f17ebd70383f18ab to your computer and use it in GitHub Desktop.
Save simnalamburt/4eba5ba8a881e473f17ebd70383f18ab to your computer and use it in GitHub Desktop.

Pip 버그 #3763, #3830, #4453

requirements.txt를 아래와 같이 쓰면

blabla==1.5 --install-option="--use-bundle"
goodlib==0.3.1
django-blabla==2.0.1

Pip 버그때문에 마치 아래와 같이 쓴것처럼 해석되어서, 빌드가 터집니다.

blabla==1.5 --install-option="--use-bundle"
goodlib==0.3.1 --install-option="--use-bundle"
django-blabla==2.0.1 --install-option="--use-bundle"

이 문제를 우회하려면 아래와 같이 짜야합니다.

goodlib==0.3.1
django-blabla==2.0.1

# 옮기지 말아주세요...
blabla==1.5 --install-option="--use-bundle"

... 그리고 심지어 특정환경에서는 setup.py 실행 순서가 섞이기 때문에 저런식으로 우회하는것도 불가능합니다. --install-option을 써야하는 디펜던시가 두개 이상일경우에는 여러개의 requirements.txt를 만드는것 외엔 답이 없습니다.

그래서 저걸 고치는 PR #5010을 작성했습니다. 하지만 pip는 2016년 12월 이후로 신버전이 나오지 않고 있어서 저 패치가 적용된 릴리즈를 보려면 한참 기다려야할 것 같네요. 그래서 pip를 버리고 pipenv를 쓰기로 결정하였습니다.

저거 말고도 --install-option을 하나라도 쓰면 그거랑 상관없는 디펜던시들까지도 통째로 wheel 사용이 불가능해지는 문제도 있음.. #4118


References
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment