remove "_appname.py" file, variable application name #2754

Closed
opened 2016-03-22 20:56:14 +00:00 by warner · 3 comments

A long long time ago, at AllMyData, we had different branches of the Tahoe source tree for different deployment environments. We had a "prod" branch for production, a "dev" branch for development, and I think a "client" or "server" or something else.

To be able to have multiple branches installed on a single box, we added code to alter the installed bin/tahoe name. We were using Darcs back then, and the easiest thing we could think of was to put the "application name" into a file, and add a single darcs patch that changed this file's contents to "prod" or "dev" or whatever. On the prod machines, we'd have a darcs repo that was exactly like the main repo, except it would have this one extra appname-changing patch.

That era is long gone, and we no longer need that complexity in our setup.py. If people really want this feature (maybe someone wants to fork tahoe and call it "shmahoe"), they can just edit setup.py to change the name of the entrypoint script.

(actually, it might be slightly harder than that: we have some tests that check that the literal string "tahoe" is in the output of tahoe --version. If we really want to support forking, then keeping this in a allmydata.*appname* constant would be easier. But I don't think this is worth it)

Actions:

  • delete src/allmydata/_appname.py
  • remove the setup.py code that reads/writes it
  • maybe change the tests that look for allmydata.*appname* in command output and have them look for a hard-coded "tahoe" instead. This includes test_cli, test_client, test_runner, and test_system.
A long long time ago, at AllMyData, we had different branches of the Tahoe source tree for different deployment environments. We had a "prod" branch for production, a "dev" branch for development, and I think a "client" or "server" or something else. To be able to have multiple branches installed on a single box, we added code to alter the installed bin/tahoe name. We were using Darcs back then, and the easiest thing we could think of was to put the "application name" into a file, and add a single darcs patch that changed this file's contents to "prod" or "dev" or whatever. On the prod machines, we'd have a darcs repo that was exactly like the main repo, except it would have this one extra appname-changing patch. That era is long gone, and we no longer need that complexity in our setup.py. If people really want this feature (maybe someone wants to fork tahoe and call it "shmahoe"), they can just edit setup.py to change the name of the entrypoint script. (actually, it might be slightly harder than that: we have some tests that check that the literal string "tahoe" is in the output of `tahoe --version`. If we really want to support forking, then keeping this in a `allmydata.*appname*` constant would be easier. But I don't think this is worth it) Actions: * delete `src/allmydata/_appname.py` * remove the `setup.py` code that reads/writes it * maybe change the tests that look for `allmydata.*appname*` in command output and have them look for a hard-coded "tahoe" instead. This includes test_cli, test_client, test_runner, and test_system.
warner added the
packaging
normal
task
1.10.2
labels 2016-03-22 20:56:14 +00:00
warner added this to the 1.12.0 milestone 2016-03-22 20:56:14 +00:00
Author

moving most tickets from 1.12 to 1.13 so we can release 1.12 with magic-folders

moving most tickets from 1.12 to 1.13 so we can release 1.12 with magic-folders
warner modified the milestone from 1.12.0 to 1.13.0 2016-06-28 18:20:37 +00:00
Author

first patch in https://github.com/tahoe-lafs/tahoe-lafs/pull/305

This removes _appname.py and the code which writes/reads it. It does not change any of the tests yet.

first patch in <https://github.com/tahoe-lafs/tahoe-lafs/pull/305> This removes `_appname.py` and the code which writes/reads it. It does not change any of the tests yet.
Brian Warner <warner@lothar.com> commented 2016-08-12 06:25:05 +00:00
Owner

In b637636/trunk:

remove _appname.py file

We no longer need the complexity of choosing the application name at
runtime. This removes the setup.py code which populates the _appname.py
file, and the code in __init__.py which reads it. It does not yet remove
the tests which compare the output of e.g. `tahoe --version` against
`allmydata.__appname__`, which I think could be removed, but that's more
invasive than I want to do right now.

closes ticket:2754
In [b637636/trunk](/tahoe-lafs/trac-2024-07-25/commit/b637636ef9de701340e25373fe25771f1b9a0b9d): ``` remove _appname.py file We no longer need the complexity of choosing the application name at runtime. This removes the setup.py code which populates the _appname.py file, and the code in __init__.py which reads it. It does not yet remove the tests which compare the output of e.g. `tahoe --version` against `allmydata.__appname__`, which I think could be removed, but that's more invasive than I want to do right now. closes ticket:2754 ```
tahoe-lafs added the
fixed
label 2016-08-12 06:25:05 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

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