File tree Expand file tree Collapse file tree 5 files changed +13
-16
lines changed
Expand file tree Collapse file tree 5 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,6 @@ def get_version(version_file):
113113 "pytest" ,
114114 ]
115115 },
116- scripts = ["scripts/trustymail" ],
117- # Conveniently allows one to run the CLI tool as `example`
118- # entry_points={"console_scripts": ["example = example.example:main"]},
116+ # Conveniently allows one to run the CLI tool as `trustymail`
117+ entry_points = {"console_scripts" : ["trustymail = trustymail.cli:main" ]},
119118)
Original file line number Diff line number Diff line change 1+ """Code to run if this package is used as a Python module."""
2+
3+ from .cli import main
4+
5+ main ()
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
2- # -*- coding: utf-8 -*-
3-
41"""trustymail: A tool for scanning DNS mail records for evaluating security.
52Usage:
63 trustymail (INPUT ...) [options]
5855import docopt
5956
6057# Local imports
61- import trustymail
58+ from . import trustymail
59+ from ._version import __version__
6260
6361# The default ports to be checked to see if an SMTP server is listening.
6462_DEFAULT_SMTP_PORTS = {25 , 465 , 587 }
6563
6664
6765def main ():
68- args = docopt .docopt (__doc__ , version = trustymail . __version__ )
66+ args = docopt .docopt (__doc__ , version = __version__ )
6967
7068 # Monkey patching trustymail to make it cache the PSL where we want
7169 if args ["--psl-filename" ] is not None :
@@ -181,7 +179,3 @@ def mkdir_p(path):
181179 pass
182180 else :
183181 raise
184-
185-
186- if __name__ == "__main__" :
187- main ()
Original file line number Diff line number Diff line change 44
55import publicsuffix
66
7- from trustymail import PublicSuffixListReadOnly
8- from trustymail import PublicSuffixListFilename
9- from trustymail import trustymail
7+ from . import PublicSuffixListReadOnly , PublicSuffixListFilename
8+ from . import trustymail
109
1110
1211def get_psl ():
Original file line number Diff line number Diff line change 1515import dns .reversename
1616
1717
18- from trustymail .domain import get_public_suffix , Domain
18+ from .domain import get_public_suffix , Domain
1919
2020# A cache for SMTP scanning results
2121_SMTP_CACHE = {}
You can’t perform that action at this time.
0 commit comments