Skip to content

Commit

Permalink
Updated to submit to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
dvska committed Mar 25, 2013
1 parent f165677 commit 7853618
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 24 deletions.
23 changes: 12 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Fork of github.com/foxx/requests == python-requests *working with socks proxy* (i.e tor).
Just renamed the package to allow simultaneously use of original reuests and socks-capable requests.

Requesocks is the fork of github.com/foxx/requests == python-requests *working with socks proxy* (i.e tor).
Just renamed the package to allow simultaneously use of original requests and socks-capable-requests.

Requests: HTTP for Humans
=========================
Expand All @@ -18,13 +19,13 @@ perform the simplest of tasks.
Things shouldn't be this way. Not in Python.

::

>>> r = requests.get('https://api.github.com', auth=('user', 'pass'))
>>> r.status_code
204
>>> r.headers['content-type']
'application/json'
>>> r.text
session = requesocks.session()
session.proxies = {'http': 'socks5://127.0.0.1:9050',
'https': 'socks5://127.0.0.1:9050'}
r = session.get('https://api.github.com', auth=('user', 'pass'))
print(r.status_code)
print(r.headers['content-type'])
print(r.text)
...

See `the same code, without Requests <https://gist.github.com/973705>`_.
Expand Down Expand Up @@ -57,11 +58,11 @@ Installation

To install requests, simply: ::

$ pip install requests
$ pip install requesocks

Or, if you absolutely must: ::

$ easy_install requests
$ easy_install requesocks

But, you really shouldn't do that.

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
nose
rudolf2

15 changes: 4 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
import os
import sys
import requesocks
from requesocks.compat import is_py3, is_py2

try:
from setuptools import setup
except ImportError:
from distutils.core import setup



if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
Expand All @@ -25,20 +23,18 @@
'requesocks.packages.urllib3',
'requesocks.packages.urllib3.packages',
'requesocks.packages.urllib3.packages.ssl_match_hostname',
'requesocks.packages.urllib3.packages.socksipy',
'requesocks.packages.urllib3.packages.mimetools_choose_boundary',
]

if is_py3:
required.append('chardet2')
else:
required.append('chardet>=1.0.0')
packages.append('requesocks.packages.oreos')
required.append('chardet>=1.0.0')
packages.append('requesocks.packages.oreos')


setup(
name='requesocks',
version=requesocks.__version__,
description='Python HTTP for Humans.',
description='Python HTTP for Humans, with socks proxy support',
long_description=open('README.rst').read() + '\n\n' +
open('HISTORY.rst').read(),
author='Kenneth Reitz',
Expand All @@ -57,8 +53,5 @@
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
'Programming Language :: Python :: 3.1',
),
)

0 comments on commit 7853618

Please sign in to comment.