forked from SELinuxProject/setools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup.py: Move static definitions to pyproject.toml.
Signed-off-by: Chris PeBenito <[email protected]>
- Loading branch information
Showing
2 changed files
with
67 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,70 @@ | ||
[build-system] | ||
requires = ["setuptools", "Cython>=0.27"] | ||
# setup also requires libsepol and libselinux | ||
# C libraries and headers to compile. | ||
requires = ["setuptools", "Cython>=0.29.14"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "setools" | ||
version = "4.6.0.dev" | ||
description="SELinux policy analysis tools." | ||
authors = [{name = "Chris PeBenito", email="[email protected]"}] | ||
readme = {file = "README.md", content-type = "text/markdown"} | ||
urls.Homepage = "https://github.com/SELinuxProject/setools" | ||
urls.Repository = "https://github.com/SELinuxProject/setools.git" | ||
urls."Bug Tracker" = "https://github.com/SELinuxProject/setools/issues" | ||
|
||
keywords = ["SELinux", | ||
"SETools", | ||
"policy", | ||
"analysis", | ||
"seinfo", | ||
"sesearch", | ||
"sediff", | ||
"sedta", | ||
"seinfoflow", | ||
"apol"] | ||
|
||
# https://pypi.org/classifiers/ | ||
classifiers = ["Development Status :: 5 - Production/Stable", | ||
"Environment :: Console", | ||
"Environment :: X11 Applications :: Qt", | ||
"Intended Audience :: Information Technology", | ||
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", | ||
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", | ||
"Programming Language :: Cython", | ||
"Topic :: Security", | ||
"Topic :: Utilities", | ||
"Typing :: Typed"] | ||
|
||
requires-python=">=3.10" | ||
# also requires libsepol.so and libselinux.so. | ||
dependencies = ["setuptools"] | ||
|
||
optional-dependencies.analysis = ["networkx>=2.6", | ||
"pygraphviz"] | ||
optional-dependencies.gui = ["PyQt6"] | ||
optional-dependencies.test = ["tox"] | ||
|
||
[tool.setuptools] | ||
include-package-data = false | ||
script-files = ["apol", | ||
"sediff", | ||
"seinfo", | ||
"seinfoflow", | ||
"sesearch", | ||
"sedta", | ||
"sechecker"] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["setools*"] | ||
|
||
[tool.setuptools.package-data] | ||
"*" = ["*.css", "*.html", "perm_map", "py.typed"] | ||
|
||
[tool.setuptools.exclude-package-data] | ||
"*" = ["*.c", "*.pyi", "*.pyx"] | ||
|
||
|
||
# | ||
# Coverage config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,42 +64,11 @@ | |
if lang and os.path.exists(join("man", lang)): | ||
installed_data.append((join('share/man', lang, 'man1'), glob.glob(join("man", lang, "*.1")))) | ||
|
||
setup(name='setools', | ||
version='4.6.0-dev', | ||
description='SELinux policy analysis tools.', | ||
author='Chris PeBenito', | ||
author_email='[email protected]', | ||
url='https://github.com/SELinuxProject/setools', | ||
packages=['setools', 'setools.checker', 'setools.diff', 'setoolsgui', 'setoolsgui.widgets', | ||
'setoolsgui.widgets.criteria', 'setoolsgui.widgets.details', | ||
'setoolsgui.widgets.models', 'setoolsgui.widgets.views'], | ||
scripts=['apol', 'sediff', 'seinfo', 'seinfoflow', 'sesearch', 'sedta', 'sechecker'], | ||
data_files=installed_data, | ||
package_data={'': ['*.html'], | ||
'setools': ['perm_map', 'policyrep.pyi', 'py.typed']}, | ||
# see pyproject.toml for most package options. | ||
setup(data_files=installed_data, | ||
ext_modules=cythonize(ext_py_mods, include_path=['setools/policyrep'], | ||
annotate=cython_annotate, | ||
compiler_directives={"language_level": 3, | ||
"c_string_type": "str", | ||
"c_string_encoding": "ascii", | ||
"linetrace": enable_coverage}), | ||
test_suite='tests', | ||
license='GPLv2+, LGPLv2.1+', | ||
classifiers=[ | ||
'Environment :: Console', | ||
'Environment :: X11 Applications :: Qt', | ||
'Intended Audience :: Information Technology', | ||
'Topic :: Security', | ||
'Topic :: Utilities', | ||
], | ||
keywords='SELinux SETools policy analysis tools seinfo sesearch sediff sedta seinfoflow apol', | ||
python_requires='>=3.10', | ||
# setup also requires libsepol and libselinux | ||
# C libraries and headers to compile. | ||
setup_requires=['setuptools', 'Cython>=0.29.14'], | ||
install_requires=['setuptools'], | ||
extras_require={ | ||
"analysis": ["networkx>=2.6", "pygraphviz"], | ||
"test": "tox" | ||
} | ||
) | ||
"linetrace": enable_coverage})) |