|
1 |
| -"""A setuptools based setup module for stronghold. |
2 |
| -See: |
| 1 | +""" |
| 2 | +A setuptools based setup module for stronghold. |
| 3 | +
|
3 | 4 | https://packaging.python.org/en/latest/distributing.html
|
4 | 5 | https://github.com/pypa/sampleproject
|
5 | 6 | """
|
|
10 | 11 | from codecs import open
|
11 | 12 | from os import path
|
12 | 13 | from constants import Constants
|
| 14 | +import sys |
| 15 | + |
| 16 | +# Check if Python version is above 3 for manually running setup.py |
| 17 | +if sys.version_info[:3] < (3, 0, 0): |
| 18 | + sys.stdout.write("Requires Python 3 to run.") |
| 19 | + sys.exit(1) |
13 | 20 |
|
14 | 21 | here = path.abspath(path.dirname(__file__))
|
15 | 22 |
|
16 | 23 | # Get the long description from the README file
|
17 | 24 | with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
18 | 25 | long_description = f.read()
|
19 | 26 |
|
20 |
| -# Arguments marked as "Required" below must be included for upload to PyPI. |
21 |
| -# Fields marked as "Optional" may be commented out. |
22 |
| - |
23 | 27 | setup(
|
24 |
| - # $ pip install stronghold |
25 |
| - # https://pypi.org/project/stronghold/ |
26 |
| - name=Constants.PROJECT_NAME, # Required |
| 28 | + name=Constants.PROJECT_NAME, |
27 | 29 |
|
28 |
| - # Versions should comply with PEP 440: |
29 |
| - # https://www.python.org/dev/peps/pep-0440/ |
| 30 | + # Versions should comply with PEP 440: https://www.python.org/dev/peps/pep-0440/ |
30 | 31 | #
|
31 | 32 | # For a discussion on single-sourcing the version across setup.py and the
|
32 | 33 | # project code, see https://packaging.python.org/en/latest/single_source_version.html
|
33 |
| - version=Constants.VERSION, # Required |
| 34 | + version=Constants.VERSION, |
34 | 35 |
|
35 |
| - # This is a one-line description or tagline of what your project does. |
36 |
| - # Corresponds to the "Summary" metadata field: |
37 |
| - # https://packaging.python.org/specifications/core-metadata/#summary |
38 |
| - description=Constants.DESCRIPTION, # Required |
39 |
| - long_description_content_type="text/markdown", |
| 36 | + # Python version check for pip installs. |
| 37 | + python_requires=">=3", |
40 | 38 |
|
41 |
| - # Optional longer description of your project that represents |
42 |
| - # the body of text which users will see when they visit PyPI. |
43 |
| - # |
44 |
| - # Often, this is the same as your README, so you can just read it in from |
45 |
| - # that file directly (as we have already done above) |
46 |
| - # |
47 |
| - # This field corresponds to the "Description" metadata field: |
48 |
| - # https://packaging.python.org/specifications/core-metadata/#description-optional |
| 39 | + # One-line description of the project. |
| 40 | + description=Constants.DESCRIPTION, |
| 41 | + long_description_content_type="text/markdown", |
49 | 42 | long_description=long_description,
|
50 | 43 | url=Constants.URL,
|
51 | 44 | author=Constants.AUTHOR_GITHUB,
|
52 |
| - # author_email=Constants.AUTHOR_EMAIL, |
53 | 45 |
|
54 | 46 |
|
55 | 47 | # Classifiers help users find your project by categorizing it.
|
56 |
| - # |
57 |
| - # For a list of valid classifiers, see |
58 | 48 | # https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
59 | 49 | classifiers=[ # Optional
|
60 | 50 | 'Development Status :: 5 - Production/Stable',
|
61 |
| - |
62 | 51 | 'Intended Audience :: Developers',
|
63 | 52 | 'Intended Audience :: End Users/Desktop',
|
64 | 53 | 'Intended Audience :: System Administrators',
|
65 |
| - |
66 | 54 | 'Topic :: Security',
|
67 | 55 | 'Topic :: System :: Installation/Setup',
|
68 | 56 | 'Topic :: System :: Logging',
|
|
71 | 59 | 'Topic :: System :: Networking :: Firewalls',
|
72 | 60 | 'Topic :: System :: Operating System',
|
73 | 61 | 'Topic :: Utilities',
|
74 |
| - |
75 | 62 | 'Operating System :: MacOS',
|
76 |
| - |
77 | 63 | 'Natural Language :: English',
|
78 |
| - |
79 | 64 | 'License :: OSI Approved :: MIT License',
|
80 |
| - |
81 | 65 | 'Programming Language :: Python :: 3',
|
82 | 66 | 'Programming Language :: Python :: 3.4',
|
83 | 67 | 'Programming Language :: Python :: 3.5',
|
84 | 68 | 'Programming Language :: Python :: 3.6',
|
85 | 69 | ],
|
86 | 70 |
|
87 |
| - # This field adds keywords for your project which will appear on the |
88 |
| - # project page. What does your project relate to? |
89 |
| - # |
90 |
| - # Note that this is a string of words separated by whitespace, not a list. |
91 |
| - keywords='fortify stronghold system configuration security firewall hardening logging secure', # Optional |
| 71 | + # This field adds keywords for your project |
| 72 | + # String of words separated by whitespace, not a list. |
| 73 | + keywords='fortify stronghold system configuration security firewall hardening secure', # Optional |
92 | 74 |
|
93 | 75 | # Just want to distribute a single Python file, so using `py_modules`
|
94 |
| - # argument as follows, which will expect a file called |
95 |
| - # `stronghold.py` to exist: |
96 |
| - # |
| 76 | + # argument, which will expect a file called `stronghold.py` to exist: |
97 | 77 | py_modules=[
|
98 | 78 | "stronghold",
|
99 | 79 | "constants"
|
|
123 | 103 | stronghold=stronghold:cli
|
124 | 104 | ''',
|
125 | 105 |
|
126 |
| - # entry_points={ |
127 |
| - # 'console_scripts': [ |
128 |
| - # 'stronghold=stronghold:main', |
129 |
| - # ], |
130 |
| - # }, |
131 |
| - |
132 | 106 | # List additional URLs that are relevant to your project as a dict.
|
133 | 107 | #
|
134 | 108 | # This field corresponds to the "Project-URL" metadata fields:
|
|
0 commit comments