andreafrancia / trash-cli

Command line interface to the freedesktop.org trashcan.
GNU General Public License v2.0
3.63k stars 177 forks source link

Useless installed modules only needed by development tooling #205

Closed eli-schwartz closed 3 years ago

eli-schwartz commented 3 years ago

Updating trash-cli, my release tooling warned me that some new distributable files got created, which I cannot figure out the purpose of.

In commit 836e5e34d7cbd2a416539974e5c0f624912ea860 some code used to build the setuptools /usr/bin scripts was moved into the trashcli site-packages module.

In commit 14eb08c24fed3bb812740745b85c40d612ef4967 some code was added which is used by script/bump to edit the trashcli/trash.py file.

None of this is useful once installed, so why are they being installed on end-user machines?

andreafrancia commented 3 years ago

None of this is useful once installed, so why are they being installed on end-user machines?

Because I did not think it could be a problem. Until now the differentiation was test code -vs- tested code, the test code remains in the tests directory and the tested code in the trashcli directory.

For the scripts generator... as a matter of curiosity, why not use setuptools entry points which handle this for you?

I'm not sure, I need to invoke the executable in automatic tests and I want my automatic test able to run without any set-up procedure. Using setuptools will need to launch setup.py before automatic tests.

For the version bump code... wouldn't it make a lot more sense to include it directly in script/bump?

I don't know how to import an executable python file that does have a trailing ".py" in its name. I don't want rename script/bump to script/bump.py because I think the language for the implementation of the bump script should not leak outside the file content to the file name.

I will move this code to a new trashcli_support directory that will be not included in the distribution.

Thanks for your work in maintaining the ArchLinux package up-to-date.

andreafrancia commented 3 years ago

I can't remove the code in scripts.py because it is need by setup.py. I don't like create a package for bump.py only. Sorry but I don't see any solution.

andreafrancia commented 3 years ago

Found a way to put back Script in setup.py (37cc01f5b611e3a028015584771fb07c314e3a10)

andreafrancia commented 3 years ago

Found also a way to move bump.py to script/. Fixed in 0.21.6.10.1

eli-schwartz commented 3 years ago

Thanks!