Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix requirements, add dev requirements
  • Loading branch information
meejah committed Jun 19, 2015
1 parent 57bcbc4 commit 0981520
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
5 changes: 5 additions & 0 deletions README.rst
Expand Up @@ -24,6 +24,11 @@ For the impatient, there are two quick ways to install this::

$ python setup.py install

... or, better yet, use a virtualenv and the dev requirements::

$ virtualenv venv
$ ./venv/bin/pip install -e .[dev]

For OSX, we can install txtorcon with the help of easy_install::

$ easy_install txtorcon
Expand Down
25 changes: 8 additions & 17 deletions setup.py
Expand Up @@ -17,29 +17,20 @@
__license__ = 'MIT'
__copyright__ = 'Copyright 2012-2015'

def pip_to_requirements(s):
"""
Change a PIP-style requirements.txt string into one suitable for setup.py
"""

if s.startswith('#'):
return ''
m = re.match('(.*)([>=]=[.0-9]*).*', s)
if m:
return '%s (%s)' % (m.group(1), m.group(2))
return s.strip()


setup(name = 'txtorcon',
version = __version__,
description = 'Twisted-based Tor controller client, with state-tracking and configuration abstractions.',
long_description = open('README.rst', 'r').read(),
keywords = ['python', 'twisted', 'tor', 'tor controller'],
## way to have "development requirements"?
requires = filter(len, map(pip_to_requirements, open('requirements.txt').readlines())),
## FIXME is requires even doing anything? why is format
## apparently different for install_requires?
install_requires = ['Twisted>=11.1.0', 'zope.interface>=3.6.1'],
install_requires = open('requirements.txt').readlines(),
# "pip install -e .[dev]" will install development requirements
extras_require=dict(
dev=[
'mock',
'GeoIP',
],
),
classifiers = ['Framework :: Twisted',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -12,7 +12,7 @@ deps=
setuptools>=0.8.0
mock
GeoIP

txsocksx

# specific environments
[testenv:twisted-debian-squeeze]
Expand Down

0 comments on commit 0981520

Please sign in to comment.