missing git tags causes tests to fail #2300

Open
opened 2014-09-19 21:19:46 +00:00 by warner · 6 comments
warner commented 2014-09-19 21:19:46 +00:00
Owner

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.

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.
tahoe-lafs added the
packaging
normal
defect
1.10.0
labels 2014-09-19 21:19:46 +00:00
tahoe-lafs added this to the 1.12.0 milestone 2014-09-19 21:19:46 +00:00
daira commented 2014-09-26 23:11:07 +00:00
Author
Owner

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 source:.travis.yml.

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 source:.travis.yml.
daira commented 2014-11-27 02:07:21 +00:00
Author
Owner

Due to the fix for #2340, this at least now should print a reasonable warning message during the build.

Due to the fix for #2340, this at least now should print a reasonable warning message during the build.
warner commented 2016-03-22 05:02:25 +00:00
Author
Owner

Milestone renamed

Milestone renamed
tahoe-lafs modified the milestone from 1.12.0 to 1.13.0 2016-03-22 05:02:25 +00:00
warner commented 2016-06-28 18:17:14 +00:00
Author
Owner

renaming milestone

renaming milestone
tahoe-lafs modified the milestone from 1.13.0 to 1.14.0 2016-06-28 18:17:14 +00:00
exarkun commented 2020-06-30 14:45:13 +00:00
Author
Owner

Moving open issues out of closed milestones.

Moving open issues out of closed milestones.
tahoe-lafs modified the milestone from 1.14.0 to 1.15.0 2020-06-30 14:45:13 +00:00
meejah commented 2021-03-30 18:40:19 +00:00
Author
Owner

Ticket retargeted after milestone closed

Ticket retargeted after milestone closed
tahoe-lafs modified the milestone from 1.15.0 to soon 2021-03-30 18:40:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#2300
No description provided.