ํ๊ฒฝ
๊ธฐ์
๋ค์์ "wobblui @ https://github.com/wobblui/wobblui/archive/master.zip "์ ์ง์ ํ๋ ค๊ณ ํ ๋ ๋ฐ์ํฉ๋๋ค.
Requirement 'wobblui @ https://github.com/wobblui/wobblui/archive/master.zip' looks like a filename, but the file does not exist
Processing ./wobblui @ https:/github.com/wobblui/wobblui/archive/master.zip
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/jonas/Develop/myproj/wobblui @ https:/github.com/wobblui/wobblui/archive/master.zip'
์์๋๋ ํ๋
seutp_requires
์์๋ ์๋ํ๊ณ ์ด๊ฒ์ด ๊ถ์ฅ๋๋ ๋์ฒดํ์ด๊ธฐ ๋๋ฌธ์ ์๋ํฉ๋๋ค. ๋ง์ต๋๊น?
์ฌํ ๋ฐฉ๋ฒ
์ด pyproject.toml์ ์ฌ์ฉํ์ญ์์ค.
[build-system]
requires = ["setuptools", "wheel", "wobblui @ https://github.com/wobblui/wobblui/archive/master.zip"]
build-backend = "setuptools.build_meta"
์ฐ์ถ
Requirement 'wobblui @ https://github.com/wobblui/wobblui/archive/master.zip' looks like a filename, but the file does not exist
Processing ./wobblui @ https:/github.com/wobblui/wobblui/archive/master.zip
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/jonas/Develop/myproj/wobblui @ https:/github.com/wobblui/wobblui/archive/master.zip'
๋๋ ์ด๊ฒ์ด # 6202์ ์ค๋ณต์ด๋ผ๊ณ ์๊ฐํฉ๋๊น?
ํ ๊ทธ ์ฌ๋์ requirements.txt
๋ฅผ ์ธ๊ธํ๋ ๊ฒ ๊ฐ๊ณ ๋ด๋ถ์ ์ผ๋ก ๋์ผํ ๋ฉ์ปค๋์ฆ์ ์ฌ์ฉํ๋์ง ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ๋์ผํ ๊ฒ์ ์ฌ์ฉํ๋ค๋ฉด ์๋ง๋ ์ค๋ณต ์ผ ๊ฒ์
๋๋ค : +1 :
๋๋ ๊ทธ๊ฒ์ด ๋์ผํ ๋ฉ์ปค๋์ฆ์ ์ฌ์ฉํ๋ค๊ณ ํ์ ํ์ง๋ง, ๊ทธ๊ฒ์ด ๊ณ ์ณ์ง ๋๊น์ง ์ด๊ฒ์ ์ด์ด ๋๋ ๊ฒ์ด ์ํ์ง ์์ ๊ฒ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค.
๊ทธ๋งํ ๊ฐ์น๋ฅผ ์ํด, ํด๋น ๋ฌธ์ ์ ๊ด๋ จ๋ PR (# 6203)์ pip๋ ์ฌ๊ธฐ์ ์ ๊ณต๋ pyproject.toml
๋ฅผ ๋ฌธ์ ์์ด ์ค์นํ ์์์์ต๋๋ค.
fixed.sh
#!/bin/sh
cd "$(mktemp -d)"
python -m venv .venv
. .venv/bin/activate
set -ex
pip install --upgrade git+https://github.com/pypa/pip.git
cat <<EOF > pyproject.toml
[build-system]
requires = ["setuptools", "wheel", "wobblui @ https://github.com/wobblui/wobblui/archive/master.zip"]
build-backend = "setuptools.build_meta"
EOF
echo "from setuptools import setup; setup(name='hello')" > setup.py
pip install .
์ฐ์ถ
+ pip install --upgrade git+https://github.com/pypa/pip.git
Collecting git+https://github.com/pypa/pip.git
Cloning https://github.com/pypa/pip.git to /tmp/user/1000/pip-req-build-vj85ywtn
Installing build dependencies ... done
Installing collected packages: pip
Found existing installation: pip 18.1
Uninstalling pip-18.1:
Successfully uninstalled pip-18.1
Running setup.py install for pip ... done
Successfully installed pip-19.3.dev0
+ cat
+ echo from setuptools import setup; setup(name='hello')
+ pip install .
Processing /tmp/user/1000/tmp.xAtiVhhzb7
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: hello
Building wheel for hello (PEP 517) ... done
Created wheel for hello: filename=hello-0.0.0-cp37-none-any.whl size=971 sha256=777a97a967e962ad9ae4d085b5eb369b8ead6340b4c1faae4cc42707a170bd1b
Stored in directory: /tmp/user/1000/pip-ephem-wheel-cache-rvibo0ng/wheels/15/31/64/f6d8e3210b2f9a59fb104fc18d2651440f5e6d328adeca6341
Successfully built hello
Installing collected packages: hello
Successfully installed hello-0.0.0
์ด ๋ฌธ์ ๋ฅผ ์ค๋ณต์ผ๋ก ์ข ๋ฃํ๊ฒ ์ต๋๋ค. ๋ค๋ฅธ ์ ์ด ์์ผ๋ฉด ์๋ ค์ฃผ์ธ์!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๊ทธ๋งํ ๊ฐ์น๋ฅผ ์ํด, ํด๋น ๋ฌธ์ ์ ๊ด๋ จ๋ PR (# 6203)์ pip๋ ์ฌ๊ธฐ์ ์ ๊ณต๋
pyproject.toml
๋ฅผ ๋ฌธ์ ์์ด ์ค์นํ ์์์์ต๋๋ค.