setuptools/easy_install/pip-installed package lacks documentation #1659
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1659
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am a happy user of the pip installability feature, whereby I run "pip install allmydata-tahoe" to get a running tahoe installation.
This installation lacks documentation, at least where I sometimes find other python documentation in $VIRTUALENV_ROOT/share/doc/$PACKAGE_NAME.
Request: Fix the pypi distribution to bundle all documentation such that pip-installed tahoe provides documentation in this location.
If documentation is installed elsewhere, ensure that it is compatible with virtualenv. Specifically I should be able to install different versions of tahoe-lafs in different virtualenvs and have the correct copy of documentation for each install.
Note that the title of this ticket is misleading. This has nothing to do with
pip
. I added thepypi
keyword, but this also is not specific to Tahoe-LAFS's PyPI page.I just verified that if I download the pypi tarball or the self-hosted zip file, and then run:
-there are no doc files installed outside of the tarball/zipfile contents.
I just added the proposed enhancement #2031 which is to serve
./docs
from the web gateway. That would necessarily solve this issue by bundling all of./docs
as a package resource directory.pip installed-package lacks documentation.to setuptools/easy_install/pip-installed package lacks documentationI believe the summary should actually be changed to "packages installed from an extracted sdist tarball do not install documentation", but I haven't tested that thoroughly enough yet.
I just created this change to setup.py which causes all of
./docs
and some other useful files likeREADME.txt
to be installed in$PREFIX/share/doc/allmydata_tahoe
when installed with pip.Next I'd like to test that this is also the case when I run
python ./setup.py install --single-version-externally-managed
from an unpacked sdist.If that also works, then I would propose to merge that branch.
There are a few sticking points in that branch:
MANIFEST.in
. (I found while doing this thatMANIFEST.in
refers to non-existent paths, and thatpython ./setup.py sdist
does not complain about these missing files, so it has accumulated some bitrot.)distutils.util.convert_path()
somewhere.Here's a demo of the 1659-bundle-docs-in-sdist branch using
pip
to install from agit
repository:Here is a demo which does not use
pip
norvirtualenv
:Replying to nejucomo:
We have a (kludgey) way to test such things. Here is the output on buildbot:
A test of
['python', '-c', "import glob, os, subprocess, sys; os.mkdir('egginstalldir'); tahoe_egg = glob.glob(os.path.join('dist', '*.egg'))[0]; sys.exit(subprocess.call(['easy_install', '-d', 'egginstalldir', tahoe_egg]))"]
:https://tahoe-lafs.org/buildbot-tahoe-lafs/builders/Kyle%20OpenBSD%20amd64/builds/235/steps/install-to-egg/logs/stdio
A test of
['python', '-c', "import subprocess, sys;sys.exit(subprocess.call(['setup.py', 'install', '--single-version-externally-managed', '--record=record.txt', '--prefix', 'prefixinstalldir']sys.executable,))"]
:https://tahoe-lafs.org/buildbot-tahoe-lafs/builders/Kyle%20OpenBSD%20amd64/builds/235/steps/install-to-prefix/logs/stdio
In both cases, they are followed by executing the unit tests from within the installed location:
https://tahoe-lafs.org/buildbot-tahoe-lafs/builders/Kyle%20OpenBSD%20amd64/builds/235/steps/test-from-egg
and
https://tahoe-lafs.org/buildbot-tahoe-lafs/builders/Kyle%20OpenBSD%20amd64/builds/235/steps/test-from-prefixdir
So to test that the docs are installed correctly, I guess we could add another Buildbot BuildStep which runs after the install and before the unit-tests-run-from-installed, which just asserts that the right files are in place.
Nathan: interested in contributing such a test?
Since I've already started a patch for this, I've assigned it to myself.
What's the status of this ticket?