Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Add a Makefile with convenience commands #161

wants to merge 2 commits into from

2 participants


Some users can't install httpie into the global namespace, because of conflicts with dependencies like requests in other projects. This means those users have to do something like this:

mkvirtualenv httpie
pip install httpie

and then use a wrapper alias like this:

alias http=`~/.envs/httpie/bin/http`

Instead this adds a Makefile so you can clone the library and run make install to install it.

There are also helper commands for the tests:

make test-install
make test

I couldn't get httpbin to install by running "pip install -r requirements-dev.txt", I ran into the following error:

Scanning installed packages

Setuptools installation detected at /Users/kevin/code/httpie/venv/lib/python2.7/site-packages

Non-egg installation

Removing elements out of the way...

Renaming /Users/kevin/code/httpie/venv/lib/python2.7/site-packages/setuptools-0.9.7-py2.7.egg-info into /Users/kevin/code/httpie/venv/lib/python2.7/site-packages/setuptools-0.9.7-py2.7.egg-info.OLD.1379182538.52

Renaming /Users/kevin/code/httpie/venv/lib/python2.7/site-packages/setuptools into /Users/kevin/code/httpie/venv/lib/python2.7/site-packages/setuptools.OLD.1379182538.52

Renaming /Users/kevin/code/httpie/venv/lib/python2.7/site-packages/ into /Users/kevin/code/httpie/venv/lib/python2.7/site-packages/

Could not find the /Users/kevin/code/httpie/venv/lib/python2.7/site-packages/ element of the Setuptools distribution

Patched done.


Traceback (most recent call last):

  File "<string>", line 1, in <module>

NameError: name 'install' is not defined

There's an issue with httpbin here that seems to get the same error:, but the corresponding PR was just closed with no comment so I'm not sure what the plan is. Anyway I got around it by cloning the library locally and running pip install -r requirements.txt.

I also had problems running the test suite locally. It seems that the test runner is looking for HTTP/1.1 200 where httpbin responds with HTTP/1.0 200.

Kevin Burke added some commits

Thanks, there is now a similar Makefile.

@jkbrzt jkbrzt closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 14, 2013
  1. Add a Makefile with convenience commands

    Kevin Burke authored
  2. cleanup

    Kevin Burke authored
This page is out of date. Refresh to see the latest.
Showing with 35 additions and 1 deletion.
  1. +1 −0  .gitignore
  2. +33 −0 Makefile
  3. +1 −1  requirements-dev.txt
1  .gitignore
@@ -8,3 +8,4 @@ README.html
33 Makefile
@@ -0,0 +1,33 @@
+.PHONY: install clean venv test-install test
+ rm -rf venv
+ virtualenv venv
+install: venv
+ . venv/bin/activate; pip install . --upgrade --download-cache /tmp/pipcache
+ @echo "\033[95m\n\nInstalled! Add ${PWD}/venv/bin to your \$$PATH to use the http command.\n\033[0m"
+test-install: venv
+ # Stupidly httpbin stopped including a file two months ago making
+ # the normal pip install process impossible with HEAD. Until then install
+ # the last git commit that works. For more see
+ #
+ if [ ! -d venv/build/httpbin ]; then \
+ git clone venv/build/httpbin; \
+ . venv/bin/activate; pip install -r venv/build/httpbin/requirements.txt \
+ --download-cache /tmp/pipcache; \
+ fi
+ . venv/bin/activate; pip install -r requirements-dev.txt \
+ --download-cache /tmp/pipcache
+ . venv/bin/activate; python venv/build/httpbin/ runserver -p $(PORT) &
+ - . venv/bin/activate; HTTPBIN_URL=$(PORT) python test
+ - . venv/bin/activate; HTTPBIN_URL=$(PORT) tox
+ @# We need to kill the django process as well as its subprocesses.
+ kill -9 `pgrep -f "venv/build/httpbin/ runserver -p $(PORT)"`
2  requirements-dev.txt
@@ -1,3 +1,3 @@
+# Run "make test-install" to install test dependencies
Something went wrong with that request. Please try again.