Skip to content

Commit

Permalink
refactor to setup.cfg (#13)
Browse files Browse the repository at this point in the history
* refactor to setup.cfg
  • Loading branch information
dgwhited authored Apr 24, 2023
1 parent d59d1bf commit 626ef5d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ From the root of the folder:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements
python -m scptool.main validate --sourcefiles ./scps --profile yourawsprofile
python -m scpkit.main validate --sourcefiles ./scps --profile yourawsprofile
```
Install as a package
```
Expand Down
2 changes: 1 addition & 1 deletion scpkit/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

def main():
arguments = {
k.lstrip('-'): v for k, v in docopt(__doc__, version='SCPtool v0.01').items()
k.lstrip('-'): v for k, v in docopt(__doc__).items()
}

arguments['scps'] = get_files_in_dir(arguments["sourcefiles"])
Expand Down
28 changes: 28 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[metadata]
name = scpkit
author = Aquia
author_email = [email protected]
url = https://www.aquia.us
project_urls =
Bug Tracker = https://github.com/aquia-inc/scpkit/issues
Source = https://github.com/aquia-inc/scpkit
description = This package helps consolidate service control policies in AWS
license = Apache License 2.0
long_description = file: README.md
long_description_content_type = text/markdown
version = 0.1.0

[options]
zip_safe = False
include_package_data = True
packages = find:
install_requires = file: requirements.txt

[options.entry_points]
console_scripts =
scpkit = scpkit.main:main

[options.packages.find]
exclude =
tests*
my_package.tests*
28 changes: 2 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
from setuptools import setup, find_packages
import pkg_resources
import pathlib
from setuptools import setup

import scpkit

with pathlib.Path("requirements.txt").open() as requirements_txt:
requires = [ str(r) for r in pkg_resources.parse_requirements(requirements_txt) ]

with open("README.md", "r") as readme:
long_description = readme.read()

setup(
name = 'scpkit',
version = scpkit.__version__,
author="Aquia",
author_email="[email protected]",
url="https://github.com/aquia-inc/scpkit",
license="Apache License 2.0",
long_description=long_description,
long_description_content_type="text/markdown",
packages = find_packages(exclude=['tests*']),
entry_points = {
'console_scripts': [ 'scpkit=scpkit.main:main']
},
install_requires = requires
)
setup()

0 comments on commit 626ef5d

Please sign in to comment.