[Pkg-privacy-commits] [txtorcon] 18/49: fix requirements, add dev requirements
Ximin Luo
infinity0 at debian.org
Mon Oct 19 13:49:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository txtorcon.
commit 0981520021fbfb12b022270fcafff7e39e913d85
Author: meejah <meejah at meejah.ca>
Date: Sun May 31 15:23:54 2015 -0600
fix requirements, add dev requirements
---
README.rst | 5 +++++
setup.py | 25 ++++++++-----------------
tox.ini | 2 +-
3 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/README.rst b/README.rst
index e51741c..c2937f3 100644
--- a/README.rst
+++ b/README.rst
@@ -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
diff --git a/setup.py b/setup.py
index 50c3be7..fdc7a56 100644
--- a/setup.py
+++ b/setup.py
@@ -17,29 +17,20 @@ __url__ = 'https://github.com/meejah/txtorcon'
__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',
diff --git a/tox.ini b/tox.ini
index e4f03a9..19f2e34 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,7 +12,7 @@ deps=
setuptools>=0.8.0
mock
GeoIP
-
+ txsocksx
# specific environments
[testenv:twisted-debian-squeeze]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/txtorcon.git
More information about the Pkg-privacy-commits
mailing list