Skip to content

Commit

Permalink
Initial implementation for pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
matwey committed Sep 6, 2024
1 parent ecedd76 commit a686131
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 83 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
django-version: [2.2, 3.1, 3.2, 4.0]
exclude:
- python-version: 3.6
django-version: 4.0
- python-version: 3.7
django-version: 4.0
include:
- python-version: 2.7
django-version: 1.11
python-version: ["3.10", "3.11", "3.12"]
django-version: ["4.2", "5.0", "5.1"]

steps:
- uses: actions/checkout@v2
Expand All @@ -31,7 +23,7 @@ jobs:
sudo apt-get install -y librrd-dev
python -m pip install --upgrade pip
pip install Django==${{ matrix.django-version }}
pip install -r requirements.txt
pip install -e ".[dev]"
- name: Run Tests
run: |
python setup.py test
pytest
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.15)
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES C)

set(CMAKE_C_STANDARD 99)

find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBRRD REQUIRED IMPORTED_TARGET librrd)

python_add_library(rrd MODULE c_src/rrd.c WITH_SOABI)
target_link_libraries(rrd PRIVATE PkgConfig::LIBRRD)
set_property(TARGET rrd PROPERTY INTERPROCEDURAL_OPTIMIZATION True)

install(TARGETS rrd DESTINATION collectd_rest)
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

File renamed without changes.
53 changes: 53 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[build-system]
requires = ["scikit-build-core>=0.3.3"]
build-backend = "scikit_build_core.build"

[project]
name = "django-collectd-rest"
version = "0.2.4"
authors = [
{name = "Matwey V. Kornilov", email = "matwey.kornilov@gmail.com"},
]
description = "A simple Django application to demonstrate RRD plots generated by collectd or any other rrd data"
readme = "README.md"
license = {text = "BSD-2-Clause"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Internet :: WWW/HTTP",
]
requires-python = ">= 3.7"
dependencies = [
"djangorestframework",
]

[project.optional-dependencies]
dev = [
"mock",
"pytest",
"pytest-django",
]

[project.urls]
Repository = "https://github.com/matwey/django-collectd-rest.git"
Issues = "https://github.com/matwey/django-collectd-rest/issues"

[tool.scikit-build]
cmake.verbose = true
wheel.packages = ["src/collectd_rest"]

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.settings"
django_find_project = false
pythonpath = ". src"
testpaths = [
"src/collectd_rest",
"tests",
]
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

17 changes: 0 additions & 17 deletions runtests.py

This file was deleted.

40 changes: 0 additions & 40 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions tests/test_all.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a686131

Please sign in to comment.