takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
883 stars 119 forks source link

pynsist didn't use pip configurations #181

Open liudonghua123 opened 5 years ago

liudonghua123 commented 5 years ago

I configured the index-url of pip in my %HOME%/pip/pip.conf with the following contents.

[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn

And I also checked the configurations.

D:\code\python\pynsist\examples\pyqt5>pip config list
global.index-url='https://pypi.tuna.tsinghua.edu.cn/simple'
install.trusted-host='pypi.tuna.tsinghua.edu.cn'

D:\code\python\pynsist\examples\pyqt5>

But when I run pynsist installer.cfg, it did not download the packages from the index-url I specified. So the download speed was extreme slow.

D:\code\python\pynsist\examples\pyqt5>pynsist installer.cfg
Unpacking Python...
Copying packages into build directory...
Downloading wheel: https://files.pythonhosted.org/packages/a7/22/67cc2bac6ae2cd3a7eabb2a2e91638b94bdc6e0503747e49670ce44bb5b0/PyQt5-5.10.1-5.10.1-cp35.cp36.cp37.cp38-none-win_amd64.whl
takluyver commented 5 years ago

pip.conf configures pip, so it's expected that it doesn't affect pynsist.

However, I don't think there's currently any way to control which servers it fetches packages from, so I'll consider this a feature request.

In the meantime, you could download the wheels another way (e.g. pip wheel), and then use the extra_wheel_sources or local_wheels options to use them with Pynsist. Docs

dmulkey-qubitekk commented 2 years ago

Just throwing in another vote for the alternate server feature request. For Azure users, this would enable you to point pynsist at Azure Artifacts.

lefi7z commented 1 year ago

This would indeed be a helpful feature.

I created a pull request adding a extra_index_urls config section: #256