I think someone should use py2exe or a similar tool to make an msi package for httpie.
Installing python and pip is a major hassle for anyone who just wants to use httpie on windows, which doesn't come with python installed by default.
Scott Hanselman has a step by step guide on how to install it on windows
@mercury2269 This is not the sort of thing I'm talking about here, people should get Httpie up and running without even having to install python.
Many people aren't python people and installing pip on windows is a hassle nobody should go through, not even python developers.
Someone on Twitter has also mentioned Chocolatey, which looks like a decent package manager for Windows. That should allow you to install HTTPie using this simple command:
cinst httpie -source python
But that would require the user to have it installed, wouldn't a standalone installer be better?
Edit: I'll try to make a windows installer using py2exe and Inno Setup
Another option for packaging httpie as a standalone package that includes Python is PyInstaller. I haven't used it myself, but the project is very active.
You could probably even automate the process of generating a Windows package as part of httpie's CI using AppVeyor.
I created a PowerShell script to install hpttpie and already pushed a PR, feel free to use this script to install on a windows machine.
Still no stand-alone .exe
for Windows like aria2c.exe, curl.exe, wget.exe
?
Yeah, installing httpie on a Windows machine without Internet access is a real pain, would also love a package like this. Unfortunately my personal skill aren't quite enought to create it myself yet...
Just noticed that issue asking for Windows package was created in 2012, whereas we are in 2017 now.
Would love to install it through Scoop with scoop install httpie
or choco install httpie
. It's okay if Python is a dependency.
This is a Python script and I guess Python is a requirement.
I'd be willing to create/maintain a package for Chocolatey. Let me know if this is still desired.
I was able to successfully build a stand-alone http.exe
binary inside of the mcr.microsoft.com/windows/servercore:ltsc2019
Docker container with Python 3.7.6 and PyInstaller 3.6. Docker Desktop 2.1.0.5 was used.
These are the commands...
Outside the Docker container:
mkdir c:\temp\outside
docker run -t -i --mount type=bind,src=c:\temp\outside,dst=c:\inside -w c:\ mcr.microsoft.com/windows/servercore:ltsc2019
You are now inside the Docker container:
curl -L https://aka.ms/nugetclidl -o nuget.exe
set PATH=%PATH%;c:\python\tools;c:\python\tools\scripts;c:\GitForWindows\tools\cmd
nuget install GitForWindows -ExcludeVersion
set PYVER=3.7.6
nuget install python -ExcludeVersion -Version %PYVER% -OutputDirectory .
python -m pip install --no-warn-script-location PyInstaller
python -m pip install pywin32
git clone https://github.com/jakubroztocil/httpie.git
cd httpie
python -m pip install -r requirements-dev.txt
python setup.py build
cd build\lib\httpie
echo sys.exit(main())>> core.py
pyinstaller -F --noupx -n http.exe core.py
cd dist
copy http.exe c:\inside
exit
You are now outside of the Docker container:
dir c:\temp\outside\http.exe
The resulting http.exe
has a size of 11,605,534
.
Could someone please confirm this procedure? Thanks.
EDIT:
A pre-built http.exe binary can be downloaded from here:
https://github.com/jftuga/HTTPie-Windows
Please read the Warnings section before using this.
@jftuga, would you care to share your http.exe
with mere Windows users without compiler stuff?
@sergeevabc
https://github.com/jftuga/HTTPie-Windows
Please read the Warnings section before using this.
@jftuga, works as expected, at least basic actions. Thank you, sir.
Anyone checked the Scoop-Python bucket ? Its by the maintainer of nonportable bucket.
scoop bucket add python https://github.com/TheRandomLabs/Scoop-Python.git
scoop install httpie-py
There is a migrate-python-packages
script that has to be run after every Python version update(every update for global install, major version update for user install).
Most helpful comment
Someone on Twitter has also mentioned Chocolatey, which looks like a decent package manager for Windows. That should allow you to install HTTPie using this simple command: