47007273ec
The new TorManager adds --launch-tor and --tor-control-port= arguments (requiring the user to explicitly request a new Tor process, if that's what they want). The default (when --tor is enabled) looks for a control port in the usual places (/var/run/tor/control, localhost:9051, localhost:9151), then falls back to hoping there's a SOCKS port in the usual place (localhost:9050). (closes #64) The ssh utilities should now accept the same tor arguments as ordinary send/receive commands. There are now full tests for TorManager, and basic tests for how send/receive use it. (closes #97) Note that Tor is only supported on python2.7 for now, since txsocksx (and therefore txtorcon) doesn't work on py3. You need to do "pip install magic-wormhole[tor]" to get Tor support, and that will get you an inscrutable error on py3 (referencing vcversioner, "install_requires must be a string or list of strings", and "int object not iterable"). To run tests, you must install with the [dev] extra (to get "mock" and other libraries). Our setup.py only includes "txtorcon" in the [dev] extra when on py2, not on py3. Unit tests tolerate the lack of txtorcon (they mock out everything txtorcon would provide), so they should provide the same coverage on both py2 and py3.
61 lines
1.8 KiB
Python
61 lines
1.8 KiB
Python
import sys
|
|
from setuptools import setup
|
|
|
|
import versioneer
|
|
|
|
commands = versioneer.get_cmdclass()
|
|
|
|
DEV_REQUIREMENTS = [
|
|
"mock",
|
|
"tox",
|
|
"pyflakes",
|
|
]
|
|
if sys.version_info[0] < 3:
|
|
# txtorcon is not yet compatible with py3, so we include "txtorcon" in
|
|
# DEV_REQUIREMENTS under py2 but not under py3. The test suite will skip
|
|
# the tor tests when txtorcon is not importable. This results in
|
|
# different wheels when built under py2 vs py3 (with different
|
|
# extras_require[dev] dependencies), but I think this is ok, since nobody
|
|
# should be installing with [dev] from a wheel.
|
|
DEV_REQUIREMENTS.append("txtorcon")
|
|
|
|
setup(name="magic-wormhole",
|
|
version=versioneer.get_version(),
|
|
description="Securely transfer data between computers",
|
|
author="Brian Warner",
|
|
author_email="warner-magic-wormhole@lothar.com",
|
|
license="MIT",
|
|
url="https://github.com/warner/magic-wormhole",
|
|
package_dir={"": "src"},
|
|
packages=["wormhole",
|
|
"wormhole.cli",
|
|
"wormhole.server",
|
|
"wormhole.test",
|
|
],
|
|
package_data={"wormhole.server": ["db-schemas/*.sql"]},
|
|
entry_points={
|
|
"console_scripts":
|
|
[
|
|
"wormhole = wormhole.cli.cli:wormhole",
|
|
"wormhole-server = wormhole.server.cli:server",
|
|
]
|
|
},
|
|
install_requires=[
|
|
"spake2==0.7", "pynacl",
|
|
"six",
|
|
"twisted[tls]",
|
|
"autobahn[twisted] >= 0.14.1",
|
|
"hkdf", "tqdm",
|
|
"click",
|
|
"humanize",
|
|
"ipaddress",
|
|
],
|
|
extras_require={
|
|
':sys_platform=="win32"': ["pypiwin32"],
|
|
"tor": ["txtorcon"],
|
|
"dev": DEV_REQUIREMENTS, # includes txtorcon on py2, but not py3
|
|
},
|
|
test_suite="wormhole.test",
|
|
cmdclass=commands,
|
|
)
|