Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
- name: install
run: sudo make install
- name: install pytrap
run: (cd pytrap && make coverage; sudo python3 setup.py install;)
run: (cd pytrap && make coverage; sudo pip install .;)
- name: pycommon tests
run: (cd pycommon && pip install .[test] && pytest;)
- name: make check
run: make check
- name: make distcheck
Expand Down
41 changes: 22 additions & 19 deletions pycommon/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -9,36 +9,36 @@ description = "Common Python modules and methods of the NEMEA system."
readme = {text = "The module contains methods for creation and submission of incident reports in IDEA format.", content-type = "text/plain"}
license = {text = "BSD"}
authors = [
{name = "Vaclav Bartos, CESNET", email = "bartos@cesnet.cz"},
{name = "Vaclav Bartos, CESNET", email = "bartos@cesnet.cz"},
]
maintainers = [
{name = "Tomas Cejka", email = "cejkat@cesnet.cz"},
{name = "Tomas Cejka", email = "cejkat@cesnet.cz"},
]
requires-python = ">=3.6"
dependencies = [
"pynspect",
"idea-format",
"PyYAML",
"ply",
"jinja2",
"redis",
"pynspect",
"idea-format",
"PyYAML",
"ply",
"jinja2",
"redis",
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries",
"Topic :: System :: Networking :: Monitoring",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries",
"Topic :: System :: Networking :: Monitoring",
]


[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"pytest",
"pytest-cov",
]


Expand All @@ -50,6 +50,9 @@ Homepage = "https://github.com/CESNET/Nemea-Framework"
py-modules = ["report2idea", "ip_prefix_search"]
packages = ["reporter_config", "reporter_config.actions"]

[tool.setuptools.extension]
include-dirs = ["/usr/include", "/usr/local/include"]
library-dirs = ["/usr/lib", "/usr/local/lib"]

[tool.pytest.ini_options]
testpaths = ["test"]
Expand Down
2 changes: 1 addition & 1 deletion pytrap/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TESTS = test.sh

.PHONY: coverage
coverage:
CFLAGS=-coverage python3 -m pip install .[test] --no-deps --disable-pip-version-check --no-cache-dir
CFLAGS=-coverage python3 -m pip install .[test] --disable-pip-version-check --no-cache-dir
CFLAGS=-coverage python3 -m pytest --cov=pycommon || echo "Skipped python3 tests"
@lcov --capture --directory . --output-file coverage.info 2>/dev/null && \
genhtml coverage.info --output-directory out 2>/dev/null || echo "Skipped coverage analysis"
Expand Down
16 changes: 9 additions & 7 deletions pytrap/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ license = { text = "BSD" }
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX :: Linux",
"Programming Language :: C",
"Programming Language :: Python :: 3",
Expand All @@ -33,20 +34,19 @@ dependencies = []

[project.optional-dependencies]
test = [
"pytest",
"pytest-cov",
"pytest-forked",
"pytest",
"pytest-cov",
"pytest-forked",
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"sphinx-pyproject"
"sphinx",
"sphinx-rtd-theme",
"sphinx-pyproject",
]

[project.urls]
Homepage = "https://github.com/CESNET/Nemea-Framework"

# Configure setuptools to find packages and handle C extensions
[tool.setuptools]
package-dir = { "" = "src" }

Expand All @@ -64,6 +64,8 @@ sources = [
"src/fields.c"
]
libraries = ["trap", "unirec"]
include-dirs = ["/usr/include", "/usr/local/include"]
library-dirs = ["/usr/lib", "/usr/local/lib"]


[tool.pytest.ini_options]
Expand Down
Loading