Я создаю setup.py
для своего собственного пакета. Мой пакет требует Python зависимости 'rarfile'. Итак, в setup.py
я добавил:
setup(
...
install_requires=[ 'rarfile' ],
)
К сожалению, когда я собираю пакет, загружаю его в test.pypi и тестирую установку, он терпит неудачу, жалуясь на отсутствие соответствующего распределения для rarfile. Странно то, что я могу установить rarfile вручную, используя pip3, без проблем, и он работает.
Тестирование установки с pip3 на моем пакете:
pip3 install --no-cache-dir --index-url https://test.pypi.org/simple/ droidlysis
Collecting droidlysis
Downloading https://test-files.pythonhosted.org/packages/01/e8/f7542484ba4acd6a2d079a22c29cd88dcf63cd8334ffa3de29fa5b0ea7a0/droidlysis-3.0.11.tar.gz (40kB)
100% |████████████████████████████████| 40kB 975kB/s
Collecting rarfile==3.1 (from droidlysis)
Could not find a version that satisfies the requirement rarfile==3.1 (from droidlysis) (from versions: )
No matching distribution found for rarfile==3.1 (from droidlysis)
Прямая установка rarfile
с pip3:
$ pip3 install rarfile==3.1
Collecting rarfile==3.1
Using cached https://files.pythonhosted.org/packages/88/0b/107dde3f330d04668e126932a09002ac47348841453aa0391634381fa087/rarfile-3.1.tar.gz
Building wheels for collected packages: rarfile
Running setup.py bdist_wheel for rarfile ... error
Complete output from command /home/axelle/softs/myvirtualenvs/testdroidlysis/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yj6ptg3b/rarfile/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpnlukg8ugpip-wheel- --python-tag cp36:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for rarfile
Running setup.py clean for rarfile
Failed to build rarfile
Installing collected packages: rarfile
Running setup.py install for rarfile ... done
Successfully installed rarfile-3.1