Skip to content

Commit

Permalink
Add hack to install from requirements.txt
Browse files Browse the repository at this point in the history
* Now installing tespeed via `pip install` will
  also kick off a manual read of the
  requirements.txt to install any external deps
* The custom SocksiPy module no longer needs to be
  bundled with tespeed source as it can be just
  installed directly to the env/virtualenv via
  `pip install -r requirements.txt`
  • Loading branch information
gauthamchandra committed Feb 17, 2016
1 parent 6c4c427 commit 5e601de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e git+https://github.com/Janhouse/SocksiPy#egg=SocksiPy-digsby
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
from subprocess import call

# A bit hacky but this needs to be done to install
# any dependency in VCS and non PyPi location as part of
# one `pip install` command
with open('./requirements.txt') as f:
deps = f.read().splitlines()

for dep in deps:
call(['pip', 'install'] + dep.split(' '))

setup(
name = 'tespeed',
Expand Down
2 changes: 1 addition & 1 deletion tespeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
args.suppress=None
args.store=None

from SocksiPy import socks

This comment has been minimized.

Copy link
@Janhouse

Janhouse Feb 26, 2016

You can't just remove SocksiPy like this, this would break testing through SOCKS.

This comment has been minimized.

Copy link
@gauthamchandra

gauthamchandra Mar 1, 2016

Author Owner

Ah damn. I see. will fix probably end of tomorrow.

import socks
import socket

# Magic!
Expand Down

0 comments on commit 5e601de

Please sign in to comment.