Skip to content

Commit 4e497b1

Browse files
committed
Add a setup.py file in attempt to get isort to work.
It didn't, but this project is more like our other projects now.
1 parent 1d24a0a commit 4e497b1

File tree

4 files changed

+88
-3
lines changed

4 files changed

+88
-3
lines changed

requirements-dev.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
-r requirements-test.txt
2-
docopt
32
ipython
4-
PyGithub
3+
semver

requirements-test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pre-commit
1+
-e .[test]

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-e .

setup.py

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
"""
2+
This is the setup module for the example project.
3+
4+
Based on:
5+
6+
- https://packaging.python.org/distributing/
7+
- https://github.com/pypa/sampleproject/blob/master/setup.py
8+
- https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure
9+
"""
10+
11+
# Third-Party Libraries
12+
from setuptools import setup
13+
14+
15+
def readme():
16+
"""Read in and return the contents of the project's README.md file."""
17+
with open("README.md", encoding="utf-8") as f:
18+
return f.read()
19+
20+
21+
def package_vars(version_file):
22+
"""Read in and return the variables defined by the version_file."""
23+
pkg_vars = {}
24+
with open(version_file) as f:
25+
exec(f.read(), pkg_vars) # nosec
26+
return pkg_vars
27+
28+
29+
setup(
30+
name="project_setup",
31+
# Versions should comply with PEP440
32+
version="1.0.0",
33+
description="Documentation for Github projects in the cisagov organization.",
34+
long_description=readme(),
35+
long_description_content_type="text/markdown",
36+
# NCATS "homepage"
37+
url="https://www.us-cert.gov/resources/ncats",
38+
# The project's main homepage
39+
download_url="https://github.com/cisagov/skeleton-python-library",
40+
# Author details
41+
author="Cyber and Infrastructure Security Agency",
42+
author_email="[email protected]",
43+
license="License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
44+
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
45+
classifiers=[
46+
# How mature is this project? Common values are
47+
# 3 - Alpha
48+
# 4 - Beta
49+
# 5 - Production/Stable
50+
"Development Status :: 3 - Alpha",
51+
# Indicate who your project is intended for
52+
"Intended Audience :: Developers",
53+
# Pick your license as you wish (should match "license" above)
54+
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
55+
# Specify the Python versions you support here. In particular, ensure
56+
# that you indicate whether you support Python 2, Python 3 or both.
57+
"Programming Language :: Python :: 3",
58+
"Programming Language :: Python :: 3.6",
59+
"Programming Language :: Python :: 3.7",
60+
"Programming Language :: Python :: 3.8",
61+
],
62+
python_requires=">=3.6",
63+
# What does your project relate to?
64+
keywords="documentation",
65+
install_requires=["docopt", "setuptools >= 24.2.0", "schema", "PyGithub"],
66+
extras_require={
67+
"test": [
68+
"pre-commit",
69+
"coveralls",
70+
# coveralls does not currently support coverage 5.0
71+
# https://github.com/coveralls-clients/coveralls-python/issues/203
72+
# is the issue for this on the coveralls project
73+
"coverage < 5.0",
74+
"pytest-cov",
75+
"pytest",
76+
]
77+
},
78+
scripts=[
79+
"project_setup/scripts/ansible-roles",
80+
"project_setup/scripts/iam-to-travis",
81+
"project_setup/scripts/skeleton",
82+
"project_setup/scripts/ssm-param",
83+
],
84+
entry_points={},
85+
)

0 commit comments

Comments
 (0)