From 739df66c80e857e4948e9bb00ae4f47c8f7719b3 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Wed, 14 Aug 2019 14:48:12 -0400 Subject: [PATCH] can't have nice things --- docs/INSTALL.rst | 4 ++-- docs/frontends/FTP-and-SFTP.rst | 9 -------- newsfragments/3240.installation | 1 - setup.py | 37 ++++++++++++++++++++------------- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst index 9c7db2c47..5f9d72d1d 100644 --- a/docs/INSTALL.rst +++ b/docs/INSTALL.rst @@ -200,9 +200,9 @@ Tahoe-LAFS provides some functionality only when explicitly requested at install It does this using the "extras" feature of setuptools. You can request these extra features when running the ``pip install`` command like this:: - % venv/bin/pip install tahoe-lafs[sftp] + % venv/bin/pip install tahoe-lafs[tor] -This example enables the SFTP frontend. +This example enables support for listening and connecting using Tor. The Tahoe-LAFS documentation for specific features which require an explicit install-time step will mention the "extra" that must be requested. Hacking On Tahoe-LAFS diff --git a/docs/frontends/FTP-and-SFTP.rst b/docs/frontends/FTP-and-SFTP.rst index cb1390967..dc348af34 100644 --- a/docs/frontends/FTP-and-SFTP.rst +++ b/docs/frontends/FTP-and-SFTP.rst @@ -37,15 +37,6 @@ We recommend SFTP over FTP, because the protocol is better, and the server implementation in Tahoe-LAFS is more complete. See `Known Issues`_, below, for details. -Software Dependencies ---------------------- - -The SFTP support in Tahoe-LAFS requires certain additional libraries not installed by default. -In order to install everything necessary, use the "sftp" extra when installing Tahoe-LAFS. -For example:: - - % pip install tahoe-lafs[sftp] - Tahoe-LAFS Support ================== diff --git a/newsfragments/3240.installation b/newsfragments/3240.installation index eed82b8c1..e69de29bb 100644 --- a/newsfragments/3240.installation +++ b/newsfragments/3240.installation @@ -1 +0,0 @@ -The SFTP frontend is now contingent on the "sftp" Tahoe-LAFS extra. To use it, be sure to install at least "tahoe-lafs[sftp]". diff --git a/setup.py b/setup.py index 02624c842..f3b837d1d 100644 --- a/setup.py +++ b/setup.py @@ -75,7 +75,22 @@ install_requires = [ # leftover timers) # * Twisted-16.4.0 introduces `python -m twisted.trial` which is needed # for coverage testing - "Twisted[tls] >= 16.4.0", + # * Twisted 16.6.0 drops the undesirable gmpy dependency from the conch + # extra, letting us use that extra instead of trying to duplicate its + # dependencies here. Twisted[conch] >18.7 introduces a dependency on + # bcrypt. It is nice to avoid that if the user ends up with an older + # version of Twisted. That's hard to express except by using the extra. + # + # In a perfect world, Twisted[conch] would be a dependency of an "sftp" + # extra. However, pip fails to resolve the dependencies all + # dependencies when asked for Twisted[tls] *and* Twisted[conch]. + # Specifically, "Twisted[conch]" (as the later requirement) is ignored. + # If there were an Tahoe-LAFS sftp extra that dependended on + # Twisted[conch] and install_requires only included Twisted[tls] then + # `pip install tahoe-lafs[sftp]` would not install requirements + # specified by Twisted[conch]. Since this would be the *whole point* of + # an sftp extra in Tahoe-LAFS, there is no point in having one. + "Twisted[tls,conch] >= 16.6.0", # We need Nevow >= 0.11.1 which can be installed using pip. "Nevow >= 0.11.1", @@ -102,21 +117,16 @@ setup_requires = [ 'setuptools >= 28.8.0', # for PEP-440 style versions ] -sftp_requires = [ - # * Twisted 16.6.0 drops the undesirable gmpy dependency from the conch - # extra, letting us use that extra instead of trying to duplicate its - # dependencies here. Twisted[conch] >18.7 introduces a dependency on - # bcrypt. It is nice to avoid that if the user ends up with an older - # version of Twisted. That's hard to express except by using the extra. - "twisted[conch] >= 16.6.0", -] - tor_requires = [ - "foolscap[tor] >= 0.12.5", + # This is exactly what `foolscap[tor]` means but pip resolves the pair of + # dependencies "foolscap[i2p] foolscap[tor]" to "foolscap[i2p]" so we lose + # this if we don't declare it ourselves! + "txtorcon >= 0.17.0", ] i2p_requires = [ - "foolscap[i2p] >= 0.12.6", + # See the comment in tor_requires. + "txi2p >= 0.3.2", ] if len(sys.argv) > 1 and sys.argv[1] == '--fakedependency': @@ -348,8 +358,7 @@ setup(name="tahoe-lafs", # also set in __init__.py "towncrier", "testtools", "fixtures", - ] + sftp_requires + tor_requires + i2p_requires, - "sftp": sftp_requires, + ] + tor_requires + i2p_requires, "tor": tor_requires, "i2p": i2p_requires, },