Opened at 2014-09-19T21:19:46Z
Last modified at 2021-03-30T18:40:19Z
#2300 new defect
missing git tags causes tests to fail
Reported by: | warner | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | soon |
Component: | packaging | Version: | 1.10.0 |
Keywords: | packaging git version | Cc: | |
Launchpad Bug: |
Description
kaoline tried to run setup.py test in a tree that was cloned from zancas's github repo. This failed when something tried to import allmydata._version.
Zancas's repo lacks tags, so kaoline's tree lacked them too. setup.py build ran without complaint, but it did not create src/allmydata/_version.py as usual, because the git describe --tags --dirty --always command (copied from Versioneer) didn't see any tags, so setup.py didn't deduce a version string, so it didn't create _version.py. This is ok for setup.py, but actually trying to use tahoe (including running tests) fails, since __init__.py fails to do its import _version.
Modern Versioneer handles this better (by faking a "0.0" tag if it can't find any others). The code in tahoe's setup.py is copied from an older form of Versioneer. The best fix (after 1.11) is probably to switch over to Versioneer altogether, instead of copying fragments of it into setup.py .
Meanwhile, I'd recommend that developers start by cloning the official repo at https://github.com/tahoe-lafs/tahoe-lafs.git , which should get them all the correct tags.
Change History (6)
comment:1 Changed at 2014-09-26T23:11:07Z by daira
comment:2 Changed at 2014-11-27T02:07:21Z by daira
- Keywords packaging git version added
Due to the fix for #2340, this at least now should print a reasonable warning message during the build.
comment:3 Changed at 2016-03-22T05:02:25Z by warner
- Milestone changed from 1.12.0 to 1.13.0
Milestone renamed
comment:4 Changed at 2016-06-28T18:17:14Z by warner
- Milestone changed from 1.13.0 to 1.14.0
renaming milestone
comment:5 Changed at 2020-06-30T14:45:13Z by exarkun
- Milestone changed from 1.14.0 to 1.15.0
Moving open issues out of closed milestones.
comment:6 Changed at 2021-03-30T18:40:19Z by meejah
- Milestone changed from 1.15.0 to soon
Ticket retargeted after milestone closed
I had the same problem when setting up Travis-CI, since by default it does a shallow clone (--depth=50 IIRC). I fixed it in that case by adding a git pull --depth=1000 command to .travis.yml.