diff --git a/constants.py b/constants.py index 7d9c2ab..eb88737 100644 --- a/constants.py +++ b/constants.py @@ -1,6 +1,6 @@ class Constants: PROJECT_NAME = 'stronghold' - VERSION = '1.2' + VERSION = '1.2.4.3' AUTHOR_GITHUB = 'alichtman' AUTHOR_FULL_NAME = 'Aaron Lichtman' DESCRIPTION = "Securely configure your Mac from the terminal." diff --git a/setup.cfg b/setup.cfg index fa01d69..5561705 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,9 +2,4 @@ description-file = README.md [bdist_wheel] -# This flag says to generate wheels that support both Python 2 and Python -# 3. If your code will not run unchanged on both Python 2 and 3, you will -# need to generate separate wheels for each Python version that you -# support. -# TODO: Add support for Python 2? -universal=1 +python-tag = py3 diff --git a/setup.py b/setup.py index b918da6..ab2cefe 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ -"""A setuptools based setup module for stronghold. -See: +""" +A setuptools based setup module for stronghold. + https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ @@ -10,6 +11,12 @@ from setuptools import setup from codecs import open from os import path from constants import Constants +import sys + +# Check if Python version is above 3 for manually running setup.py +if sys.version_info[:3] < (3, 0, 0): + sys.stdout.write("Requires Python 3 to run.") + sys.exit(1) here = path.abspath(path.dirname(__file__)) @@ -17,52 +24,33 @@ here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() -# Arguments marked as "Required" below must be included for upload to PyPI. -# Fields marked as "Optional" may be commented out. - setup( - # $ pip install stronghold - # https://pypi.org/project/stronghold/ - name=Constants.PROJECT_NAME, # Required + name=Constants.PROJECT_NAME, - # Versions should comply with PEP 440: - # https://www.python.org/dev/peps/pep-0440/ + # Versions should comply with PEP 440: https://www.python.org/dev/peps/pep-0440/ # # For a discussion on single-sourcing the version across setup.py and the # project code, see https://packaging.python.org/en/latest/single_source_version.html - version=Constants.VERSION, # Required + version=Constants.VERSION, - # This is a one-line description or tagline of what your project does. - # Corresponds to the "Summary" metadata field: - # https://packaging.python.org/specifications/core-metadata/#summary - description=Constants.DESCRIPTION, # Required + # Python version check for pip installs. + python_requires=">=3", + + # One-line description of the project. + description=Constants.DESCRIPTION, long_description_content_type="text/markdown", - - # Optional longer description of your project that represents - # the body of text which users will see when they visit PyPI. - # - # Often, this is the same as your README, so you can just read it in from - # that file directly (as we have already done above) - # - # This field corresponds to the "Description" metadata field: - # https://packaging.python.org/specifications/core-metadata/#description-optional long_description=long_description, url=Constants.URL, author=Constants.AUTHOR_GITHUB, - # author_email=Constants.AUTHOR_EMAIL, author_email="aaronlichtman@gmail.com", # Classifiers help users find your project by categorizing it. - # - # For a list of valid classifiers, see # https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ # Optional 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: System Administrators', - 'Topic :: Security', 'Topic :: System :: Installation/Setup', 'Topic :: System :: Logging', @@ -71,29 +59,21 @@ setup( 'Topic :: System :: Networking :: Firewalls', 'Topic :: System :: Operating System', 'Topic :: Utilities', - 'Operating System :: MacOS', - 'Natural Language :: English', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], - # This field adds keywords for your project which will appear on the - # project page. What does your project relate to? - # - # Note that this is a string of words separated by whitespace, not a list. - keywords='fortify stronghold system configuration security firewall hardening logging secure', # Optional + # This field adds keywords for your project + # String of words separated by whitespace, not a list. + keywords='fortify stronghold system configuration security firewall hardening secure', # Optional # Just want to distribute a single Python file, so using `py_modules` - # argument as follows, which will expect a file called - # `stronghold.py` to exist: - # + # argument, which will expect a file called `stronghold.py` to exist: py_modules=[ "stronghold", "constants" @@ -106,9 +86,9 @@ setup( # For an analysis of "install_requires" vs pip's requirements files see: # https://packaging.python.org/en/latest/requirements.html install_requires=[ - 'colorama>=0.3.9', - 'inquirer>=2.2.0', - 'Click' + 'colorama', + 'inquirer', + 'click' ], # To provide executable scripts, use entry points in preference to the @@ -123,12 +103,6 @@ setup( stronghold=stronghold:cli ''', - # entry_points={ - # 'console_scripts': [ - # 'stronghold=stronghold:main', - # ], - # }, - # List additional URLs that are relevant to your project as a dict. # # This field corresponds to the "Project-URL" metadata fields: