Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pyproject.toml #8

Merged
merged 7 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=61"]

[project]
name="pyRACF"
version="1.0a1"
description="Python interface to RACF using IRRSMO00 RACF Callable Service."
authors = [
{name = "Joe Bostian", email = "jbostian@ibm.com"},
{name = "Frank De Gilio", email = "degilio@us.ibm.com"},
{name = "Leonard J. Carcaramo Jr", email = "lcarcaramo@ibm.com"},
{name = "Elijah Swift", email = "elijah.swift@ibm.com"},
]
readme = "README.md"
requires-python = "~=3.11"
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: IBM Internal For Now...",
"Operating System :: z/OS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Security",
"Topic :: System :: Hardware :: Mainframes",
"Topic :: System :: Systems Administration",
]
dependencies = [
"defusedxml>=0.7.1",
]

[tool.setuptools]
packages=[
"pyracf",
"pyracf.access",
"pyracf.common",
"pyracf.connection",
"pyracf.data_set",
"pyracf.group",
"pyracf.resource",
"pyracf.setropts",
"pyracf.user",
]
license-files=["LICENSE"]

[tool.isort]
profile = "black"
[tool.flake8]
ignore = """"
W503,
E122,
E203
"""
max-line-length = 99
per-file-ignores = "__init__.py:F401"
lcarcaramo marked this conversation as resolved.
Show resolved Hide resolved
[tool.pylint.FORMAT]
max-args = 6
max-returns = 7
max-attributes = 10
[tool.pylint.'MESSAGES CONTROL']
disable = """
too-few-public-methods,
too-many-public-methods,
import-error,
pointless-statement
"""
lcarcaramo marked this conversation as resolved.
Show resolved Hide resolved
lcarcaramo marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 0 additions & 12 deletions setup.cfg

This file was deleted.

89 changes: 21 additions & 68 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,81 +1,34 @@
"""PyRACF setup/build configuration."""
lcarcaramo marked this conversation as resolved.
Show resolved Hide resolved
import os
from typing import List

from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext


class CustomBuildExt(build_ext):
"""Build cpyracf python extension."""

def build_extensions(self):
os.environ["_CC_CCMODE"] = "1"
os.environ["_CXX_CCMODE"] = "1"
os.environ["_C89_CCMODE"] = "1"
os.environ["_CC_EXTRA_ARGS"] = "1"
os.environ["_CXX_EXTRA_ARGS"] = "1"
os.environ["_C89_EXTRA_ARGS"] = "1"
build_ext.build_extensions(self)


def get_requirements() -> List[str]:
"""Get dependencies that must be installed with pyRACF."""
with open("requirements.txt", "r", encoding="utf-8") as requirements_file:
return [line.strip() for line in requirements_file.readlines()]

setup_args = dict(
lcarcaramo marked this conversation as resolved.
Show resolved Hide resolved
ext_modules = [
Extension(
"cpyracf",
sources=["pyracf/common/irrsmo00.c"],
extra_compile_args=[
"-D_XOPEN_SOURCE_EXTENDED",
"-Wc,lp64,langlvl(EXTC99),STACKPROTECT(ALL),",
"-qcpluscmt",
],
extra_link_args=["-Wl,INFO"],
)
]
)

def main():
"""Entrypoint for pyRACF package setup."""
os.environ["_CC_CCMODE"] = "1"
os.environ["_CXX_CCMODE"] = "1"
os.environ["_C89_CCMODE"] = "1"
os.environ["_CC_EXTRA_ARGS"] = "1"
os.environ["_CXX_EXTRA_ARGS"] = "1"
os.environ["_C89_EXTRA_ARGS"] = "1"
os.environ["CC"] = "xlc"
os.environ["CXX"] = "xlc++"
setup(
name="pyRACF",
version="1.0a1",
description="Python interface to RACF using IRRSMO00 RACF Callable Service.",
author="IBM",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: IBM Internal For Now...",
"Operating System :: z/OS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Security",
"Topic :: System :: Hardware :: Mainframes",
"Topic :: System :: Systems Administration",
],
packages=[
"pyracf",
"pyracf.access",
"pyracf.common",
"pyracf.connection",
"pyracf.data_set",
"pyracf.group",
"pyracf.resource",
"pyracf.setropts",
"pyracf.user",
],
package_dir={"": "."},
ext_modules=[
Extension(
"cpyracf",
sources=["pyracf/common/irrsmo00.c"],
extra_compile_args=[
"-D_XOPEN_SOURCE_EXTENDED",
"-Wc,lp64,langlvl(EXTC99),STACKPROTECT(ALL),",
"-qcpluscmt",
],
extra_link_args=["-Wl,INFO"],
)
],
python_requires="~=3.11",
license_files=("LICENSE"),
install_requires=get_requirements(),
cmdclass={"build_ext": CustomBuildExt},
)
setup(**setup_args)


if __name__ == "__main__":
Expand Down