elceef / dnstwist

Domain name permutation engine for detecting homograph phishing attacks, typo squatting, and brand impersonation
https://dnstwist.it
Apache License 2.0
4.81k stars 764 forks source link

install_requires in setup.py #106

Closed wiene closed 2 years ago

wiene commented 4 years ago

It would be nice if you could provide install_requires in the setup.py file to specify the requirements. There are tools (like pip/pip3 and Debian's dh-python) that use the dependency information from this entry. For more information on this, have a look at the discussion section of the Python Packaging User Guide.

elceef commented 4 years ago

I've been considering that, however the tool is designed in a way to run fine and provide the core functionality without any additional modules/libraries. If you need features like GeoIP or fuzzy hashes (ssdeep), then you need to install the requirements. So I decided to put everything in requirements.txt file and let the user install it on demand. Does it sound reasonable?

wiene commented 4 years ago

I see. That is of course a reasonable decision. What about making that decision explicit by adding

install_requires = [],
extras_require = {
    'geoip': ['GeoIP>=1.3.2'],
    [...]
}

(along the lines of what is described here)?

elceef commented 4 years ago

If I'm not mistaken I need to specify names of extras to be installed. What is the advantage over pip3 install -r requirements.txt?

wiene commented 4 years ago

I think there are two advantages of using install_requires/extras_require:

elceef commented 2 years ago

Finally I followed your suggestion and added extras_require in commit dee6008. Now it should be possible to install bare minimum with pip install dnstwist or along with all extra packages with pip install dnstwist[full].