byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.37k stars 1.64k forks source link

create setup.py and support system wide installation #415

Closed blshkv closed 4 years ago

blshkv commented 4 years ago

setup.py was there in the previous release 5.1.0 but it is gone in the latest 5.1.1 for some reason.

This is a common problem that many tools which we want to distribute do not support system wide installation. Many of these tools provide their own "install.sh" or "setup.sh" with a distro specific commands (sudo apt-install) instead of a proper setup.py. Once created, an end user can install it using the following command: python3 setup.py install --user

The end result, a FHS compliant directory structure should be created. In case if software produce any output, a local user directory should be used, such as ~.//

There are some custom cases (installing non-python packages, data files etc) which have been resolved in other packages. Bellow, are reference points on such bug reports with solutions (patches)

https://github.com/pentoo/pentoo-overlay/issues/596

blshkv commented 4 years ago

https://github.com/byt3bl33d3r/CrackMapExec/commit/7725a69be0f49b887dd457a8a822236486a8a0ee

blshkv commented 4 years ago

hm... it looks like there is a workaround for Gentoo but it was not enrolled yet: https://blogs.gentoo.org/mgorny/2019/12/24/handling-pep-517-pyproject-toml-packages-in-gentoo/

mpgn commented 4 years ago

it looks like there is a workaround for Gentoo so it's fixed ?

blshkv commented 4 years ago

ok, I think it does work. Let's close this bug for now. Thanks for your attention!