Skip to content

Commit

Permalink
Change packaging to use declarative config in setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-k authored and markpeek committed Mar 21, 2021
1 parent d54c508 commit 62c1d57
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 60 deletions.
32 changes: 32 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[metadata]
name = awacs
version = attr: awacs.__version__
url = https://github.com/cloudtools/awacs
author = Mark Peek
author_email = mark@peek.org
description = AWS Access Policy Language creation library
long_description = file: README.rst
long_description_content_type = text/x-rst
license = New BSD license
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
project_urls =
Changelog = https://github.com/cloudtools/awacs/blob/master/CHANGELOG.md
Source = https://github.com/cloudtools/awacs
Tracker = https://github.com/cloudtools/awacs/issues

[options]
include_package_data = true
packages = find:
python_requires = >=3.6
zip_safe = false
62 changes: 2 additions & 60 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,61 +1,3 @@
import os
from setuptools import setup, find_packages
from setuptools import setup

# ----------------------------------------------------------------------------
# Helper Functions
# ----------------------------------------------------------------------------


def file_contents(file_name):
"""Given a file name to a valid file returns the file object."""
curr_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(curr_dir, file_name)) as the_file:
contents = the_file.read()
return contents


def get_version():
curr_dir = os.path.abspath(os.path.dirname(__file__))
with open(curr_dir + "/awacs/__init__.py", "r") as init_version:
for line in init_version:
if "__version__" in line:
return str(line.split("=")[-1].strip(" ")[1:-2])

# ----------------------------------------------------------------------------
# Setup
# ----------------------------------------------------------------------------


setup(
name='awacs',
version=get_version(),
description="AWS Access Policy Language creation library",
long_description=file_contents("README.rst"),
long_description_content_type='text/x-rst',

author="Mark Peek",
author_email="mark@peek.org",
url="https://github.com/cloudtools/awacs",
license="New BSD license",
packages=find_packages(),
test_suite="tests",
requires=['slimit'],
python_requires=">=3.6",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",

"License :: OSI Approved :: BSD License",

"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",

"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.6",
],
)
setup()

0 comments on commit 62c1d57

Please sign in to comment.