Skip to content

Commit a0f3cd4

Browse files
authored
Merge pull request #49 from alichtman/pypi_setup_fixes
Pypi setup fixes
2 parents c7f88cd + 821977c commit a0f3cd4

File tree

3 files changed

+23
-54
lines changed

3 files changed

+23
-54
lines changed

constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class Constants:
22
PROJECT_NAME = 'stronghold'
3-
VERSION = '1.3'
3+
VERSION = '1.4'
44
AUTHOR_GITHUB = 'alichtman'
55
AUTHOR_FULL_NAME = 'Aaron Lichtman'
66
DESCRIPTION = "Securely configure your Mac from the terminal."

setup.cfg

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,4 @@
22
description-file = README.md
33

44
[bdist_wheel]
5-
# This flag says to generate wheels that support both Python 2 and Python
6-
# 3. If your code will not run unchanged on both Python 2 and 3, you will
7-
# need to generate separate wheels for each Python version that you
8-
# support.
9-
# TODO: Add support for Python 2?
10-
universal=1
5+
python-tag = py3

setup.py

+21-47
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
"""A setuptools based setup module for stronghold.
2-
See:
1+
"""
2+
A setuptools based setup module for stronghold.
3+
34
https://packaging.python.org/en/latest/distributing.html
45
https://github.com/pypa/sampleproject
56
"""
@@ -10,59 +11,46 @@
1011
from codecs import open
1112
from os import path
1213
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)
1320

1421
here = path.abspath(path.dirname(__file__))
1522

1623
# Get the long description from the README file
1724
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
1825
long_description = f.read()
1926

20-
# Arguments marked as "Required" below must be included for upload to PyPI.
21-
# Fields marked as "Optional" may be commented out.
22-
2327
setup(
24-
# $ pip install stronghold
25-
# https://pypi.org/project/stronghold/
26-
name=Constants.PROJECT_NAME, # Required
28+
name=Constants.PROJECT_NAME,
2729

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/
3031
#
3132
# For a discussion on single-sourcing the version across setup.py and the
3233
# project code, see https://packaging.python.org/en/latest/single_source_version.html
33-
version=Constants.VERSION, # Required
34+
version=Constants.VERSION,
3435

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",
4038

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",
4942
long_description=long_description,
5043
url=Constants.URL,
5144
author=Constants.AUTHOR_GITHUB,
52-
# author_email=Constants.AUTHOR_EMAIL,
5345
author_email="[email protected]",
5446

5547
# Classifiers help users find your project by categorizing it.
56-
#
57-
# For a list of valid classifiers, see
5848
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
5949
classifiers=[ # Optional
6050
'Development Status :: 5 - Production/Stable',
61-
6251
'Intended Audience :: Developers',
6352
'Intended Audience :: End Users/Desktop',
6453
'Intended Audience :: System Administrators',
65-
6654
'Topic :: Security',
6755
'Topic :: System :: Installation/Setup',
6856
'Topic :: System :: Logging',
@@ -71,29 +59,21 @@
7159
'Topic :: System :: Networking :: Firewalls',
7260
'Topic :: System :: Operating System',
7361
'Topic :: Utilities',
74-
7562
'Operating System :: MacOS',
76-
7763
'Natural Language :: English',
78-
7964
'License :: OSI Approved :: MIT License',
80-
8165
'Programming Language :: Python :: 3',
8266
'Programming Language :: Python :: 3.4',
8367
'Programming Language :: Python :: 3.5',
8468
'Programming Language :: Python :: 3.6',
8569
],
8670

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
9274

9375
# 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:
9777
py_modules=[
9878
"stronghold",
9979
"constants"
@@ -123,12 +103,6 @@
123103
stronghold=stronghold:cli
124104
''',
125105

126-
# entry_points={
127-
# 'console_scripts': [
128-
# 'stronghold=stronghold:main',
129-
# ],
130-
# },
131-
132106
# List additional URLs that are relevant to your project as a dict.
133107
#
134108
# This field corresponds to the "Project-URL" metadata fields:

0 commit comments

Comments
 (0)